Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
43d0d85f
Commit
43d0d85f
authored
Jan 09, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Jan 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Use the standard list functions for the global interface table implementation.
parent
c21f5c7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
19 deletions
+7
-19
git.c
dlls/ole32/git.c
+7
-19
No files found.
dlls/ole32/git.c
View file @
43d0d85f
...
...
@@ -47,6 +47,7 @@
#include "compobj_private.h"
#include "wine/list.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ole
);
...
...
@@ -65,8 +66,7 @@ typedef struct StdGITEntry
IID
iid
;
/* IID of the interface */
IStream
*
stream
;
/* Holds the marshalled interface */
struct
StdGITEntry
*
next
;
struct
StdGITEntry
*
prev
;
struct
list
entry
;
}
StdGITEntry
;
/* Class data */
...
...
@@ -75,8 +75,7 @@ typedef struct StdGlobalInterfaceTableImpl
const
IGlobalInterfaceTableVtbl
*
lpVtbl
;
ULONG
ref
;
struct
StdGITEntry
*
firstEntry
;
struct
StdGITEntry
*
lastEntry
;
struct
list
list
;
ULONG
nextCookie
;
}
StdGlobalInterfaceTableImpl
;
...
...
@@ -116,13 +115,11 @@ StdGlobalInterfaceTable_FindEntry(IGlobalInterfaceTable* iface, DWORD cookie)
TRACE
(
"iface=%p, cookie=0x%x
\n
"
,
iface
,
(
UINT
)
cookie
);
EnterCriticalSection
(
&
git_section
);
e
=
self
->
firstEntry
;
while
(
e
!=
NULL
)
{
LIST_FOR_EACH_ENTRY
(
e
,
&
self
->
list
,
StdGITEntry
,
entry
)
{
if
(
e
->
cookie
==
cookie
)
{
LeaveCriticalSection
(
&
git_section
);
return
e
;
}
e
=
e
->
next
;
}
LeaveCriticalSection
(
&
git_section
);
...
...
@@ -224,11 +221,7 @@ StdGlobalInterfaceTable_RegisterInterfaceInGlobal(
self
->
nextCookie
++
;
/* inc the cookie count */
/* insert the new entry at the end of the list */
entry
->
next
=
NULL
;
entry
->
prev
=
self
->
lastEntry
;
if
(
entry
->
prev
)
entry
->
prev
->
next
=
entry
;
else
self
->
firstEntry
=
entry
;
self
->
lastEntry
=
entry
;
list_add_tail
(
&
self
->
list
,
&
entry
->
entry
);
/* and return the cookie */
*
pdwCookie
=
entry
->
cookie
;
...
...
@@ -243,7 +236,6 @@ static HRESULT WINAPI
StdGlobalInterfaceTable_RevokeInterfaceFromGlobal
(
IGlobalInterfaceTable
*
iface
,
DWORD
dwCookie
)
{
StdGlobalInterfaceTableImpl
*
const
self
=
(
StdGlobalInterfaceTableImpl
*
)
iface
;
StdGITEntry
*
entry
;
HRESULT
hr
;
...
...
@@ -266,10 +258,7 @@ StdGlobalInterfaceTable_RevokeInterfaceFromGlobal(
/* chop entry out of the list, and free the memory */
EnterCriticalSection
(
&
git_section
);
if
(
entry
->
prev
)
entry
->
prev
->
next
=
entry
->
next
;
else
self
->
firstEntry
=
entry
->
next
;
if
(
entry
->
next
)
entry
->
next
->
prev
=
entry
->
prev
;
else
self
->
lastEntry
=
entry
->
prev
;
list_remove
(
&
entry
->
entry
);
LeaveCriticalSection
(
&
git_section
);
HeapFree
(
GetProcessHeap
(),
0
,
entry
);
...
...
@@ -400,8 +389,7 @@ void* StdGlobalInterfaceTable_Construct(void)
newGIT
->
lpVtbl
=
&
StdGlobalInterfaceTableImpl_Vtbl
;
newGIT
->
ref
=
1
;
/* Initialise the reference count */
newGIT
->
firstEntry
=
NULL
;
/* we start with an empty table */
newGIT
->
lastEntry
=
NULL
;
list_init
(
&
newGIT
->
list
);
newGIT
->
nextCookie
=
0xf100
;
/* that's where windows starts, so that's where we start */
TRACE
(
"Created the GIT at %p
\n
"
,
newGIT
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment