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
4f462323
Commit
4f462323
authored
Dec 19, 2005
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 19, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Avoid lvalue casts in generated code.
parent
43b21b6e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
16 deletions
+40
-16
client.c
tools/widl/client.c
+5
-2
proxy.c
tools/widl/proxy.c
+20
-8
server.c
tools/widl/server.c
+5
-2
typegen.c
tools/widl/typegen.c
+10
-4
No files found.
tools/widl/client.c
View file @
4f462323
...
...
@@ -255,9 +255,12 @@ static void write_function_stubs(type_t *iface)
indent
-=
2
;
fprintf
(
client
,
"
\n
"
);
print_client
(
"_RetVal = *(
(
"
);
print_client
(
"_RetVal = *("
);
write_type
(
client
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
client
,
" *)_StubMsg.Buffer)++;
\n
"
);
fprintf
(
client
,
" *)_StubMsg.Buffer;
\n
"
);
fprintf
(
client
,
"_StubMsg.Buffer += sizeof("
);
write_type
(
client
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
client
,
");
\n
"
);
}
/* update proc_offset */
...
...
tools/widl/proxy.c
View file @
4f462323
...
...
@@ -323,9 +323,12 @@ static void marshall_copy_arg( var_t *arg )
case
RPC_FC_LONG
:
case
RPC_FC_ULONG
:
case
RPC_FC_ENUM32
:
print_proxy
(
"*(
(
"
);
print_proxy
(
"*("
);
write_type
(
proxy
,
arg
->
type
,
arg
,
arg
->
tname
);
fprintf
(
proxy
,
"*)_StubMsg.Buffer)++ = %s;
\n
"
,
arg
->
name
);
fprintf
(
proxy
,
" *)_StubMsg.Buffer = %s;
\n
"
,
arg
->
name
);
fprintf
(
proxy
,
"_StubMsg.Buffer += sizeof("
);
write_type
(
proxy
,
arg
->
type
,
arg
,
arg
->
tname
);
fprintf
(
proxy
,
");
\n
"
);
break
;
case
RPC_FC_STRUCT
:
...
...
@@ -419,9 +422,12 @@ static void unmarshall_copy_arg( var_t *arg )
case
RPC_FC_LONG
:
case
RPC_FC_ULONG
:
case
RPC_FC_ENUM32
:
print_proxy
(
"%s = *(("
,
arg
->
name
);
print_proxy
(
"%s = *("
,
arg
->
name
);
write_type
(
proxy
,
arg
->
type
,
arg
,
arg
->
tname
);
fprintf
(
proxy
,
" *)_StubMsg.Buffer;
\n
"
);
fprintf
(
proxy
,
"_StubMsg.Buffer += sizeof("
);
write_type
(
proxy
,
arg
->
type
,
arg
,
arg
->
tname
);
fprintf
(
proxy
,
"*)_StubMsg.Buffer)++
;
\n
"
);
fprintf
(
proxy
,
")
;
\n
"
);
break
;
case
RPC_FC_STRUCT
:
...
...
@@ -595,9 +601,12 @@ static void gen_proxy(type_t *iface, func_t *cur, int idx)
*/
print_proxy
(
"_StubMsg.Buffer = (unsigned char *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
\n
"
);
print_proxy
(
"_RetVal = *(
(
"
);
print_proxy
(
"_RetVal = *("
);
write_type
(
proxy
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
proxy
,
"*)_StubMsg.Buffer)++;
\n
"
);
fprintf
(
proxy
,
" *)_StubMsg.Buffer;
\n
"
);
fprintf
(
proxy
,
"_StubMsg.Buffer += sizeof("
);
write_type
(
proxy
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
proxy
,
");
\n
"
);
}
indent
--
;
...
...
@@ -798,9 +807,12 @@ static void gen_stub(type_t *iface, func_t *cur, char *cas)
*/
print_proxy
(
"_StubMsg.Buffer = (unsigned char *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
\n
"
);
print_proxy
(
"*(("
);
print_proxy
(
"*("
);
write_type
(
proxy
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
proxy
,
" *)_StubMsg.Buffer = _RetVal;
\n
"
);
fprintf
(
proxy
,
"_StubMsg.Buffer += sizeof("
);
write_type
(
proxy
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
proxy
,
"
*)_StubMsg.Buffer)++ = _RetVal
;
\n
"
);
fprintf
(
proxy
,
"
)
;
\n
"
);
}
indent
--
;
...
...
tools/widl/server.c
View file @
4f462323
...
...
@@ -267,9 +267,12 @@ static void write_function_stubs(type_t *iface)
print_server
(
"_StubMsg.Buffer = (unsigned char *)_pRpcMessage->Buffer;
\n
"
);
fprintf
(
server
,
"
\n
"
);
print_server
(
"*(
(
"
);
print_server
(
"*("
);
write_type
(
server
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
server
,
" *)_StubMsg.Buffer)++ = _RetVal;
\n
"
);
fprintf
(
server
,
" *)_StubMsg.Buffer = _RetVal;
\n
"
);
fprintf
(
server
,
"_StubMsg.Buffer += sizeof("
);
write_type
(
server
,
def
->
type
,
def
,
def
->
tname
);
fprintf
(
server
,
");
\n
"
);
}
indent
--
;
...
...
tools/widl/typegen.c
View file @
4f462323
...
...
@@ -301,11 +301,14 @@ void marshall_arguments(FILE *file, int indent, func_t *func)
if
(
alignment
!=
0
)
print_file
(
file
,
indent
,
"_StubMsg.Buffer += %u;
\n
"
,
alignment
);
print_file
(
file
,
indent
,
"*(
(
"
);
print_file
(
file
,
indent
,
"*("
);
write_type
(
file
,
var
->
type
,
var
,
var
->
tname
);
fprintf
(
file
,
" *)_StubMsg.Buffer
)++
= "
);
fprintf
(
file
,
" *)_StubMsg.Buffer = "
);
write_name
(
file
,
var
);
fprintf
(
file
,
";
\n
"
);
fprintf
(
file
,
"_StubMsg.Buffer += sizeof("
);
write_type
(
file
,
var
->
type
,
var
,
var
->
tname
);
fprintf
(
file
,
");
\n
"
);
fprintf
(
file
,
"
\n
"
);
last_size
=
size
;
...
...
@@ -373,9 +376,12 @@ void unmarshall_arguments(FILE *file, int indent, func_t *func)
print_file
(
file
,
indent
,
""
);
write_name
(
file
,
var
);
fprintf
(
file
,
" = *(("
);
fprintf
(
file
,
" = *("
);
write_type
(
file
,
var
->
type
,
var
,
var
->
tname
);
fprintf
(
file
,
" *)_StubMsg.Buffer;
\n
"
);
fprintf
(
file
,
"_StubMsg.Buffer += sizeof("
);
write_type
(
file
,
var
->
type
,
var
,
var
->
tname
);
fprintf
(
file
,
"
*)_StubMsg.Buffer)++
;
\n
"
);
fprintf
(
file
,
"
)
;
\n
"
);
fprintf
(
file
,
"
\n
"
);
last_size
=
size
;
...
...
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