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
d9c12049
Commit
d9c12049
authored
May 11, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
May 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Handle pointers fields that point to structures.
parent
faf50715
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
server.c
dlls/rpcrt4/tests/server.c
+9
-0
server.idl
dlls/rpcrt4/tests/server.idl
+7
-0
typegen.c
tools/widl/typegen.c
+7
-2
No files found.
dlls/rpcrt4/tests/server.c
View file @
d9c12049
...
...
@@ -126,6 +126,12 @@ s_ptypes_sum(ptypes_t *pt)
return
*
pt
->
pc
+
*
pt
->
ps
+
*
pt
->
pl
+
*
pt
->
pf
+
*
pt
->
pd
;
}
int
s_dot_pvectors
(
pvectors_t
*
p
)
{
return
p
->
pu
->
x
*
(
*
p
->
pv
)
->
x
+
p
->
pu
->
y
*
(
*
p
->
pv
)
->
y
+
p
->
pu
->
z
*
(
*
p
->
pv
)
->
z
;
}
void
s_stop
(
void
)
{
...
...
@@ -167,6 +173,8 @@ basic_tests(void)
static
char
string
[]
=
"I am a string"
;
static
int
f
[
5
]
=
{
1
,
3
,
0
,
-
2
,
-
4
};
static
vector_t
a
=
{
1
,
3
,
7
};
static
vector_t
vec1
=
{
4
,
-
2
,
1
},
vec2
=
{
-
5
,
2
,
3
},
*
pvec2
=
&
vec2
;
static
pvectors_t
pvecs
=
{
&
vec1
,
&
pvec2
};
pints_t
pints
;
ptypes_t
ptypes
;
int
i1
,
i2
,
i3
,
*
pi2
,
*
pi3
,
**
ppi3
;
...
...
@@ -231,6 +239,7 @@ basic_tests(void)
ptypes
.
pd
=
&
u
;
ok
(
ptypes_sum
(
&
ptypes
)
==
33
.
0
,
"RPC ptypes_sum
\n
"
);
ok
(
dot_pvectors
(
&
pvecs
)
==
-
21
,
"RPC dot_pvectors
\n
"
);
ok
(
sum_fixed_array
(
f
)
==
-
2
,
"RPC sum_fixed_array
\n
"
);
}
...
...
dlls/rpcrt4/tests/server.idl
View file @
d9c12049
...
...
@@ -47,6 +47,12 @@ interface IServer
double
*
pd
;
}
ptypes_t
;
typedef
struct
{
vector_t
*
pu
;
vector_t
**
pv
;
}
pvectors_t
;
int
int_return
(
void
)
;
int
square
(
int
x
)
;
int
sum
(
int
x
,
int
y
)
;
...
...
@@ -60,5 +66,6 @@ interface IServer
int
sum_fixed_array
(
int
a
[
5
]
)
;
int
pints_sum
(
pints_t
*
pints
)
;
double
ptypes_sum
(
ptypes_t
*
ptypes
)
;
int
dot_pvectors
(
pvectors_t
*
pvectors
)
;
void
stop
(
void
)
;
}
tools/widl/typegen.c
View file @
d9c12049
...
...
@@ -675,8 +675,10 @@ static size_t write_nonsimple_pointer(FILE *file, const type_t *type, size_t off
{
short
absoff
=
type
->
ref
->
typestring_offset
;
short
reloff
=
absoff
-
(
offset
+
2
);
print_file
(
file
,
2
,
"0x%02x, 0x10,
\t
/* %s */
\n
"
,
type
->
type
,
string_of_type
(
type
->
type
));
int
ptr_attr
=
is_ptr
(
type
->
ref
)
?
0x10
:
0x0
;
print_file
(
file
,
2
,
"0x%02x, 0x%x,
\t
/* %s */
\n
"
,
type
->
type
,
ptr_attr
,
string_of_type
(
type
->
type
));
print_file
(
file
,
2
,
"NdrFcShort(0x%hx),
\t
/* Offset= %hd (%hd) */
\n
"
,
reloff
,
reloff
,
absoff
);
return
4
;
...
...
@@ -1207,6 +1209,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
write_pointers
(
file
,
NULL
,
type
,
NULL
,
0
,
typestring_offset
);
start_offset
=
*
typestring_offset
;
type
->
typestring_offset
=
start_offset
;
if
(
type
->
type
==
RPC_FC_STRUCT
)
WRITE_FCTYPE
(
file
,
FC_STRUCT
,
*
typestring_offset
);
else
...
...
@@ -1249,6 +1252,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
write_pointers
(
file
,
NULL
,
type
,
NULL
,
0
,
typestring_offset
);
start_offset
=
*
typestring_offset
;
type
->
typestring_offset
=
start_offset
;
if
(
type
->
type
==
RPC_FC_CSTRUCT
)
WRITE_FCTYPE
(
file
,
FC_CSTRUCT
,
*
typestring_offset
);
else
...
...
@@ -1300,6 +1304,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
has_pointers
=
write_pointers
(
file
,
NULL
,
type
,
NULL
,
0
,
typestring_offset
);
start_offset
=
*
typestring_offset
;
type
->
typestring_offset
=
start_offset
;
WRITE_FCTYPE
(
file
,
FC_CVSTRUCT
,
*
typestring_offset
);
/* alignment */
print_file
(
file
,
2
,
"0x%02x,
\n
"
,
align
-
1
);
...
...
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