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
0486140c
Commit
0486140c
authored
May 28, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Don't output callback conformances for non-interpreted functions.
The Windows marshaller calls the callback with an invalid stack.
parent
9a21e823
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
typegen.c
tools/widl/typegen.c
+20
-1
typegen.h
tools/widl/typegen.h
+1
-0
No files found.
tools/widl/typegen.c
View file @
0486140c
...
...
@@ -908,6 +908,19 @@ static unsigned int write_procformatstring_type(FILE *file, int indent,
return
size
;
}
int
is_interpreted_func
(
const
type_t
*
iface
,
const
var_t
*
func
)
{
const
char
*
str
;
const
type_t
*
ret_type
=
type_function_get_rettype
(
func
->
type
);
/* return value must fit in a long_ptr for interpreted functions */
if
(
type_get_type
(
ret_type
)
==
TYPE_BASIC
&&
type_memsize
(
ret_type
)
>
pointer_size
)
return
0
;
if
((
str
=
get_attrp
(
func
->
attrs
,
ATTR_OPTIMIZE
)))
return
!
strcmp
(
str
,
"i"
);
if
((
str
=
get_attrp
(
iface
->
attrs
,
ATTR_OPTIMIZE
)))
return
!
strcmp
(
str
,
"i"
);
return
0
;
}
static
void
write_procformatstring_func
(
FILE
*
file
,
int
indent
,
const
var_t
*
func
,
unsigned
int
*
offset
)
{
...
...
@@ -1229,7 +1242,7 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *cont_type,
print_file
(
file
,
2
,
"NdrFcShort(0x%hx),
\t
/* offset = %d */
\n
"
,
(
unsigned
short
)
offset
,
offset
);
}
else
else
if
(
!
iface
||
is_interpreted_func
(
iface
,
current_func
))
{
unsigned
int
callback_offset
=
0
;
struct
expr_eval_routine
*
eval
;
...
...
@@ -1267,6 +1280,12 @@ static unsigned int write_conf_or_var_desc(FILE *file, const type_t *cont_type,
print_file
(
file
,
2
,
"0x%x,
\t
/* %s */
\n
"
,
RPC_FC_CALLBACK
,
"FC_CALLBACK"
);
print_file
(
file
,
2
,
"NdrFcShort(0x%hx),
\t
/* %u */
\n
"
,
(
unsigned
short
)
callback_offset
,
callback_offset
);
}
else
/* output a dummy corr desc that isn't used */
{
print_file
(
file
,
2
,
"0x%x,
\t
/* Corr desc: unused for %s */
\n
"
,
conftype
,
name
);
print_file
(
file
,
2
,
"0x0,
\n
"
);
print_file
(
file
,
2
,
"NdrFcShort(0x0),
\n
"
);
}
return
4
;
}
...
...
tools/widl/typegen.h
View file @
0486140c
...
...
@@ -82,6 +82,7 @@ void write_endpoints( FILE *f, const char *prefix, const str_list_t *list );
void
write_exceptions
(
FILE
*
file
);
unsigned
int
type_memsize
(
const
type_t
*
t
);
int
decl_indirect
(
const
type_t
*
t
);
int
is_interpreted_func
(
const
type_t
*
iface
,
const
var_t
*
func
);
void
write_parameters_init
(
FILE
*
file
,
int
indent
,
const
var_t
*
func
,
const
char
*
local_var_prefix
);
void
print
(
FILE
*
file
,
int
indent
,
const
char
*
format
,
va_list
ap
);
expr_t
*
get_size_is_expr
(
const
type_t
*
t
,
const
char
*
name
);
...
...
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