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
21fcb00a
Commit
21fcb00a
authored
Jun 06, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
Jun 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add support for vararg attribute.
parent
00bc8fa1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
write_msft.c
tools/widl/write_msft.c
+11
-5
No files found.
tools/widl/write_msft.c
View file @
21fcb00a
...
...
@@ -1248,7 +1248,7 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int
int
*
typedata
,
typedata_size
;
int
i
,
id
,
next_idx
;
int
decoded_size
,
extra_attr
=
0
;
int
num_params
=
0
,
num_defaults
=
0
;
int
num_params
=
0
,
num_
optional
=
0
,
num_
defaults
=
0
;
var_t
*
arg
;
char
*
namedata
;
const
attr_t
*
attr
;
...
...
@@ -1283,10 +1283,10 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int
{
num_params
++
;
if
(
arg
->
attrs
)
LIST_FOR_EACH_ENTRY
(
attr
,
arg
->
attrs
,
const
attr_t
,
entry
)
{
if
(
attr
->
type
==
ATTR_DEFAULTVALUE_EXPR
||
attr
->
type
==
ATTR_DEFAULTVALUE_STRING
)
{
if
(
attr
->
type
==
ATTR_DEFAULTVALUE_EXPR
||
attr
->
type
==
ATTR_DEFAULTVALUE_STRING
)
num_defaults
++
;
break
;
}
else
if
(
attr
->
type
==
ATTR_OPTIONAL
)
num_optional
++
;
}
}
...
...
@@ -1341,6 +1341,12 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int
case
ATTR_BINDABLE
:
funcflags
|=
0x4
;
/* FUNCFLAG_BINDABLE */
break
;
case
ATTR_VARARG
:
if
(
num_optional
||
num_defaults
)
warning
(
"add_func_desc: ignoring vararg in function with optional or defaultvalue params
\n
"
);
else
num_optional
=
-
1
;
break
;
default:
warning
(
"add_func_desc: ignoring attr %d
\n
"
,
attr
->
type
);
break
;
...
...
@@ -1394,7 +1400,7 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, const func_t *func, int
typedata
[
4
]
=
(
next_idx
<<
16
)
|
(
callconv
<<
8
)
|
(
invokekind
<<
3
)
|
funckind
;
if
(
num_defaults
)
typedata
[
4
]
|=
0x1000
;
if
(
entry_is_ord
)
typedata
[
4
]
|=
0x2000
;
typedata
[
5
]
=
num_params
;
typedata
[
5
]
=
(
num_optional
<<
16
)
|
num_params
;
/* NOTE: High word of typedata[3] is total size of FUNCDESC + size of all ELEMDESCs for params + TYPEDESCs for pointer params and return types. */
/* That is, total memory allocation required to reconstitute the FUNCDESC in its entirety. */
...
...
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