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
5483ea9e
Commit
5483ea9e
authored
Apr 11, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Apr 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Support non-default calling conventions for object methods.
parent
fe7e786a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
header.c
tools/widl/header.c
+9
-3
proxy.c
tools/widl/proxy.c
+3
-1
No files found.
tools/widl/header.c
View file @
5483ea9e
...
...
@@ -729,10 +729,12 @@ static void write_cpp_method_def(const type_t *iface)
{
var_t
*
def
=
cur
->
def
;
if
(
!
is_callas
(
def
->
attrs
))
{
const
char
*
callconv
=
get_attrp
(
def
->
type
->
attrs
,
ATTR_CALLCONV
);
if
(
!
callconv
)
callconv
=
""
;
indent
(
header
,
0
);
fprintf
(
header
,
"virtual "
);
write_type_decl_left
(
header
,
get_func_return_type
(
cur
));
fprintf
(
header
,
"
STDMETHODCALLTYPE "
);
fprintf
(
header
,
"
%s "
,
callconv
);
write_name
(
header
,
def
);
fprintf
(
header
,
"(
\n
"
);
write_args
(
header
,
cur
->
args
,
iface
->
name
,
2
,
TRUE
);
...
...
@@ -755,9 +757,11 @@ static void do_write_c_method_def(const type_t *iface, const char *name)
{
const
var_t
*
def
=
cur
->
def
;
if
(
!
is_callas
(
def
->
attrs
))
{
const
char
*
callconv
=
get_attrp
(
def
->
type
->
attrs
,
ATTR_CALLCONV
);
if
(
!
callconv
)
callconv
=
""
;
indent
(
header
,
0
);
write_type_decl_left
(
header
,
get_func_return_type
(
cur
));
fprintf
(
header
,
" (
STDMETHODCALLTYPE *"
);
fprintf
(
header
,
" (
%s *"
,
callconv
);
write_name
(
header
,
def
);
fprintf
(
header
,
")(
\n
"
);
write_args
(
header
,
cur
->
args
,
name
,
1
,
TRUE
);
...
...
@@ -787,9 +791,11 @@ static void write_method_proto(const type_t *iface)
const
var_t
*
def
=
cur
->
def
;
if
(
!
is_local
(
def
->
attrs
))
{
const
char
*
callconv
=
get_attrp
(
def
->
type
->
attrs
,
ATTR_CALLCONV
);
if
(
!
callconv
)
callconv
=
""
;
/* proxy prototype */
write_type_decl_left
(
header
,
get_func_return_type
(
cur
));
fprintf
(
header
,
"
CALLBACK %s_"
,
iface
->
name
);
fprintf
(
header
,
"
%s %s_"
,
callconv
,
iface
->
name
);
write_name
(
header
,
def
);
fprintf
(
header
,
"_Proxy(
\n
"
);
write_args
(
header
,
cur
->
args
,
iface
->
name
,
1
,
TRUE
);
...
...
tools/widl/proxy.c
View file @
5483ea9e
...
...
@@ -253,10 +253,12 @@ static void gen_proxy(type_t *iface, const func_t *cur, int idx,
var_t
*
def
=
cur
->
def
;
int
has_ret
=
!
is_void
(
get_func_return_type
(
cur
));
int
has_full_pointer
=
is_full_pointer_function
(
cur
);
const
char
*
callconv
=
get_attrp
(
def
->
type
->
attrs
,
ATTR_CALLCONV
);
if
(
!
callconv
)
callconv
=
""
;
indent
=
0
;
write_type_decl_left
(
proxy
,
get_func_return_type
(
cur
));
print_proxy
(
"
STDMETHODCALLTYPE %s_"
,
iface
->
name
);
print_proxy
(
"
%s %s_"
,
callconv
,
iface
->
name
);
write_name
(
proxy
,
def
);
print_proxy
(
"_Proxy(
\n
"
);
write_args
(
proxy
,
cur
->
args
,
iface
->
name
,
1
,
TRUE
);
...
...
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