Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
f2eb2d23
Commit
f2eb2d23
authored
Jul 03, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jul 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut: Move the processing of functions in SLTG typelibs into a
separate function and use it when processing dispinterfaces.
parent
8a50262f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
46 deletions
+54
-46
typelib.c
dlls/oleaut32/typelib.c
+54
-46
No files found.
dlls/oleaut32/typelib.c
View file @
f2eb2d23
...
...
@@ -2884,47 +2884,14 @@ static void SLTG_DoVars(char *pBlk, ITypeInfoImpl *pTI, unsigned short cVars, ch
pTI
->
TypeAttr
.
cVars
=
cVars
;
}
static
void
SLTG_ProcessCoClass
(
char
*
pBlk
,
ITypeInfoImpl
*
pTI
,
char
*
pNameTable
,
SLTG_TypeInfoHeader
*
pTIHeader
,
SLTG_TypeInfoTail
*
pTITail
)
{
char
*
pFirstItem
,
*
pNextItem
;
if
(
pTIHeader
->
href_table
!=
0xffffffff
)
{
SLTG_DoRefs
((
SLTG_RefInfo
*
)((
char
*
)
pTIHeader
+
pTIHeader
->
href_table
),
pTI
,
pNameTable
);
}
pFirstItem
=
pNextItem
=
pBlk
;
if
(
*
(
WORD
*
)
pFirstItem
==
SLTG_IMPL_MAGIC
)
{
pNextItem
=
SLTG_DoImpls
(
pFirstItem
,
pTI
,
FALSE
);
}
}
static
void
SLTG_ProcessInterface
(
char
*
pBlk
,
ITypeInfoImpl
*
pTI
,
char
*
pNameTable
,
SLTG_TypeInfoHeader
*
pTIHeader
,
SLTG_TypeInfoTail
*
pTITail
)
static
void
SLTG_DoFuncs
(
char
*
pBlk
,
char
*
pFirstItem
,
ITypeInfoImpl
*
pTI
,
unsigned
short
cFuncs
,
char
*
pNameTable
)
{
SLTG_Function
*
pFunc
;
char
*
pFirstItem
,
*
pNextItem
;
unsigned
short
i
;
TLBFuncDesc
**
ppFuncDesc
=
&
pTI
->
funclist
;
int
num
=
0
;
if
(
pTIHeader
->
href_table
!=
0xffffffff
)
{
SLTG_DoRefs
((
SLTG_RefInfo
*
)((
char
*
)
pTIHeader
+
pTIHeader
->
href_table
),
pTI
,
pNameTable
);
}
pFirstItem
=
pNextItem
=
pBlk
;
if
(
*
(
WORD
*
)
pFirstItem
==
SLTG_IMPL_MAGIC
)
{
pNextItem
=
SLTG_DoImpls
(
pFirstItem
,
pTI
,
TRUE
);
}
for
(
pFunc
=
(
SLTG_Function
*
)
pNextItem
,
num
=
1
;
1
;
pFunc
=
(
SLTG_Function
*
)(
pFirstItem
+
pFunc
->
next
),
num
++
)
{
for
(
pFunc
=
(
SLTG_Function
*
)
pFirstItem
,
i
=
0
;
i
<
cFuncs
;
pFunc
=
(
SLTG_Function
*
)(
pBlk
+
pFunc
->
next
),
i
++
)
{
int
param
;
WORD
*
pType
,
*
pArg
;
...
...
@@ -2951,10 +2918,9 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
if
(
pFunc
->
retnextopt
&
0x80
)
pType
=
&
pFunc
->
rettype
;
else
pType
=
(
WORD
*
)(
pFirstItem
+
pFunc
->
rettype
);
pType
=
(
WORD
*
)(
pBlk
+
pFunc
->
rettype
);
SLTG_DoElem
(
pType
,
p
FirstItem
,
&
(
*
ppFuncDesc
)
->
funcdesc
.
elemdescFunc
);
SLTG_DoElem
(
pType
,
p
Blk
,
&
(
*
ppFuncDesc
)
->
funcdesc
.
elemdescFunc
);
(
*
ppFuncDesc
)
->
funcdesc
.
lprgelemdescParam
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
...
...
@@ -2963,7 +2929,7 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
(
*
ppFuncDesc
)
->
funcdesc
.
cParams
*
sizeof
(
TLBParDesc
));
pArg
=
(
WORD
*
)(
p
FirstItem
+
pFunc
->
arg_off
);
pArg
=
(
WORD
*
)(
p
Blk
+
pFunc
->
arg_off
);
for
(
param
=
0
;
param
<
(
*
ppFuncDesc
)
->
funcdesc
.
cParams
;
param
++
)
{
char
*
paramName
=
pNameTable
+
*
pArg
;
...
...
@@ -2990,14 +2956,14 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
pArg
++
;
if
(
HaveOffs
)
{
/* the next word is an offset to type */
pType
=
(
WORD
*
)(
p
FirstItem
+
*
pArg
);
SLTG_DoElem
(
pType
,
p
FirstItem
,
pType
=
(
WORD
*
)(
p
Blk
+
*
pArg
);
SLTG_DoElem
(
pType
,
p
Blk
,
&
(
*
ppFuncDesc
)
->
funcdesc
.
lprgelemdescParam
[
param
]);
pArg
++
;
}
else
{
if
(
paramName
)
paramName
--
;
pArg
=
SLTG_DoElem
(
pArg
,
p
FirstItem
,
pArg
=
SLTG_DoElem
(
pArg
,
p
Blk
,
&
(
*
ppFuncDesc
)
->
funcdesc
.
lprgelemdescParam
[
param
]);
}
...
...
@@ -3015,7 +2981,48 @@ static void SLTG_ProcessInterface(char *pBlk, ITypeInfoImpl *pTI,
ppFuncDesc
=
&
((
*
ppFuncDesc
)
->
next
);
if
(
pFunc
->
next
==
0xffff
)
break
;
}
pTI
->
TypeAttr
.
cFuncs
=
num
;
pTI
->
TypeAttr
.
cFuncs
=
cFuncs
;
}
static
void
SLTG_ProcessCoClass
(
char
*
pBlk
,
ITypeInfoImpl
*
pTI
,
char
*
pNameTable
,
SLTG_TypeInfoHeader
*
pTIHeader
,
SLTG_TypeInfoTail
*
pTITail
)
{
char
*
pFirstItem
,
*
pNextItem
;
if
(
pTIHeader
->
href_table
!=
0xffffffff
)
{
SLTG_DoRefs
((
SLTG_RefInfo
*
)((
char
*
)
pTIHeader
+
pTIHeader
->
href_table
),
pTI
,
pNameTable
);
}
pFirstItem
=
pNextItem
=
pBlk
;
if
(
*
(
WORD
*
)
pFirstItem
==
SLTG_IMPL_MAGIC
)
{
pNextItem
=
SLTG_DoImpls
(
pFirstItem
,
pTI
,
FALSE
);
}
}
static
void
SLTG_ProcessInterface
(
char
*
pBlk
,
ITypeInfoImpl
*
pTI
,
char
*
pNameTable
,
SLTG_TypeInfoHeader
*
pTIHeader
,
SLTG_TypeInfoTail
*
pTITail
)
{
char
*
pFirstItem
,
*
pNextItem
;
if
(
pTIHeader
->
href_table
!=
0xffffffff
)
{
SLTG_DoRefs
((
SLTG_RefInfo
*
)((
char
*
)
pTIHeader
+
pTIHeader
->
href_table
),
pTI
,
pNameTable
);
}
pFirstItem
=
pNextItem
=
pBlk
;
if
(
*
(
WORD
*
)
pFirstItem
==
SLTG_IMPL_MAGIC
)
{
pNextItem
=
SLTG_DoImpls
(
pFirstItem
,
pTI
,
TRUE
);
}
if
(
pTITail
->
funcs_off
!=
0xffff
)
SLTG_DoFuncs
(
pBlk
,
pBlk
+
pTITail
->
funcs_off
,
pTI
,
pTITail
->
cFuncs
,
pNameTable
);
if
(
TRACE_ON
(
typelib
))
dump_TLBFuncDesc
(
pTI
->
funclist
);
}
...
...
@@ -3061,7 +3068,8 @@ static void SLTG_ProcessDispatch(char *pBlk, ITypeInfoImpl *pTI,
if
(
pTITail
->
vars_off
!=
0xffff
)
SLTG_DoVars
(
pBlk
+
pTITail
->
vars_off
,
pTI
,
pTITail
->
cVars
,
pNameTable
);
FIXME_
(
typelib
)(
"process funcs
\n
"
);
if
(
pTITail
->
funcs_off
!=
0xffff
)
SLTG_DoFuncs
(
pBlk
,
pBlk
+
pTITail
->
funcs_off
,
pTI
,
pTITail
->
cFuncs
,
pNameTable
);
}
static
void
SLTG_ProcessEnum
(
char
*
pBlk
,
ITypeInfoImpl
*
pTI
,
...
...
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