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
58dea5c9
Commit
58dea5c9
authored
Jun 14, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Jun 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Fix a write_parameters_init bug.
parent
e36981e1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
25 deletions
+23
-25
proxy.c
tools/widl/proxy.c
+1
-1
server.c
tools/widl/server.c
+1
-23
typegen.c
tools/widl/typegen.c
+20
-0
typegen.h
tools/widl/typegen.h
+1
-1
No files found.
tools/widl/proxy.c
View file @
58dea5c9
...
...
@@ -367,7 +367,7 @@ static void gen_stub(type_t *iface, const func_t *cur, const char *cas,
print_proxy
(
"NdrStubInitialize(_pRpcMessage, &_StubMsg, &Object_StubDesc, _pRpcChannelBuffer);
\n
"
);
fprintf
(
proxy
,
"
\n
"
);
write_parameters_init
(
cur
);
write_parameters_init
(
proxy
,
indent
,
cur
);
print_proxy
(
"RpcTryFinally
\n
"
);
print_proxy
(
"{
\n
"
);
...
...
tools/widl/server.c
View file @
58dea5c9
...
...
@@ -54,28 +54,6 @@ static void print_server(const char *format, ...)
va_end
(
va
);
}
void
write_parameters_init
(
const
func_t
*
func
)
{
const
var_t
*
var
;
if
(
!
func
->
args
)
return
;
LIST_FOR_EACH_ENTRY
(
var
,
func
->
args
,
const
var_t
,
entry
)
{
const
type_t
*
t
=
var
->
type
;
const
char
*
n
=
var
->
name
;
if
(
decl_indirect
(
t
))
print_server
(
"MIDL_memset(&%s, 0, sizeof %s);
\n
"
,
n
,
n
);
else
if
(
is_ptr
(
t
)
||
is_array
(
t
))
print_server
(
"%s = 0;
\n
"
,
n
);
}
fprintf
(
server
,
"
\n
"
);
}
static
void
write_function_stubs
(
type_t
*
iface
,
unsigned
int
*
proc_offset
)
{
char
*
implicit_handle
=
get_attrp
(
iface
->
attrs
,
ATTR_IMPLICIT_HANDLE
);
...
...
@@ -137,7 +115,7 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
indent
--
;
fprintf
(
server
,
"
\n
"
);
write_parameters_init
(
func
);
write_parameters_init
(
server
,
indent
,
func
);
if
(
explicit_handle_var
)
{
...
...
tools/widl/typegen.c
View file @
58dea5c9
...
...
@@ -273,6 +273,26 @@ void print(FILE *file, int indent, const char *format, va_list va)
}
}
void
write_parameters_init
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
)
{
const
var_t
*
var
;
if
(
!
func
->
args
)
return
;
LIST_FOR_EACH_ENTRY
(
var
,
func
->
args
,
const
var_t
,
entry
)
{
const
type_t
*
t
=
var
->
type
;
const
char
*
n
=
var
->
name
;
if
(
decl_indirect
(
t
))
print_file
(
file
,
indent
,
"MIDL_memset(&%s, 0, sizeof %s);
\n
"
,
n
,
n
);
else
if
(
is_ptr
(
t
)
||
is_array
(
t
))
print_file
(
file
,
indent
,
"%s = 0;
\n
"
,
n
);
}
fprintf
(
file
,
"
\n
"
);
}
static
void
write_formatdesc
(
FILE
*
f
,
int
indent
,
const
char
*
str
)
{
print_file
(
f
,
indent
,
"typedef struct _MIDL_%s_FORMAT_STRING
\n
"
,
str
);
...
...
tools/widl/typegen.h
View file @
58dea5c9
...
...
@@ -53,5 +53,5 @@ void write_user_quad_list(FILE *file);
void
write_endpoints
(
FILE
*
f
,
const
char
*
prefix
,
const
str_list_t
*
list
);
size_t
type_memsize
(
const
type_t
*
t
,
unsigned
int
*
align
);
int
decl_indirect
(
const
type_t
*
t
);
void
write_parameters_init
(
const
func_t
*
func
);
void
write_parameters_init
(
FILE
*
file
,
int
indent
,
const
func_t
*
func
);
void
print
(
FILE
*
file
,
int
indent
,
const
char
*
format
,
va_list
ap
);
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