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
55df46ab
Commit
55df46ab
authored
Feb 07, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Feb 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Merge marshall_arguments and unmarshall_arguments into one
function to remove the large amount of duplicated code.
parent
f1bb0a47
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
client.c
tools/widl/client.c
+3
-2
server.c
tools/widl/server.c
+4
-2
typegen.c
tools/widl/typegen.c
+0
-0
typegen.h
tools/widl/typegen.h
+9
-2
No files found.
tools/widl/client.c
View file @
55df46ab
...
...
@@ -199,7 +199,7 @@ static void write_function_stubs(type_t *iface)
type_offset_func
=
type_offset
;
/* marshal arguments */
marshall_arguments
(
client
,
indent
,
func
,
&
type_offset_func
,
PASS_IN
);
write_remoting_arguments
(
client
,
indent
,
func
,
&
type_offset_func
,
PASS_IN
,
PHASE_MARSHAL
);
/* send/receive message */
/* print_client("NdrNsSendReceive(\n"); */
...
...
@@ -214,7 +214,8 @@ static void write_function_stubs(type_t *iface)
print_client
(
"_StubMsg.BufferStart = (unsigned char *)_RpcMessage.Buffer;
\n
"
);
print_client
(
"_StubMsg.BufferEnd = _StubMsg.BufferStart + _RpcMessage.BufferLength;
\n\n
"
);
unmarshall_arguments
(
client
,
indent
,
func
,
&
type_offset
,
PASS_OUT
);
/* unmarshall arguments */
write_remoting_arguments
(
client
,
indent
,
func
,
&
type_offset
,
PASS_OUT
,
PHASE_UNMARSHAL
);
/* unmarshal return value */
if
(
!
is_void
(
def
->
type
,
NULL
))
...
...
tools/widl/server.c
View file @
55df46ab
...
...
@@ -204,7 +204,8 @@ static void write_function_stubs(type_t *iface)
/* make a copy so we don't increment the type offset twice */
type_offset_func
=
type_offset
;
unmarshall_arguments
(
server
,
indent
,
func
,
&
type_offset_func
,
PASS_IN
);
/* unmarshall arguments */
write_remoting_arguments
(
server
,
indent
,
func
,
&
type_offset_func
,
PASS_IN
,
PHASE_UNMARSHAL
);
}
print_server
(
"if (_StubMsg.Buffer > _StubMsg.BufferEnd)
\n
"
);
...
...
@@ -298,7 +299,8 @@ static void write_function_stubs(type_t *iface)
fprintf
(
server
,
"
\n
"
);
}
marshall_arguments
(
server
,
indent
,
func
,
&
type_offset
,
PASS_OUT
);
/* marshall arguments */
write_remoting_arguments
(
server
,
indent
,
func
,
&
type_offset
,
PASS_OUT
,
PHASE_MARSHAL
);
/* marshall the return value */
if
(
!
is_void
(
def
->
type
,
NULL
))
...
...
tools/widl/typegen.c
View file @
55df46ab
This diff is collapsed.
Click to expand it.
tools/widl/typegen.h
View file @
55df46ab
...
...
@@ -27,11 +27,18 @@ enum pass
PASS_RETURN
};
enum
remoting_phase
{
PHASE_BUFFERSIZE
,
PHASE_MARSHAL
,
PHASE_UNMARSHAL
,
PHASE_FREE
};
void
write_procformatstring
(
FILE
*
file
,
type_t
*
iface
);
void
write_typeformatstring
(
FILE
*
file
,
type_t
*
iface
);
unsigned
int
get_required_buffer_size
(
const
var_t
*
var
,
unsigned
int
*
alignment
);
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
);
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
);
void
write_remoting_arguments
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
,
enum
remoting_phase
phase
);
size_t
get_size_procformatstring_var
(
const
var_t
*
var
);
size_t
get_size_typeformatstring_var
(
const
var_t
*
var
);
int
write_expr_eval_routines
(
FILE
*
file
,
const
char
*
iface
);
...
...
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