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
52cb5b20
Commit
52cb5b20
authored
May 25, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Set the correct stack size for parameters in the proc format string.
parent
56e65b45
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
typegen.c
tools/widl/typegen.c
+27
-1
No files found.
tools/widl/typegen.c
View file @
52cb5b20
...
@@ -342,6 +342,31 @@ static int get_padding(const var_list_t *fields)
...
@@ -342,6 +342,31 @@ static int get_padding(const var_list_t *fields)
return
ROUNDING
(
offset
,
salign
);
return
ROUNDING
(
offset
,
salign
);
}
}
static
unsigned
int
get_stack_size
(
const
type_t
*
type
,
const
attr_list_t
*
attrs
,
int
*
by_value
)
{
unsigned
int
stack_size
;
int
by_val
;
switch
(
typegen_detect_type
(
type
,
attrs
,
TDT_ALL_TYPES
))
{
case
TGT_BASIC
:
case
TGT_ENUM
:
case
TGT_RANGE
:
case
TGT_STRUCT
:
case
TGT_UNION
:
case
TGT_USER_TYPE
:
stack_size
=
type_memsize
(
type
);
by_val
=
(
pointer_size
<
8
||
stack_size
<=
pointer_size
);
/* FIXME: should be platform-specific */
break
;
default:
by_val
=
0
;
break
;
}
if
(
!
by_val
)
stack_size
=
pointer_size
;
if
(
by_value
)
*
by_value
=
by_val
;
return
ROUND_SIZE
(
stack_size
,
pointer_size
);
}
unsigned
char
get_struct_fc
(
const
type_t
*
type
)
unsigned
char
get_struct_fc
(
const
type_t
*
type
)
{
{
int
has_pointer
=
0
;
int
has_pointer
=
0
;
...
@@ -871,7 +896,8 @@ static unsigned int write_procformatstring_type(FILE *file, int indent,
...
@@ -871,7 +896,8 @@ static unsigned int write_procformatstring_type(FILE *file, int indent,
else
else
print_file
(
file
,
indent
,
"0x4d, /* FC_IN_PARAM */
\n
"
);
print_file
(
file
,
indent
,
"0x4d, /* FC_IN_PARAM */
\n
"
);
print_file
(
file
,
indent
,
"0x01,
\n
"
);
size
=
get_stack_size
(
type
,
attrs
,
NULL
);
print_file
(
file
,
indent
,
"0x%02x,
\n
"
,
size
/
pointer_size
);
print_file
(
file
,
indent
,
"NdrFcShort(0x%x), /* type offset = %u */
\n
"
,
print_file
(
file
,
indent
,
"NdrFcShort(0x%x), /* type offset = %u */
\n
"
,
type
->
typestring_offset
,
type
->
typestring_offset
);
type
->
typestring_offset
,
type
->
typestring_offset
);
size
=
4
;
/* includes param type prefix */
size
=
4
;
/* includes param type prefix */
...
...
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