Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
362d42e0
Commit
362d42e0
authored
Jan 24, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 24, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Fix the detection of conformant and pointer structs.
parent
8f1ed858
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
14 deletions
+31
-14
header.h
tools/widl/header.h
+12
-0
parser.y
tools/widl/parser.y
+19
-2
typegen.c
tools/widl/typegen.c
+0
-12
No files found.
tools/widl/header.h
View file @
362d42e0
...
...
@@ -45,4 +45,16 @@ extern void write_library(const char *name, attr_t *attr);
extern
void
write_user_types
(
void
);
extern
var_t
*
get_explicit_handle_var
(
func_t
*
func
);
static
inline
int
is_string_type
(
const
attr_t
*
attrs
,
int
ptr_level
,
const
expr_t
*
array
)
{
return
(
is_attr
(
attrs
,
ATTR_STRING
)
&&
((
ptr_level
==
1
&&
!
array
)
||
(
ptr_level
==
0
&&
array
)));
}
static
inline
int
is_array_type
(
const
attr_t
*
attrs
,
int
ptr_level
,
const
expr_t
*
array
)
{
return
((
ptr_level
==
1
&&
!
array
&&
is_attr
(
attrs
,
ATTR_SIZEIS
))
||
(
ptr_level
==
0
&&
array
));
}
#endif
tools/widl/parser.y
View file @
362d42e0
...
...
@@ -1243,7 +1243,7 @@ static int get_struct_type(var_t *field)
int has_conformant_array = 0;
int has_conformant_string = 0;
while (field
)
for (; field; field = NEXT_LINK(field)
)
{
type_t *t = field->type;
...
...
@@ -1251,6 +1251,24 @@ static int get_struct_type(var_t *field)
while( (t->type == 0) && t->ref )
t = t->ref;
if (is_string_type(field->attrs, field->ptr_level, field->array))
{
has_conformant_string = 1;
continue;
}
if (is_array_type(field->attrs, field->ptr_level, field->array))
{
has_conformant_array = 1;
continue;
}
if (field->ptr_level > 0)
{
has_pointer = 1;
continue;
}
switch (t->type)
{
/*
...
...
@@ -1329,7 +1347,6 @@ static int get_struct_type(var_t *field)
case RPC_FC_BOGUS_STRUCT:
return RPC_FC_BOGUS_STRUCT;
}
field = NEXT_LINK(field);
}
if( has_conformant_string && has_pointer )
...
...
tools/widl/typegen.c
View file @
362d42e0
...
...
@@ -91,18 +91,6 @@ static inline int is_base_type(unsigned char type)
}
}
static
inline
int
is_string_type
(
const
attr_t
*
attrs
,
int
ptr_level
,
const
expr_t
*
array
)
{
return
(
is_attr
(
attrs
,
ATTR_STRING
)
&&
((
ptr_level
==
1
&&
!
array
)
||
(
ptr_level
==
0
&&
array
)));
}
static
inline
int
is_array_type
(
const
attr_t
*
attrs
,
int
ptr_level
,
const
expr_t
*
array
)
{
return
((
ptr_level
==
1
&&
!
array
&&
is_attr
(
attrs
,
ATTR_SIZEIS
))
||
(
ptr_level
==
0
&&
array
));
}
static
size_t
write_procformatstring_var
(
FILE
*
file
,
int
indent
,
const
var_t
*
var
,
int
is_return
,
unsigned
int
*
type_offset
)
{
...
...
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