Commit 4339f9ed authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Implement __int3264 keyword.

parent 4383d47e
...@@ -297,15 +297,19 @@ static int is_integer_type(const type_t *type) ...@@ -297,15 +297,19 @@ static int is_integer_type(const type_t *type)
case TYPE_BASIC_INT32: case TYPE_BASIC_INT32:
case TYPE_BASIC_INT64: case TYPE_BASIC_INT64:
case TYPE_BASIC_INT: case TYPE_BASIC_INT:
case TYPE_BASIC_INT3264:
case TYPE_BASIC_CHAR: case TYPE_BASIC_CHAR:
case TYPE_BASIC_HYPER: case TYPE_BASIC_HYPER:
case TYPE_BASIC_BYTE: case TYPE_BASIC_BYTE:
case TYPE_BASIC_WCHAR: case TYPE_BASIC_WCHAR:
case TYPE_BASIC_ERROR_STATUS_T: case TYPE_BASIC_ERROR_STATUS_T:
return TRUE; return TRUE;
default: case TYPE_BASIC_FLOAT:
case TYPE_BASIC_DOUBLE:
case TYPE_BASIC_HANDLE:
return FALSE; return FALSE;
} }
return FALSE;
default: default:
return FALSE; return FALSE;
} }
......
...@@ -265,6 +265,7 @@ void write_type_left(FILE *h, type_t *t, int declonly) ...@@ -265,6 +265,7 @@ void write_type_left(FILE *h, type_t *t, int declonly)
case TYPE_BASIC_INT16: fprintf(h, "short"); break; case TYPE_BASIC_INT16: fprintf(h, "short"); break;
case TYPE_BASIC_INT: fprintf(h, "int"); break; case TYPE_BASIC_INT: fprintf(h, "int"); break;
case TYPE_BASIC_INT64: fprintf(h, "__int64"); break; case TYPE_BASIC_INT64: fprintf(h, "__int64"); break;
case TYPE_BASIC_INT3264: fprintf(h, "__int3264"); break;
case TYPE_BASIC_BYTE: fprintf(h, "byte"); break; case TYPE_BASIC_BYTE: fprintf(h, "byte"); break;
case TYPE_BASIC_CHAR: fprintf(h, "char"); break; case TYPE_BASIC_CHAR: fprintf(h, "char"); break;
case TYPE_BASIC_WCHAR: fprintf(h, "wchar_t"); break; case TYPE_BASIC_WCHAR: fprintf(h, "wchar_t"); break;
......
...@@ -220,6 +220,7 @@ static const struct keyword keywords[] = { ...@@ -220,6 +220,7 @@ static const struct keyword keywords[] = {
{"TRUE", tTRUE}, {"TRUE", tTRUE},
{"__cdecl", tCDECL}, {"__cdecl", tCDECL},
{"__fastcall", tFASTCALL}, {"__fastcall", tFASTCALL},
{"__int3264", tINT3264},
{"__int64", tINT64}, {"__int64", tINT64},
{"__pascal", tPASCAL}, {"__pascal", tPASCAL},
{"__stdcall", tSTDCALL}, {"__stdcall", tSTDCALL},
......
...@@ -224,7 +224,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s ...@@ -224,7 +224,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
%token tIMPORT tIMPORTLIB %token tIMPORT tIMPORTLIB
%token tIN tIN_LINE tINLINE %token tIN tIN_LINE tINLINE
%token tINPUTSYNC %token tINPUTSYNC
%token tINT tINT64 %token tINT tINT3264 tINT64
%token tINTERFACE %token tINTERFACE
%token tLCID %token tLCID
%token tLENGTHIS tLIBRARY %token tLENGTHIS tLIBRARY
...@@ -767,6 +767,7 @@ int_std: tINT { $$ = type_new_int(TYPE_BASIC_INT, 0); } ...@@ -767,6 +767,7 @@ int_std: tINT { $$ = type_new_int(TYPE_BASIC_INT, 0); }
| tHYPER m_int { $$ = type_new_int(TYPE_BASIC_HYPER, 0); } | tHYPER m_int { $$ = type_new_int(TYPE_BASIC_HYPER, 0); }
| tINT64 { $$ = type_new_int(TYPE_BASIC_INT64, 0); } | tINT64 { $$ = type_new_int(TYPE_BASIC_INT64, 0); }
| tCHAR { $$ = type_new_int(TYPE_BASIC_CHAR, 0); } | tCHAR { $$ = type_new_int(TYPE_BASIC_CHAR, 0); }
| tINT3264 { $$ = type_new_int(TYPE_BASIC_INT3264, 0); }
; ;
coclass: tCOCLASS aIDENTIFIER { $$ = type_new_coclass($2); } coclass: tCOCLASS aIDENTIFIER { $$ = type_new_coclass($2); }
...@@ -1281,6 +1282,7 @@ static int is_allowed_range_type(const type_t *type) ...@@ -1281,6 +1282,7 @@ static int is_allowed_range_type(const type_t *type)
case TYPE_BASIC_INT32: case TYPE_BASIC_INT32:
case TYPE_BASIC_INT64: case TYPE_BASIC_INT64:
case TYPE_BASIC_INT: case TYPE_BASIC_INT:
case TYPE_BASIC_INT3264:
case TYPE_BASIC_BYTE: case TYPE_BASIC_BYTE:
case TYPE_BASIC_CHAR: case TYPE_BASIC_CHAR:
case TYPE_BASIC_WCHAR: case TYPE_BASIC_WCHAR:
......
...@@ -181,6 +181,21 @@ unsigned short get_type_vt(type_t *t) ...@@ -181,6 +181,21 @@ unsigned short get_type_vt(type_t *t)
return VT_UI8; return VT_UI8;
else else
return VT_I8; return VT_I8;
case TYPE_BASIC_INT3264:
if (typelib_kind == SYS_WIN64)
{
if (type_basic_get_sign(t) > 0)
return VT_UI8;
else
return VT_I8;
}
else
{
if (type_basic_get_sign(t) > 0)
return VT_UI4;
else
return VT_I4;
}
case TYPE_BASIC_FLOAT: case TYPE_BASIC_FLOAT:
return VT_R4; return VT_R4;
case TYPE_BASIC_DOUBLE: case TYPE_BASIC_DOUBLE:
......
...@@ -61,6 +61,8 @@ enum VARENUM { ...@@ -61,6 +61,8 @@ enum VARENUM {
VT_LPSTR = 30, VT_LPSTR = 30,
VT_LPWSTR = 31, VT_LPWSTR = 31,
VT_RECORD = 36, VT_RECORD = 36,
VT_INT_PTR = 37,
VT_UINT_PTR = 38,
VT_FILETIME = 64, VT_FILETIME = 64,
VT_BLOB = 65, VT_BLOB = 65,
VT_STREAM = 66, VT_STREAM = 66,
...@@ -70,6 +72,7 @@ enum VARENUM { ...@@ -70,6 +72,7 @@ enum VARENUM {
VT_BLOB_OBJECT = 70, VT_BLOB_OBJECT = 70,
VT_CF = 71, VT_CF = 71,
VT_CLSID = 72, VT_CLSID = 72,
VT_VERSIONED_STREAM = 73,
VT_BSTR_BLOB = 0xfff, VT_BSTR_BLOB = 0xfff,
VT_VECTOR = 0x1000, VT_VECTOR = 0x1000,
VT_ARRAY = 0x2000, VT_ARRAY = 0x2000,
......
...@@ -230,6 +230,7 @@ enum type_basic_type ...@@ -230,6 +230,7 @@ enum type_basic_type
TYPE_BASIC_INT32, TYPE_BASIC_INT32,
TYPE_BASIC_INT64, TYPE_BASIC_INT64,
TYPE_BASIC_INT, TYPE_BASIC_INT,
TYPE_BASIC_INT3264,
TYPE_BASIC_CHAR, TYPE_BASIC_CHAR,
TYPE_BASIC_HYPER, TYPE_BASIC_HYPER,
TYPE_BASIC_BYTE, TYPE_BASIC_BYTE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment