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
6dd5afd7
Commit
6dd5afd7
authored
Jan 24, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Export a function to compute the proc format string size for a function.
parent
6655071a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
25 deletions
+23
-25
server.c
tools/widl/server.c
+1
-9
typegen.c
tools/widl/typegen.c
+21
-16
typegen.h
tools/widl/typegen.h
+1
-0
No files found.
tools/widl/server.c
View file @
6dd5afd7
...
...
@@ -270,15 +270,7 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset, unsig
fprintf
(
server
,
"
\n
"
);
/* update proc_offset */
if
(
func
->
args
)
{
LIST_FOR_EACH_ENTRY
(
var
,
func
->
args
,
const
var_t
,
entry
)
*
proc_offset
+=
get_size_procformatstring_var
(
var
);
}
if
(
!
is_void
(
def
->
type
,
NULL
))
*
proc_offset
+=
get_size_procformatstring_var
(
def
);
else
*
proc_offset
+=
2
;
/* FC_END and FC_PAD */
*
proc_offset
+=
get_size_procformatstring_func
(
func
);
}
}
...
...
tools/widl/typegen.c
View file @
6dd5afd7
...
...
@@ -1971,6 +1971,25 @@ size_t get_size_procformatstring_var(const var_t *var)
}
size_t
get_size_procformatstring_func
(
const
func_t
*
func
)
{
const
var_t
*
var
;
size_t
size
=
0
;
/* argument list size */
if
(
func
->
args
)
LIST_FOR_EACH_ENTRY
(
var
,
func
->
args
,
const
var_t
,
entry
)
size
+=
get_size_procformatstring_var
(
var
);
/* return value size */
if
(
is_void
(
func
->
def
->
type
,
NULL
))
size
+=
2
;
/* FC_END and FC_PAD */
else
size
+=
get_size_procformatstring_var
(
func
->
def
);
return
size
;
}
size_t
get_size_typeformatstring_var
(
const
var_t
*
var
)
{
unsigned
int
type_offset
=
0
;
...
...
@@ -1983,7 +2002,6 @@ size_t get_size_procformatstring(const ifref_list_t *ifaces, int for_objects)
const
ifref_t
*
iface
;
size_t
size
=
1
;
const
func_t
*
func
;
const
var_t
*
var
;
if
(
ifaces
)
LIST_FOR_EACH_ENTRY
(
iface
,
ifaces
,
const
ifref_t
,
entry
)
{
...
...
@@ -1991,22 +2009,9 @@ size_t get_size_procformatstring(const ifref_list_t *ifaces, int for_objects)
continue
;
if
(
iface
->
iface
->
funcs
)
{
LIST_FOR_EACH_ENTRY
(
func
,
iface
->
iface
->
funcs
,
const
func_t
,
entry
)
{
/* argument list size */
if
(
func
->
args
)
LIST_FOR_EACH_ENTRY
(
var
,
func
->
args
,
const
var_t
,
entry
)
size
+=
get_size_procformatstring_var
(
var
);
var
=
func
->
def
;
/* return value size */
if
(
is_void
(
var
->
type
,
NULL
))
size
+=
2
;
else
size
+=
get_size_procformatstring_var
(
var
);
}
}
if
(
!
is_local
(
func
->
def
->
attrs
))
size
+=
get_size_procformatstring_func
(
func
);
}
return
size
;
}
...
...
tools/widl/typegen.h
View file @
6dd5afd7
...
...
@@ -42,6 +42,7 @@ size_t get_type_memsize(const type_t *type);
void
print_phase_basetype
(
FILE
*
file
,
int
indent
,
enum
remoting_phase
phase
,
enum
pass
pass
,
const
var_t
*
var
,
const
char
*
varname
);
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_procformatstring_func
(
const
func_t
*
func
);
size_t
get_size_typeformatstring_var
(
const
var_t
*
var
);
size_t
get_size_procformatstring
(
const
ifref_list_t
*
ifaces
,
int
for_objects
);
size_t
get_size_typeformatstring
(
const
ifref_list_t
*
ifaces
,
int
for_objects
);
...
...
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