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
767a1f26
Commit
767a1f26
authored
Sep 19, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Sep 20, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Handle top-level conformance for complex arrays.
parent
dbfabf68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
15 deletions
+35
-15
server.c
dlls/rpcrt4/tests/server.c
+15
-0
server.idl
dlls/rpcrt4/tests/server.idl
+1
-0
typegen.c
tools/widl/typegen.c
+19
-15
No files found.
dlls/rpcrt4/tests/server.c
View file @
767a1f26
...
@@ -357,6 +357,16 @@ s_sum_padded2(padded_t ps[2])
...
@@ -357,6 +357,16 @@ s_sum_padded2(padded_t ps[2])
}
}
int
int
s_sum_padded_conf
(
padded_t
*
ps
,
int
n
)
{
int
sum
=
0
;
int
i
;
for
(
i
=
0
;
i
<
n
;
++
i
)
sum
+=
s_sum_padded
(
&
ps
[
i
]);
return
sum
;
}
int
s_sum_bogus
(
bogus_t
*
b
)
s_sum_bogus
(
bogus_t
*
b
)
{
{
return
*
b
->
h
.
p1
+
*
b
->
p2
+
*
b
->
p3
+
b
->
c
;
return
*
b
->
h
.
p1
+
*
b
->
p2
+
*
b
->
p3
+
b
->
c
;
...
@@ -501,6 +511,11 @@ basic_tests(void)
...
@@ -501,6 +511,11 @@ basic_tests(void)
padded2
[
1
].
i
=
3
;
padded2
[
1
].
i
=
3
;
padded2
[
1
].
c
=
7
;
padded2
[
1
].
c
=
7
;
ok
(
sum_padded2
(
padded2
)
==
6
,
"RPC sum_padded2
\n
"
);
ok
(
sum_padded2
(
padded2
)
==
6
,
"RPC sum_padded2
\n
"
);
padded2
[
0
].
i
=
-
5
;
padded2
[
0
].
c
=
1
;
padded2
[
1
].
i
=
3
;
padded2
[
1
].
c
=
7
;
ok
(
sum_padded_conf
(
padded2
,
2
)
==
6
,
"RPC sum_padded_conf
\n
"
);
i1
=
14
;
i1
=
14
;
i2
=
-
7
;
i2
=
-
7
;
...
...
dlls/rpcrt4/tests/server.idl
View file @
767a1f26
...
@@ -208,6 +208,7 @@ interface IServer
...
@@ -208,6 +208,7 @@ interface IServer
int sum_padded(padded_t *p);
int sum_padded(padded_t *p);
int sum_padded2(padded_t ps[2]);
int sum_padded2(padded_t ps[2]);
int sum_padded_conf([size_is(n)] padded_t *ps, int n);
typedef struct
typedef struct
{
{
...
...
tools/widl/typegen.c
View file @
767a1f26
...
@@ -2580,11 +2580,9 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func,
...
@@ -2580,11 +2580,9 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func,
else
if
(
is_array
(
type
))
else
if
(
is_array
(
type
))
{
{
unsigned
char
tc
=
type
->
type
;
unsigned
char
tc
=
type
->
type
;
const
char
*
array_type
;
const
char
*
array_type
=
"FixedArray"
;
if
(
tc
==
RPC_FC_SMFARRAY
||
tc
==
RPC_FC_LGFARRAY
)
if
(
tc
==
RPC_FC_SMVARRAY
||
tc
==
RPC_FC_LGVARRAY
)
array_type
=
"FixedArray"
;
else
if
(
tc
==
RPC_FC_SMVARRAY
||
tc
==
RPC_FC_LGVARRAY
)
{
{
if
(
is_size_needed_for_phase
(
phase
))
if
(
is_size_needed_for_phase
(
phase
))
{
{
...
@@ -2605,22 +2603,28 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func,
...
@@ -2605,22 +2603,28 @@ void write_remoting_arguments(FILE *file, int indent, const func_t *func,
}
}
array_type
=
"ConformantArray"
;
array_type
=
"ConformantArray"
;
}
}
else
if
(
tc
==
RPC_FC_CVARRAY
)
else
if
(
tc
==
RPC_FC_CVARRAY
||
tc
==
RPC_FC_BOGUS_ARRAY
)
{
{
if
(
is_size_needed_for_phase
(
phase
))
if
(
is_size_needed_for_phase
(
phase
))
{
{
print_file
(
file
,
indent
,
"_StubMsg.MaxCount = (unsigned long)"
);
if
(
type
->
size_is
)
write_expr
(
file
,
type
->
size_is
,
1
);
{
fprintf
(
file
,
";
\n
"
);
print_file
(
file
,
indent
,
"_StubMsg.MaxCount = (unsigned long)"
);
print_file
(
file
,
indent
,
"_StubMsg.Offset = (unsigned long)0;
\n
"
);
/* FIXME */
write_expr
(
file
,
type
->
size_is
,
1
);
print_file
(
file
,
indent
,
"_StubMsg.ActualCount = (unsigned long)"
);
fprintf
(
file
,
";
\n
"
);
write_expr
(
file
,
type
->
length_is
,
1
);
}
fprintf
(
file
,
";
\n\n
"
);
if
(
type
->
length_is
)
{
print_file
(
file
,
indent
,
"_StubMsg.Offset = (unsigned long)0;
\n
"
);
/* FIXME */
print_file
(
file
,
indent
,
"_StubMsg.ActualCount = (unsigned long)"
);
write_expr
(
file
,
type
->
length_is
,
1
);
fprintf
(
file
,
";
\n\n
"
);
}
}
}
array_type
=
"ConformantVaryingArray"
;
array_type
=
(
tc
==
RPC_FC_BOGUS_ARRAY
?
"ComplexArray"
:
"ConformantVaryingArray"
);
}
}
else
array_type
=
"ComplexArray"
;
if
(
!
in_attr
&&
phase
==
PHASE_FREE
)
if
(
!
in_attr
&&
phase
==
PHASE_FREE
)
{
{
...
...
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