widl: Don't treat FC_SMALL as FC_SHORT.

FC_SMALL is its own type and is the same size as FC_CHAR, not
FC_SHORT.
This commit is contained in:
Robert Shearman 2005-12-12 12:11:11 +01:00 committed by Alexandre Julliard
parent 6066106bb0
commit f4356a64e3
3 changed files with 13 additions and 1 deletions

View File

@ -221,6 +221,11 @@ void write_type(FILE *h, type_t *t, var_t *v, const char *n)
case RPC_FC_WCHAR: case RPC_FC_WCHAR:
fprintf(h, "WCHAR"); fprintf(h, "WCHAR");
break; break;
case RPC_FC_USMALL:
case RPC_FC_SMALL:
if (t->ref) fprintf(h, t->ref->name);
else fprintf(h, "small");
break;
case RPC_FC_USHORT: case RPC_FC_USHORT:
case RPC_FC_SHORT: case RPC_FC_SHORT:
if (t->ref) fprintf(h, t->ref->name); if (t->ref) fprintf(h, t->ref->name);

View File

@ -585,7 +585,7 @@ m_int:
int_std: tINT { $$ = make_type(RPC_FC_LONG, &std_int); } /* win32 only */ int_std: tINT { $$ = make_type(RPC_FC_LONG, &std_int); } /* win32 only */
| tSHORT m_int { $$ = make_type(RPC_FC_SHORT, NULL); } | tSHORT m_int { $$ = make_type(RPC_FC_SHORT, NULL); }
| tSMALL { $$ = make_type(RPC_FC_SHORT, NULL); } | tSMALL { $$ = make_type(RPC_FC_SMALL, NULL); }
| tLONG m_int { $$ = make_type(RPC_FC_LONG, NULL); } | tLONG m_int { $$ = make_type(RPC_FC_LONG, NULL); }
| tHYPER m_int { $$ = make_type(RPC_FC_HYPER, NULL); } | tHYPER m_int { $$ = make_type(RPC_FC_HYPER, NULL); }
| tINT64 { $$ = make_type(RPC_FC_HYPER, &std_int64); } | tINT64 { $$ = make_type(RPC_FC_HYPER, &std_int64); }

View File

@ -71,6 +71,7 @@ static void write_procformatstring_var(FILE *file, int indent, var_t *var)
CASE_BASETYPE(FC_LONG); CASE_BASETYPE(FC_LONG);
CASE_BASETYPE(FC_HYPER); CASE_BASETYPE(FC_HYPER);
CASE_BASETYPE(FC_IGNORE); CASE_BASETYPE(FC_IGNORE);
CASE_BASETYPE(FC_USMALL);
CASE_BASETYPE(FC_SMALL); CASE_BASETYPE(FC_SMALL);
CASE_BASETYPE(FC_FLOAT); CASE_BASETYPE(FC_FLOAT);
CASE_BASETYPE(FC_DOUBLE); CASE_BASETYPE(FC_DOUBLE);
@ -162,6 +163,8 @@ unsigned int get_required_buffer_size(type_t *type)
case RPC_FC_WCHAR: case RPC_FC_WCHAR:
case RPC_FC_USHORT: case RPC_FC_USHORT:
case RPC_FC_SHORT: case RPC_FC_SHORT:
case RPC_FC_USMALL:
case RPC_FC_SMALL:
case RPC_FC_ULONG: case RPC_FC_ULONG:
case RPC_FC_LONG: case RPC_FC_LONG:
case RPC_FC_FLOAT: case RPC_FC_FLOAT:
@ -198,6 +201,8 @@ void marshall_arguments(FILE *file, int indent, func_t *func)
{ {
case RPC_FC_BYTE: case RPC_FC_BYTE:
case RPC_FC_CHAR: case RPC_FC_CHAR:
case RPC_FC_SMALL:
case RPC_FC_USMALL:
size = 1; size = 1;
alignment = 0; alignment = 0;
break; break;
@ -266,6 +271,8 @@ void unmarshall_arguments(FILE *file, int indent, func_t *func)
{ {
case RPC_FC_BYTE: case RPC_FC_BYTE:
case RPC_FC_CHAR: case RPC_FC_CHAR:
case RPC_FC_SMALL:
case RPC_FC_USMALL:
size = 1; size = 1;
alignment = 0; alignment = 0;
break; break;