Commit a8a03eb3 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

jscript: Use wide-char string literals in struct initialization.

parent aa90a596
......@@ -31,9 +31,6 @@ typedef struct {
BOOL val;
} BoolInstance;
static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0};
static const WCHAR valueOfW[] = {'v','a','l','u','e','O','f',0};
static inline BoolInstance *bool_from_jsdisp(jsdisp_t *jsdisp)
{
return CONTAINING_RECORD(jsdisp, BoolInstance, dispex);
......@@ -114,8 +111,8 @@ static HRESULT Bool_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsign
}
static const builtin_prop_t Bool_props[] = {
{toStringW, Bool_toString, PROPF_METHOD},
{valueOfW, Bool_valueOf, PROPF_METHOD}
{L"toString", Bool_toString, PROPF_METHOD},
{L"valueOf", Bool_valueOf, PROPF_METHOD}
};
static const builtin_info_t Bool_info = {
......
......@@ -33,11 +33,6 @@ typedef struct {
BOOL atend;
} EnumeratorInstance;
static const WCHAR atEndW[] = {'a','t','E','n','d',0};
static const WCHAR itemW[] = {'i','t','e','m',0};
static const WCHAR moveFirstW[] = {'m','o','v','e','F','i','r','s','t',0};
static const WCHAR moveNextW[] = {'m','o','v','e','N','e','x','t',0};
static inline EnumeratorInstance *enumerator_from_jsdisp(jsdisp_t *jsdisp)
{
return CONTAINING_RECORD(jsdisp, EnumeratorInstance, dispex);
......@@ -177,10 +172,10 @@ static HRESULT Enumerator_moveNext(script_ctx_t *ctx, vdisp_t *jsthis, WORD flag
}
static const builtin_prop_t Enumerator_props[] = {
{atEndW, Enumerator_atEnd, PROPF_METHOD},
{itemW, Enumerator_item, PROPF_METHOD},
{moveFirstW, Enumerator_moveFirst, PROPF_METHOD},
{moveNextW, Enumerator_moveNext, PROPF_METHOD},
{L"atEnd", Enumerator_atEnd, PROPF_METHOD},
{L"item", Enumerator_item, PROPF_METHOD},
{L"moveFirst", Enumerator_moveFirst, PROPF_METHOD},
{L"moveNext", Enumerator_moveNext, PROPF_METHOD},
};
static const builtin_info_t Enumerator_info = {
......
......@@ -32,7 +32,6 @@ static const WCHAR descriptionW[] = {'d','e','s','c','r','i','p','t','i','o','n'
static const WCHAR messageW[] = {'m','e','s','s','a','g','e',0};
static const WCHAR nameW[] = {'n','a','m','e',0};
static const WCHAR numberW[] = {'n','u','m','b','e','r',0};
static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0};
/* ECMA-262 3rd Edition 15.11.4.4 */
static HRESULT Error_toString(script_ctx_t *ctx, vdisp_t *vthis, WORD flags,
......@@ -139,7 +138,7 @@ static HRESULT Error_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags,
}
static const builtin_prop_t Error_props[] = {
{toStringW, Error_toString, PROPF_METHOD}
{L"toString", Error_toString, PROPF_METHOD}
};
static const builtin_info_t Error_info = {
......
......@@ -95,10 +95,6 @@ static inline ArgumentsInstance *arguments_from_jsdisp(jsdisp_t *jsdisp)
static const WCHAR prototypeW[] = {'p','r','o','t','o','t', 'y', 'p','e',0};
static const WCHAR lengthW[] = {'l','e','n','g','t','h',0};
static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0};
static const WCHAR applyW[] = {'a','p','p','l','y',0};
static const WCHAR bindW[] = {'b','i','n','d',0};
static const WCHAR callW[] = {'c','a','l','l',0};
static const WCHAR argumentsW[] = {'a','r','g','u','m','e','n','t','s',0};
static HRESULT Arguments_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv,
......@@ -546,12 +542,12 @@ static void Function_destructor(jsdisp_t *dispex)
}
static const builtin_prop_t Function_props[] = {
{applyW, Function_apply, PROPF_METHOD|2},
{argumentsW, NULL, 0, Function_get_arguments},
{bindW, Function_bind, PROPF_METHOD|PROPF_ES5|1},
{callW, Function_call, PROPF_METHOD|1},
{lengthW, NULL, 0, Function_get_length},
{toStringW, Function_toString, PROPF_METHOD}
{L"apply", Function_apply, PROPF_METHOD|2},
{L"arguments", NULL, 0, Function_get_arguments},
{L"bind", Function_bind, PROPF_METHOD|PROPF_ES5|1},
{L"call", Function_call, PROPF_METHOD|1},
{L"length", NULL, 0, Function_get_length},
{L"toString", Function_toString, PROPF_METHOD}
};
static const builtin_info_t Function_info = {
......@@ -564,8 +560,8 @@ static const builtin_info_t Function_info = {
};
static const builtin_prop_t FunctionInst_props[] = {
{argumentsW, NULL, 0, Function_get_arguments},
{lengthW, NULL, 0, Function_get_length}
{L"arguments", NULL, 0, Function_get_arguments},
{L"length", NULL, 0, Function_get_length}
};
static const builtin_info_t FunctionInst_info = {
......
......@@ -48,28 +48,8 @@ static const WCHAR RegExpErrorW[] = {'R','e','g','E','x','p','E','r','r','o','r'
static const WCHAR ActiveXObjectW[] = {'A','c','t','i','v','e','X','O','b','j','e','c','t',0};
static const WCHAR VBArrayW[] = {'V','B','A','r','r','a','y',0};
static const WCHAR EnumeratorW[] = {'E','n','u','m','e','r','a','t','o','r',0};
static const WCHAR escapeW[] = {'e','s','c','a','p','e',0};
static const WCHAR evalW[] = {'e','v','a','l',0};
static const WCHAR isNaNW[] = {'i','s','N','a','N',0};
static const WCHAR isFiniteW[] = {'i','s','F','i','n','i','t','e',0};
static const WCHAR parseIntW[] = {'p','a','r','s','e','I','n','t',0};
static const WCHAR parseFloatW[] = {'p','a','r','s','e','F','l','o','a','t',0};
static const WCHAR unescapeW[] = {'u','n','e','s','c','a','p','e',0};
static const WCHAR _GetObjectW[] = {'G','e','t','O','b','j','e','c','t',0};
static const WCHAR ScriptEngineW[] = {'S','c','r','i','p','t','E','n','g','i','n','e',0};
static const WCHAR ScriptEngineMajorVersionW[] =
{'S','c','r','i','p','t','E','n','g','i','n','e','M','a','j','o','r','V','e','r','s','i','o','n',0};
static const WCHAR ScriptEngineMinorVersionW[] =
{'S','c','r','i','p','t','E','n','g','i','n','e','M','i','n','o','r','V','e','r','s','i','o','n',0};
static const WCHAR ScriptEngineBuildVersionW[] =
{'S','c','r','i','p','t','E','n','g','i','n','e','B','u','i','l','d','V','e','r','s','i','o','n',0};
static const WCHAR CollectGarbageW[] = {'C','o','l','l','e','c','t','G','a','r','b','a','g','e',0};
static const WCHAR MathW[] = {'M','a','t','h',0};
static const WCHAR JSONW[] = {'J','S','O','N',0};
static const WCHAR encodeURIW[] = {'e','n','c','o','d','e','U','R','I',0};
static const WCHAR decodeURIW[] = {'d','e','c','o','d','e','U','R','I',0};
static const WCHAR encodeURIComponentW[] = {'e','n','c','o','d','e','U','R','I','C','o','m','p','o','n','e','n','t',0};
static const WCHAR decodeURIComponentW[] = {'d','e','c','o','d','e','U','R','I','C','o','m','p','o','n','e','n','t',0};
static const WCHAR undefinedW[] = {'u','n','d','e','f','i','n','e','d',0};
......@@ -931,23 +911,23 @@ static HRESULT JSGlobal_decodeURIComponent(script_ctx_t *ctx, vdisp_t *jsthis, W
}
static const builtin_prop_t JSGlobal_props[] = {
{CollectGarbageW, JSGlobal_CollectGarbage, PROPF_METHOD},
{_GetObjectW, JSGlobal_GetObject, PROPF_METHOD|2},
{ScriptEngineW, JSGlobal_ScriptEngine, PROPF_METHOD},
{ScriptEngineBuildVersionW, JSGlobal_ScriptEngineBuildVersion, PROPF_METHOD},
{ScriptEngineMajorVersionW, JSGlobal_ScriptEngineMajorVersion, PROPF_METHOD},
{ScriptEngineMinorVersionW, JSGlobal_ScriptEngineMinorVersion, PROPF_METHOD},
{decodeURIW, JSGlobal_decodeURI, PROPF_METHOD|1},
{decodeURIComponentW, JSGlobal_decodeURIComponent, PROPF_METHOD|1},
{encodeURIW, JSGlobal_encodeURI, PROPF_METHOD|1},
{encodeURIComponentW, JSGlobal_encodeURIComponent, PROPF_METHOD|1},
{escapeW, JSGlobal_escape, PROPF_METHOD|1},
{evalW, JSGlobal_eval, PROPF_METHOD|1},
{isFiniteW, JSGlobal_isFinite, PROPF_METHOD|1},
{isNaNW, JSGlobal_isNaN, PROPF_METHOD|1},
{parseFloatW, JSGlobal_parseFloat, PROPF_METHOD|1},
{parseIntW, JSGlobal_parseInt, PROPF_METHOD|2},
{unescapeW, JSGlobal_unescape, PROPF_METHOD|1}
{L"CollectGarbage", JSGlobal_CollectGarbage, PROPF_METHOD},
{L"GetObject", JSGlobal_GetObject, PROPF_METHOD|2},
{L"ScriptEngine", JSGlobal_ScriptEngine, PROPF_METHOD},
{L"ScriptEngineBuildVersion", JSGlobal_ScriptEngineBuildVersion, PROPF_METHOD},
{L"ScriptEngineMajorVersion", JSGlobal_ScriptEngineMajorVersion, PROPF_METHOD},
{L"ScriptEngineMinorVersion", JSGlobal_ScriptEngineMinorVersion, PROPF_METHOD},
{L"decodeURI", JSGlobal_decodeURI, PROPF_METHOD|1},
{L"decodeURIComponent", JSGlobal_decodeURIComponent, PROPF_METHOD|1},
{L"encodeURI", JSGlobal_encodeURI, PROPF_METHOD|1},
{L"encodeURIComponent", JSGlobal_encodeURIComponent, PROPF_METHOD|1},
{L"escape", JSGlobal_escape, PROPF_METHOD|1},
{L"eval", JSGlobal_eval, PROPF_METHOD|1},
{L"isFinite", JSGlobal_isFinite, PROPF_METHOD|1},
{L"isNaN", JSGlobal_isNaN, PROPF_METHOD|1},
{L"parseFloat", JSGlobal_parseFloat, PROPF_METHOD|1},
{L"parseInt", JSGlobal_parseInt, PROPF_METHOD|2},
{L"unescape", JSGlobal_unescape, PROPF_METHOD|1}
};
static const builtin_info_t JSGlobal_info = {
......
......@@ -26,9 +26,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
static const WCHAR parseW[] = {'p','a','r','s','e',0};
static const WCHAR stringifyW[] = {'s','t','r','i','n','g','i','f','y',0};
static const WCHAR nullW[] = {'n','u','l','l',0};
static const WCHAR trueW[] = {'t','r','u','e',0};
static const WCHAR falseW[] = {'f','a','l','s','e',0};
......@@ -821,8 +818,8 @@ static HRESULT JSON_stringify(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un
}
static const builtin_prop_t JSON_props[] = {
{parseW, JSON_parse, PROPF_METHOD|2},
{stringifyW, JSON_stringify, PROPF_METHOD|3}
{L"parse", JSON_parse, PROPF_METHOD|2},
{L"stringify", JSON_stringify, PROPF_METHOD|3}
};
static const builtin_info_t JSON_info = {
......
......@@ -34,30 +34,6 @@ typedef struct {
jsval_t last_index_val;
} RegExpInstance;
static const WCHAR sourceW[] = {'s','o','u','r','c','e',0};
static const WCHAR globalW[] = {'g','l','o','b','a','l',0};
static const WCHAR ignoreCaseW[] = {'i','g','n','o','r','e','C','a','s','e',0};
static const WCHAR multilineW[] = {'m','u','l','t','i','l','i','n','e',0};
static const WCHAR lastIndexW[] = {'l','a','s','t','I','n','d','e','x',0};
static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0};
static const WCHAR execW[] = {'e','x','e','c',0};
static const WCHAR testW[] = {'t','e','s','t',0};
static const WCHAR leftContextW[] =
{'l','e','f','t','C','o','n','t','e','x','t',0};
static const WCHAR rightContextW[] =
{'r','i','g','h','t','C','o','n','t','e','x','t',0};
static const WCHAR idx1W[] = {'$','1',0};
static const WCHAR idx2W[] = {'$','2',0};
static const WCHAR idx3W[] = {'$','3',0};
static const WCHAR idx4W[] = {'$','4',0};
static const WCHAR idx5W[] = {'$','5',0};
static const WCHAR idx6W[] = {'$','6',0};
static const WCHAR idx7W[] = {'$','7',0};
static const WCHAR idx8W[] = {'$','8',0};
static const WCHAR idx9W[] = {'$','9',0};
static inline RegExpInstance *regexp_from_jsdisp(jsdisp_t *jsdisp)
{
return CONTAINING_RECORD(jsdisp, RegExpInstance, dispex);
......@@ -580,14 +556,14 @@ static void RegExp_destructor(jsdisp_t *dispex)
}
static const builtin_prop_t RegExp_props[] = {
{execW, RegExp_exec, PROPF_METHOD|1},
{globalW, NULL,0, RegExp_get_global},
{ignoreCaseW, NULL,0, RegExp_get_ignoreCase},
{lastIndexW, NULL,0, RegExp_get_lastIndex, RegExp_set_lastIndex},
{multilineW, NULL,0, RegExp_get_multiline},
{sourceW, NULL,0, RegExp_get_source},
{testW, RegExp_test, PROPF_METHOD|1},
{toStringW, RegExp_toString, PROPF_METHOD}
{L"exec", RegExp_exec, PROPF_METHOD|1},
{L"global", NULL,0, RegExp_get_global},
{L"ignoreCase", NULL,0, RegExp_get_ignoreCase},
{L"lastIndex", NULL,0, RegExp_get_lastIndex, RegExp_set_lastIndex},
{L"multiline", NULL,0, RegExp_get_multiline},
{L"source", NULL,0, RegExp_get_source},
{L"test", RegExp_test, PROPF_METHOD|1},
{L"toString", RegExp_toString, PROPF_METHOD}
};
static const builtin_info_t RegExp_info = {
......@@ -600,11 +576,11 @@ static const builtin_info_t RegExp_info = {
};
static const builtin_prop_t RegExpInst_props[] = {
{globalW, NULL,0, RegExp_get_global},
{ignoreCaseW, NULL,0, RegExp_get_ignoreCase},
{lastIndexW, NULL,0, RegExp_get_lastIndex, RegExp_set_lastIndex},
{multilineW, NULL,0, RegExp_get_multiline},
{sourceW, NULL,0, RegExp_get_source}
{L"global", NULL,0, RegExp_get_global},
{L"ignoreCase", NULL,0, RegExp_get_ignoreCase},
{L"lastIndex", NULL,0, RegExp_get_lastIndex, RegExp_set_lastIndex},
{L"multiline", NULL,0, RegExp_get_multiline},
{L"source", NULL,0, RegExp_get_source}
};
static const builtin_info_t RegExpInst_info = {
......@@ -970,17 +946,17 @@ static HRESULT RegExpConstr_value(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags
}
static const builtin_prop_t RegExpConstr_props[] = {
{idx1W, NULL,0, RegExpConstr_get_idx1, builtin_set_const},
{idx2W, NULL,0, RegExpConstr_get_idx2, builtin_set_const},
{idx3W, NULL,0, RegExpConstr_get_idx3, builtin_set_const},
{idx4W, NULL,0, RegExpConstr_get_idx4, builtin_set_const},
{idx5W, NULL,0, RegExpConstr_get_idx5, builtin_set_const},
{idx6W, NULL,0, RegExpConstr_get_idx6, builtin_set_const},
{idx7W, NULL,0, RegExpConstr_get_idx7, builtin_set_const},
{idx8W, NULL,0, RegExpConstr_get_idx8, builtin_set_const},
{idx9W, NULL,0, RegExpConstr_get_idx9, builtin_set_const},
{leftContextW, NULL,0, RegExpConstr_get_leftContext, builtin_set_const},
{rightContextW, NULL,0, RegExpConstr_get_rightContext, builtin_set_const}
{L"$1", NULL,0, RegExpConstr_get_idx1, builtin_set_const},
{L"$2", NULL,0, RegExpConstr_get_idx2, builtin_set_const},
{L"$3", NULL,0, RegExpConstr_get_idx3, builtin_set_const},
{L"$4", NULL,0, RegExpConstr_get_idx4, builtin_set_const},
{L"$5", NULL,0, RegExpConstr_get_idx5, builtin_set_const},
{L"$6", NULL,0, RegExpConstr_get_idx6, builtin_set_const},
{L"$7", NULL,0, RegExpConstr_get_idx7, builtin_set_const},
{L"$8", NULL,0, RegExpConstr_get_idx8, builtin_set_const},
{L"$9", NULL,0, RegExpConstr_get_idx9, builtin_set_const},
{L"leftContext", NULL,0, RegExpConstr_get_leftContext, builtin_set_const},
{L"rightContext", NULL,0, RegExpConstr_get_rightContext, builtin_set_const}
};
static const builtin_info_t RegExpConstr_info = {
......
......@@ -28,33 +28,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(jscript);
static const WCHAR EW[] = {'E',0};
static const WCHAR LOG2EW[] = {'L','O','G','2','E',0};
static const WCHAR LOG10EW[] = {'L','O','G','1','0','E',0};
static const WCHAR LN2W[] = {'L','N','2',0};
static const WCHAR LN10W[] = {'L','N','1','0',0};
static const WCHAR PIW[] = {'P','I',0};
static const WCHAR SQRT2W[] = {'S','Q','R','T','2',0};
static const WCHAR SQRT1_2W[] = {'S','Q','R','T','1','_','2',0};
static const WCHAR absW[] = {'a','b','s',0};
static const WCHAR acosW[] = {'a','c','o','s',0};
static const WCHAR asinW[] = {'a','s','i','n',0};
static const WCHAR atanW[] = {'a','t','a','n',0};
static const WCHAR atan2W[] = {'a','t','a','n','2',0};
static const WCHAR ceilW[] = {'c','e','i','l',0};
static const WCHAR cosW[] = {'c','o','s',0};
static const WCHAR expW[] = {'e','x','p',0};
static const WCHAR floorW[] = {'f','l','o','o','r',0};
static const WCHAR logW[] = {'l','o','g',0};
static const WCHAR maxW[] = {'m','a','x',0};
static const WCHAR minW[] = {'m','i','n',0};
static const WCHAR powW[] = {'p','o','w',0};
static const WCHAR randomW[] = {'r','a','n','d','o','m',0};
static const WCHAR roundW[] = {'r','o','u','n','d',0};
static const WCHAR sinW[] = {'s','i','n',0};
static const WCHAR sqrtW[] = {'s','q','r','t',0};
static const WCHAR tanW[] = {'t','a','n',0};
/* ECMA-262 3rd Edition 15.8.2.12 */
static HRESULT Math_abs(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned argc, jsval_t *argv,
jsval_t *r)
......@@ -497,24 +470,24 @@ static HRESULT Math_tan(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, unsigned
}
static const builtin_prop_t Math_props[] = {
{absW, Math_abs, PROPF_METHOD|1},
{acosW, Math_acos, PROPF_METHOD|1},
{asinW, Math_asin, PROPF_METHOD|1},
{atanW, Math_atan, PROPF_METHOD|1},
{atan2W, Math_atan2, PROPF_METHOD|2},
{ceilW, Math_ceil, PROPF_METHOD|1},
{cosW, Math_cos, PROPF_METHOD|1},
{expW, Math_exp, PROPF_METHOD|1},
{floorW, Math_floor, PROPF_METHOD|1},
{logW, Math_log, PROPF_METHOD|1},
{maxW, Math_max, PROPF_METHOD|2},
{minW, Math_min, PROPF_METHOD|2},
{powW, Math_pow, PROPF_METHOD|2},
{randomW, Math_random, PROPF_METHOD},
{roundW, Math_round, PROPF_METHOD|1},
{sinW, Math_sin, PROPF_METHOD|1},
{sqrtW, Math_sqrt, PROPF_METHOD|1},
{tanW, Math_tan, PROPF_METHOD|1}
{L"abs", Math_abs, PROPF_METHOD|1},
{L"acos", Math_acos, PROPF_METHOD|1},
{L"asin", Math_asin, PROPF_METHOD|1},
{L"atan", Math_atan, PROPF_METHOD|1},
{L"atan2", Math_atan2, PROPF_METHOD|2},
{L"ceil", Math_ceil, PROPF_METHOD|1},
{L"cos", Math_cos, PROPF_METHOD|1},
{L"exp", Math_exp, PROPF_METHOD|1},
{L"floor", Math_floor, PROPF_METHOD|1},
{L"log", Math_log, PROPF_METHOD|1},
{L"max", Math_max, PROPF_METHOD|2},
{L"min", Math_min, PROPF_METHOD|2},
{L"pow", Math_pow, PROPF_METHOD|2},
{L"random", Math_random, PROPF_METHOD},
{L"round", Math_round, PROPF_METHOD|1},
{L"sin", Math_sin, PROPF_METHOD|1},
{L"sqrt", Math_sqrt, PROPF_METHOD|1},
{L"tan", Math_tan, PROPF_METHOD|1}
};
static const builtin_info_t Math_info = {
......@@ -536,14 +509,14 @@ HRESULT create_math(script_ctx_t *ctx, jsdisp_t **ret)
const WCHAR *name;
DOUBLE val;
}constants[] = {
{EW, M_E}, /* ECMA-262 3rd Edition 15.8.1.1 */
{LN10W, M_LN10}, /* ECMA-262 3rd Edition 15.8.1.2 */
{LN2W, M_LN2}, /* ECMA-262 3rd Edition 15.8.1.3 */
{LOG2EW, M_LOG2E}, /* ECMA-262 3rd Edition 15.8.1.4 */
{LOG10EW, M_LOG10E}, /* ECMA-262 3rd Edition 15.8.1.5 */
{PIW, M_PI}, /* ECMA-262 3rd Edition 15.8.1.6 */
{SQRT1_2W, M_SQRT1_2}, /* ECMA-262 3rd Edition 15.8.1.7 */
{SQRT2W, M_SQRT2}, /* ECMA-262 3rd Edition 15.8.1.8 */
{L"E", M_E}, /* ECMA-262 3rd Edition 15.8.1.1 */
{L"LN10", M_LN10}, /* ECMA-262 3rd Edition 15.8.1.2 */
{L"LN2", M_LN2}, /* ECMA-262 3rd Edition 15.8.1.3 */
{L"LOG2E", M_LOG2E}, /* ECMA-262 3rd Edition 15.8.1.4 */
{L"LOG10E", M_LOG10E}, /* ECMA-262 3rd Edition 15.8.1.5 */
{L"PI", M_PI}, /* ECMA-262 3rd Edition 15.8.1.6 */
{L"SQRT1_2", M_SQRT1_2}, /* ECMA-262 3rd Edition 15.8.1.7 */
{L"SQRT2", M_SQRT2}, /* ECMA-262 3rd Edition 15.8.1.8 */
};
math = heap_alloc_zero(sizeof(jsdisp_t));
......
......@@ -31,13 +31,6 @@ typedef struct {
double value;
} NumberInstance;
static const WCHAR toStringW[] = {'t','o','S','t','r','i','n','g',0};
static const WCHAR toLocaleStringW[] = {'t','o','L','o','c','a','l','e','S','t','r','i','n','g',0};
static const WCHAR toFixedW[] = {'t','o','F','i','x','e','d',0};
static const WCHAR toExponentialW[] = {'t','o','E','x','p','o','n','e','n','t','i','a','l',0};
static const WCHAR toPrecisionW[] = {'t','o','P','r','e','c','i','s','i','o','n',0};
static const WCHAR valueOfW[] = {'v','a','l','u','e','O','f',0};
#define NUMBER_TOSTRING_BUF_SIZE 64
#define NUMBER_DTOA_SIZE 18
......@@ -513,12 +506,12 @@ static HRESULT Number_get_value(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
}
static const builtin_prop_t Number_props[] = {
{toExponentialW, Number_toExponential, PROPF_METHOD|1},
{toFixedW, Number_toFixed, PROPF_METHOD},
{toLocaleStringW, Number_toLocaleString, PROPF_METHOD},
{toPrecisionW, Number_toPrecision, PROPF_METHOD|1},
{toStringW, Number_toString, PROPF_METHOD|1},
{valueOfW, Number_valueOf, PROPF_METHOD}
{L"toExponential", Number_toExponential, PROPF_METHOD|1},
{L"toFixed", Number_toFixed, PROPF_METHOD},
{L"toLocaleString", Number_toLocaleString, PROPF_METHOD},
{L"toPrecision", Number_toPrecision, PROPF_METHOD|1},
{L"toString", Number_toString, PROPF_METHOD|1},
{L"valueOf", Number_valueOf, PROPF_METHOD}
};
static const builtin_info_t Number_info = {
......
......@@ -28,12 +28,6 @@ typedef struct {
SAFEARRAY *safearray;
} VBArrayInstance;
static const WCHAR dimensionsW[] = {'d','i','m','e','n','s','i','o','n','s',0};
static const WCHAR getItemW[] = {'g','e','t','I','t','e','m',0};
static const WCHAR lboundW[] = {'l','b','o','u','n','d',0};
static const WCHAR toArrayW[] = {'t','o','A','r','r','a','y',0};
static const WCHAR uboundW[] = {'u','b','o','u','n','d',0};
static inline VBArrayInstance *vbarray_from_jsdisp(jsdisp_t *jsdisp)
{
return CONTAINING_RECORD(jsdisp, VBArrayInstance, dispex);
......@@ -248,11 +242,11 @@ static void VBArray_destructor(jsdisp_t *dispex)
}
static const builtin_prop_t VBArray_props[] = {
{dimensionsW, VBArray_dimensions, PROPF_METHOD},
{getItemW, VBArray_getItem, PROPF_METHOD|1},
{lboundW, VBArray_lbound, PROPF_METHOD},
{toArrayW, VBArray_toArray, PROPF_METHOD},
{uboundW, VBArray_ubound, PROPF_METHOD}
{L"dimensions", VBArray_dimensions, PROPF_METHOD},
{L"getItem", VBArray_getItem, PROPF_METHOD|1},
{L"lbound", VBArray_lbound, PROPF_METHOD},
{L"toArray", VBArray_toArray, PROPF_METHOD},
{L"ubound", VBArray_ubound, PROPF_METHOD}
};
static const builtin_info_t VBArray_info = {
......
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