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
83b94380
Commit
83b94380
authored
Jan 30, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Fix handling context handle return type in mixed mode.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4179189e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
13 deletions
+25
-13
server.c
dlls/rpcrt4/tests/server.c
+0
-2
server.c
tools/widl/server.c
+14
-6
typegen.c
tools/widl/typegen.c
+11
-5
No files found.
dlls/rpcrt4/tests/server.c
View file @
83b94380
...
...
@@ -1839,8 +1839,6 @@ static void test_handle_return(void)
{
ctx_handle_t
handle
,
handle2
;
if
(
!
is_interp
)
return
;
/* broken in widl */
handle
=
get_handle
();
test_handle
(
handle
);
get_handle_by_ptr
(
&
handle2
);
...
...
tools/widl/server.c
View file @
83b94380
...
...
@@ -55,6 +55,7 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned
unsigned
char
explicit_fc
,
implicit_fc
;
int
has_full_pointer
=
is_full_pointer_function
(
func
);
const
var_t
*
handle_var
=
get_func_handle_var
(
iface
,
func
,
&
explicit_fc
,
&
implicit_fc
);
type_t
*
ret_type
=
type_function_get_rettype
(
func
->
type
);
if
(
is_interpreted_func
(
iface
,
func
))
return
;
...
...
@@ -75,7 +76,7 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned
indent
++
;
write_remoting_arguments
(
server
,
indent
,
func
,
"__frame->"
,
PASS_OUT
,
PHASE_FREE
);
if
(
!
is_void
(
type_function_get_rettype
(
func
->
type
)
))
if
(
!
is_void
(
ret_type
))
write_remoting_arguments
(
server
,
indent
,
func
,
"__frame->"
,
PASS_RETURN
,
PHASE_FREE
);
if
(
has_full_pointer
)
...
...
@@ -154,9 +155,16 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned
assign_stub_out_args
(
server
,
indent
,
func
,
"__frame->"
);
/* Call the real server function */
print_server
(
"%s%s%s"
,
is_void
(
type_function_get_rettype
(
func
->
type
))
?
""
:
"__frame->_RetVal = "
,
prefix_server
,
get_name
(
func
));
if
(
is_context_handle
(
ret_type
))
{
print_server
(
"__frame->_RetVal = NDRSContextUnmarshall((char*)0, _pRpcMessage->DataRepresentation);
\n
"
);
print_server
(
"*(("
);
write_type_decl
(
server
,
ret_type
,
NULL
);
fprintf
(
server
,
"*)NDRSContextValue(__frame->_RetVal)) = "
);
}
else
print_server
(
"%s"
,
is_void
(
ret_type
)
?
""
:
"__frame->_RetVal = "
);
fprintf
(
server
,
"%s%s"
,
prefix_server
,
get_name
(
func
));
if
(
type_get_function_args
(
func
->
type
))
{
...
...
@@ -197,7 +205,7 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned
{
write_remoting_arguments
(
server
,
indent
,
func
,
"__frame->"
,
PASS_OUT
,
PHASE_BUFFERSIZE
);
if
(
!
is_void
(
type_function_get_rettype
(
func
->
type
)
))
if
(
!
is_void
(
ret_type
))
write_remoting_arguments
(
server
,
indent
,
func
,
"__frame->"
,
PASS_RETURN
,
PHASE_BUFFERSIZE
);
print_server
(
"_pRpcMessage->BufferLength = __frame->_StubMsg.BufferLength;
\n
"
);
...
...
@@ -216,7 +224,7 @@ static void write_function_stub(const type_t *iface, const var_t *func, unsigned
write_remoting_arguments
(
server
,
indent
,
func
,
"__frame->"
,
PASS_OUT
,
PHASE_MARSHAL
);
/* marshall the return value */
if
(
!
is_void
(
type_function_get_rettype
(
func
->
type
)
))
if
(
!
is_void
(
ret_type
))
write_remoting_arguments
(
server
,
indent
,
func
,
"__frame->"
,
PASS_RETURN
,
PHASE_MARSHAL
);
indent
--
;
...
...
tools/widl/typegen.c
View file @
83b94380
...
...
@@ -4246,13 +4246,14 @@ static void write_remoting_arg(FILE *file, int indent, const var_t *func, const
}
else
if
(
phase
==
PHASE_UNMARSHAL
)
{
if
(
pass
==
PASS_OUT
)
if
(
pass
==
PASS_OUT
||
pass
==
PASS_RETURN
)
{
if
(
!
in_attr
)
print_file
(
file
,
indent
,
"*%s%s = 0;
\n
"
,
local_var_prefix
,
var
->
name
);
print_file
(
file
,
indent
,
"NdrClientContextUnmarshall(
\n
"
);
print_file
(
file
,
indent
+
1
,
"&__frame->_StubMsg,
\n
"
);
print_file
(
file
,
indent
+
1
,
"(NDR_CCONTEXT *)%s%s,
\n
"
,
local_var_prefix
,
var
->
name
);
print_file
(
file
,
indent
+
1
,
"(NDR_CCONTEXT *)%s%s%s,
\n
"
,
pass
==
PASS_RETURN
?
"&"
:
""
,
local_var_prefix
,
var
->
name
);
print_file
(
file
,
indent
+
1
,
"__frame->_Handle);
\n
"
);
}
else
...
...
@@ -4605,9 +4606,14 @@ void declare_stub_args( FILE *file, int indent, const var_t *func )
/* declare return value */
if
(
!
is_void
(
var
->
type
))
{
print_file
(
file
,
indent
,
"%s"
,
""
);
write_type_decl
(
file
,
var
->
type
,
var
->
name
);
fprintf
(
file
,
";
\n
"
);
if
(
is_context_handle
(
var
->
type
))
print_file
(
file
,
indent
,
"NDR_SCONTEXT %s;
\n
"
,
var
->
name
);
else
{
print_file
(
file
,
indent
,
"%s"
,
""
);
write_type_decl
(
file
,
var
->
type
,
var
->
name
);
fprintf
(
file
,
";
\n
"
);
}
}
if
(
!
type_get_function_args
(
func
->
type
))
...
...
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