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
512c36ca
Commit
512c36ca
authored
Jun 25, 2007
by
Dan Hipschman
Committed by
Alexandre Julliard
Jun 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Get simple enums working.
parent
ab22b4b3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
0 deletions
+32
-0
server.c
dlls/rpcrt4/tests/server.c
+19
-0
server.idl
dlls/rpcrt4/tests/server.idl
+9
-0
typegen.c
tools/widl/typegen.c
+4
-0
No files found.
dlls/rpcrt4/tests/server.c
View file @
512c36ca
...
...
@@ -272,6 +272,20 @@ s_sum_pcarr(int *a[], int n)
return
s
;
}
int
s_enum_ord
(
e_t
e
)
{
switch
(
e
)
{
case
E1
:
return
1
;
case
E2
:
return
2
;
case
E3
:
return
3
;
case
E4
:
return
4
;
default:
return
0
;
}
}
void
s_stop
(
void
)
{
...
...
@@ -385,6 +399,11 @@ basic_tests(void)
ok
(
dot_copy_vectors
(
vec1
,
vec2
)
==
-
21
,
"RPC dot_copy_vectors
\n
"
);
ok
(
sum_fixed_array
(
f
)
==
-
2
,
"RPC sum_fixed_array
\n
"
);
ok
(
sum_sp
(
&
sp
)
==
29
,
"RPC sum_sp
\n
"
);
ok
(
enum_ord
(
E1
)
==
1
,
"RPC enum_ord
\n
"
);
ok
(
enum_ord
(
E2
)
==
2
,
"RPC enum_ord
\n
"
);
ok
(
enum_ord
(
E3
)
==
3
,
"RPC enum_ord
\n
"
);
ok
(
enum_ord
(
E4
)
==
4
,
"RPC enum_ord
\n
"
);
}
static
void
...
...
dlls/rpcrt4/tests/server.idl
View file @
512c36ca
...
...
@@ -157,8 +157,17 @@ interface IServer
case ENCU_F: float f;
} encu_t;
typedef enum
{
E1 = 23,
E2 = 4,
E3 = 0,
E4 = 64
} e_t;
double square_encu(encu_t *eu);
int sum_parr(int *a[3]);
int sum_pcarr([size_is(n)] int *a[], int n);
int enum_ord(e_t e);
void stop(void);
}
tools/widl/typegen.c
View file @
512c36ca
...
...
@@ -2122,12 +2122,14 @@ static unsigned int get_required_buffer_size_type(
case
RPC_FC_WCHAR
:
case
RPC_FC_USHORT
:
case
RPC_FC_SHORT
:
case
RPC_FC_ENUM16
:
*
alignment
=
4
;
size
=
2
;
break
;
case
RPC_FC_ULONG
:
case
RPC_FC_LONG
:
case
RPC_FC_ENUM32
:
case
RPC_FC_FLOAT
:
case
RPC_FC_ERROR_STATUS_T
:
*
alignment
=
4
;
...
...
@@ -2344,12 +2346,14 @@ void print_phase_basetype(FILE *file, int indent, enum remoting_phase phase,
case
RPC_FC_WCHAR
:
case
RPC_FC_USHORT
:
case
RPC_FC_SHORT
:
case
RPC_FC_ENUM16
:
size
=
2
;
alignment
=
2
;
break
;
case
RPC_FC_ULONG
:
case
RPC_FC_LONG
:
case
RPC_FC_ENUM32
:
case
RPC_FC_FLOAT
:
case
RPC_FC_ERROR_STATUS_T
:
size
=
4
;
...
...
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