widl: Make structures with FC_ENUM16 fields complex.
Structures containing enum fields without the v1_enum attribute must be treated as complex because of the range check and memory/wire size differences. This includes a test which didn't pass before and now passes on Wine and Windows.
This commit is contained in:
parent
629a29d81e
commit
2fa83d94c8
|
@ -333,6 +333,12 @@ s_square_encu(encu_t *eu)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
s_check_se2(se_t *s)
|
||||
{
|
||||
ok(s->f == E2, "check_se2\n");
|
||||
}
|
||||
|
||||
int
|
||||
s_sum_parr(int *a[3])
|
||||
{
|
||||
|
@ -705,6 +711,7 @@ basic_tests(void)
|
|||
str_struct_t ss = {string};
|
||||
wstr_struct_t ws = {wstring};
|
||||
str_t str;
|
||||
se_t se;
|
||||
|
||||
ok(int_return() == INT_CODE, "RPC int_return\n");
|
||||
|
||||
|
@ -774,6 +781,9 @@ basic_tests(void)
|
|||
ok(enum_ord(E3) == 3, "RPC enum_ord\n");
|
||||
ok(enum_ord(E4) == 4, "RPC enum_ord\n");
|
||||
|
||||
se.f = E2;
|
||||
check_se2(&se);
|
||||
|
||||
memset(&aligns, 0, sizeof(aligns));
|
||||
aligns.c = 3;
|
||||
aligns.i = 4;
|
||||
|
|
|
@ -209,11 +209,17 @@ cpp_quote("#endif")
|
|||
case E2: float f2;
|
||||
} encue_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
e_t f;
|
||||
} se_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);
|
||||
double square_encue(encue_t *eue);
|
||||
void check_se2(se_t *s);
|
||||
|
||||
int sum_toplev_conf_2n([size_is(n * 2)] int *x, int n);
|
||||
int sum_toplev_conf_cond([size_is(c ? a : b)] int *x, int a, int b, int c);
|
||||
|
|
|
@ -1856,7 +1856,6 @@ static int get_struct_type(var_list_t *fields)
|
|||
case RPC_FC_FLOAT:
|
||||
case RPC_FC_DOUBLE:
|
||||
case RPC_FC_STRUCT:
|
||||
case RPC_FC_ENUM16:
|
||||
case RPC_FC_ENUM32:
|
||||
break;
|
||||
|
||||
|
@ -1907,6 +1906,7 @@ static int get_struct_type(var_list_t *fields)
|
|||
case RPC_FC_ENCAPSULATED_UNION:
|
||||
case RPC_FC_NON_ENCAPSULATED_UNION:
|
||||
case RPC_FC_BOGUS_STRUCT:
|
||||
case RPC_FC_ENUM16:
|
||||
return RPC_FC_BOGUS_STRUCT;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue