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
7e5cf94f
Commit
7e5cf94f
authored
Dec 26, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Dec 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Pass a state into marshall_arguments and unmarshall_arguments to
decide which parameters should be considered based on their direction.
parent
24d1b71d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
6 deletions
+55
-6
client.c
tools/widl/client.c
+1
-1
server.c
tools/widl/server.c
+1
-1
typegen.c
tools/widl/typegen.c
+44
-2
typegen.h
tools/widl/typegen.h
+9
-2
No files found.
tools/widl/client.c
View file @
7e5cf94f
...
...
@@ -227,7 +227,7 @@ static void write_function_stubs(type_t *iface)
/* marshal arguments */
marshall_arguments
(
client
,
indent
,
func
,
&
type_offset
);
marshall_arguments
(
client
,
indent
,
func
,
&
type_offset
,
PASS_IN
);
/* send/receive message */
/* print_client("NdrNsSendReceive(\n"); */
...
...
tools/widl/server.c
View file @
7e5cf94f
...
...
@@ -198,7 +198,7 @@ static void write_function_stubs(type_t *iface)
indent
-=
2
;
fprintf
(
server
,
"
\n
"
);
unmarshall_arguments
(
server
,
indent
,
func
,
&
type_offset
);
unmarshall_arguments
(
server
,
indent
,
func
,
&
type_offset
,
PASS_OUT
);
}
print_server
(
"if (_StubMsg.Buffer > _StubMsg.BufferEnd)
\n
"
);
...
...
tools/widl/typegen.c
View file @
7e5cf94f
...
...
@@ -281,7 +281,8 @@ unsigned int get_required_buffer_size(type_t *type)
}
}
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
)
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
)
{
unsigned
int
last_size
=
0
;
var_t
*
var
;
...
...
@@ -293,6 +294,26 @@ void marshall_arguments(FILE *file, int indent, func_t *func, unsigned int *type
while
(
NEXT_LINK
(
var
))
var
=
NEXT_LINK
(
var
);
for
(;
var
;
*
type_offset
+=
get_size_typeformatstring_var
(
var
),
var
=
PREV_LINK
(
var
))
{
int
in_attr
=
is_attr
(
var
->
attrs
,
ATTR_IN
);
int
out_attr
=
is_attr
(
var
->
attrs
,
ATTR_OUT
);
if
(
!
in_attr
&&
!
out_attr
)
in_attr
=
1
;
switch
(
pass
)
{
case
PASS_IN
:
if
(
!
in_attr
)
continue
;
break
;
case
PASS_OUT
:
if
(
!
out_attr
)
continue
;
break
;
case
PASS_RETURN
:
break
;
}
if
(
var
->
ptr_level
==
0
&&
!
var
->
array
)
{
unsigned
int
size
;
...
...
@@ -413,7 +434,8 @@ void marshall_arguments(FILE *file, int indent, func_t *func, unsigned int *type
}
}
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
)
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
)
{
unsigned
int
last_size
=
0
;
var_t
*
var
;
...
...
@@ -425,6 +447,26 @@ void unmarshall_arguments(FILE *file, int indent, func_t *func, unsigned int *ty
while
(
NEXT_LINK
(
var
))
var
=
NEXT_LINK
(
var
);
for
(;
var
;
*
type_offset
+=
get_size_typeformatstring_var
(
var
),
var
=
PREV_LINK
(
var
))
{
int
in_attr
=
is_attr
(
var
->
attrs
,
ATTR_IN
);
int
out_attr
=
is_attr
(
var
->
attrs
,
ATTR_OUT
);
if
(
!
in_attr
&&
!
out_attr
)
in_attr
=
1
;
switch
(
pass
)
{
case
PASS_IN
:
if
(
!
in_attr
)
continue
;
break
;
case
PASS_OUT
:
if
(
!
out_attr
)
continue
;
break
;
case
PASS_RETURN
:
break
;
}
if
(
var
->
ptr_level
==
0
&&
!
var
->
array
)
{
unsigned
int
size
;
...
...
tools/widl/typegen.h
View file @
7e5cf94f
...
...
@@ -20,10 +20,17 @@
*/
enum
pass
{
PASS_IN
,
PASS_OUT
,
PASS_RETURN
};
void
write_procformatstring
(
FILE
*
file
,
type_t
*
iface
);
void
write_typeformatstring
(
FILE
*
file
,
type_t
*
iface
);
unsigned
int
get_required_buffer_size
(
type_t
*
type
);
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
);
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
);
void
marshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
);
void
unmarshall_arguments
(
FILE
*
file
,
int
indent
,
func_t
*
func
,
unsigned
int
*
type_offset
,
enum
pass
pass
);
size_t
get_size_procformatstring_var
(
var_t
*
var
);
size_t
get_size_typeformatstring_var
(
var_t
*
var
);
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