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)
...
@@ -126,6 +126,12 @@ s_ptypes_sum(ptypes_t *pt)
return
*
pt
->
pc
+
*
pt
->
ps
+
*
pt
->
pl
+
*
pt
->
pf
+
*
pt
->
pd
;
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
void
s_stop
(
void
)
s_stop
(
void
)
{
{
...
@@ -167,6 +173,8 @@ basic_tests(void)
...
@@ -167,6 +173,8 @@ basic_tests(void)
static
char
string
[]
=
"I am a string"
;
static
char
string
[]
=
"I am a string"
;
static
int
f
[
5
]
=
{
1
,
3
,
0
,
-
2
,
-
4
};
static
int
f
[
5
]
=
{
1
,
3
,
0
,
-
2
,
-
4
};
static
vector_t
a
=
{
1
,
3
,
7
};
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
;
pints_t
pints
;
ptypes_t
ptypes
;
ptypes_t
ptypes
;
int
i1
,
i2
,
i3
,
*
pi2
,
*
pi3
,
**
ppi3
;
int
i1
,
i2
,
i3
,
*
pi2
,
*
pi3
,
**
ppi3
;
...
@@ -231,6 +239,7 @@ basic_tests(void)
...
@@ -231,6 +239,7 @@ basic_tests(void)
ptypes
.
pd
=
&
u
;
ptypes
.
pd
=
&
u
;
ok
(
ptypes_sum
(
&
ptypes
)
==
33
.
0
,
"RPC ptypes_sum
\n
"
);
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
"
);
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
...
@@ -47,6 +47,12 @@ interface IServer
double
*
pd
;
double
*
pd
;
}
ptypes_t
;
}
ptypes_t
;
typedef
struct
{
vector_t
*
pu
;
vector_t
**
pv
;
}
pvectors_t
;
int
int_return
(
void
)
;
int
int_return
(
void
)
;
int
square
(
int
x
)
;
int
square
(
int
x
)
;
int
sum
(
int
x
,
int
y
)
;
int
sum
(
int
x
,
int
y
)
;
...
@@ -60,5 +66,6 @@ interface IServer
...
@@ -60,5 +66,6 @@ interface IServer
int
sum_fixed_array
(
int
a
[
5
]
)
;
int
sum_fixed_array
(
int
a
[
5
]
)
;
int
pints_sum
(
pints_t
*
pints
)
;
int
pints_sum
(
pints_t
*
pints
)
;
double
ptypes_sum
(
ptypes_t
*
ptypes
)
;
double
ptypes_sum
(
ptypes_t
*
ptypes
)
;
int
dot_pvectors
(
pvectors_t
*
pvectors
)
;
void
stop
(
void
)
;
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
...
@@ -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
absoff
=
type
->
ref
->
typestring_offset
;
short
reloff
=
absoff
-
(
offset
+
2
);
short
reloff
=
absoff
-
(
offset
+
2
);
print_file
(
file
,
2
,
"0x%02x, 0x10,
\t
/* %s */
\n
"
,
int
ptr_attr
=
is_ptr
(
type
->
ref
)
?
0x10
:
0x0
;
type
->
type
,
string_of_type
(
type
->
type
));
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
"
,
print_file
(
file
,
2
,
"NdrFcShort(0x%hx),
\t
/* Offset= %hd (%hd) */
\n
"
,
reloff
,
reloff
,
absoff
);
reloff
,
reloff
,
absoff
);
return
4
;
return
4
;
...
@@ -1207,6 +1209,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
...
@@ -1207,6 +1209,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
write_pointers
(
file
,
NULL
,
type
,
NULL
,
0
,
typestring_offset
);
write_pointers
(
file
,
NULL
,
type
,
NULL
,
0
,
typestring_offset
);
start_offset
=
*
typestring_offset
;
start_offset
=
*
typestring_offset
;
type
->
typestring_offset
=
start_offset
;
if
(
type
->
type
==
RPC_FC_STRUCT
)
if
(
type
->
type
==
RPC_FC_STRUCT
)
WRITE_FCTYPE
(
file
,
FC_STRUCT
,
*
typestring_offset
);
WRITE_FCTYPE
(
file
,
FC_STRUCT
,
*
typestring_offset
);
else
else
...
@@ -1249,6 +1252,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
...
@@ -1249,6 +1252,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
write_pointers
(
file
,
NULL
,
type
,
NULL
,
0
,
typestring_offset
);
write_pointers
(
file
,
NULL
,
type
,
NULL
,
0
,
typestring_offset
);
start_offset
=
*
typestring_offset
;
start_offset
=
*
typestring_offset
;
type
->
typestring_offset
=
start_offset
;
if
(
type
->
type
==
RPC_FC_CSTRUCT
)
if
(
type
->
type
==
RPC_FC_CSTRUCT
)
WRITE_FCTYPE
(
file
,
FC_CSTRUCT
,
*
typestring_offset
);
WRITE_FCTYPE
(
file
,
FC_CSTRUCT
,
*
typestring_offset
);
else
else
...
@@ -1300,6 +1304,7 @@ static size_t write_struct_tfs(FILE *file, type_t *type,
...
@@ -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
);
has_pointers
=
write_pointers
(
file
,
NULL
,
type
,
NULL
,
0
,
typestring_offset
);
start_offset
=
*
typestring_offset
;
start_offset
=
*
typestring_offset
;
type
->
typestring_offset
=
start_offset
;
WRITE_FCTYPE
(
file
,
FC_CVSTRUCT
,
*
typestring_offset
);
WRITE_FCTYPE
(
file
,
FC_CVSTRUCT
,
*
typestring_offset
);
/* alignment */
/* alignment */
print_file
(
file
,
2
,
"0x%02x,
\n
"
,
align
-
1
);
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