@@ -958,21 +958,21 @@ typedef struct JSCFunctionListEntry {
958958#define JS_DEF_ALIAS 9
959959
960960/* Note: c++ does not like nested designators */
961- #define JS_CFUNC_DEF (name , length , func1 ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, .u = { .func = { length, JS_CFUNC_generic, { .generic = func1 } } } }
962- #define JS_CFUNC_DEF2 (name , length , func1 , prop_flags ) { name, prop_flags, JS_DEF_CFUNC, 0, .u = { .func = { length, JS_CFUNC_generic, { .generic = func1 } } } }
963- #define JS_CFUNC_MAGIC_DEF (name , length , func1 , magic ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, magic, .u = { .func = { length, JS_CFUNC_generic_magic, { .generic_magic = func1 } } } }
964- #define JS_CFUNC_SPECIAL_DEF (name , length , cproto , func1 ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, .u = { .func = { length, JS_CFUNC_ ## cproto, { .cproto = func1 } } } }
965- #define JS_ITERATOR_NEXT_DEF (name , length , func1 , magic ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, magic, .u = { .func = { length, JS_CFUNC_iterator_next, { .iterator_next = func1 } } } }
966- #define JS_CGETSET_DEF (name , fgetter , fsetter ) { name, JS_PROP_CONFIGURABLE, JS_DEF_CGETSET, 0, .u = { .getset = { .get = { .getter = fgetter }, .set = { .setter = fsetter } } } }
967- #define JS_CGETSET_MAGIC_DEF (name , fgetter , fsetter , magic ) { name, JS_PROP_CONFIGURABLE, JS_DEF_CGETSET_MAGIC, magic, .u = { .getset = { .get = { .getter_magic = fgetter }, .set = { .setter_magic = fsetter } } } }
968- #define JS_PROP_STRING_DEF (name , cstr , prop_flags ) { name, prop_flags, JS_DEF_PROP_STRING, 0, .u = { .str = cstr } }
969- #define JS_PROP_INT32_DEF (name , val , prop_flags ) { name, prop_flags, JS_DEF_PROP_INT32, 0, .u = { .i32 = val } }
970- #define JS_PROP_INT64_DEF (name , val , prop_flags ) { name, prop_flags, JS_DEF_PROP_INT64, 0, .u = { .i64 = val } }
971- #define JS_PROP_DOUBLE_DEF (name , val , prop_flags ) { name, prop_flags, JS_DEF_PROP_DOUBLE, 0, .u = { .f64 = val } }
972- #define JS_PROP_UNDEFINED_DEF (name , prop_flags ) { name, prop_flags, JS_DEF_PROP_UNDEFINED, 0, .u = { .i32 = 0 } }
973- #define JS_OBJECT_DEF (name , tab , len , prop_flags ) { name, prop_flags, JS_DEF_OBJECT, 0, .u = { .prop_list = { tab, len } } }
974- #define JS_ALIAS_DEF (name , from ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_ALIAS, 0, .u = { .alias = { from, -1 } } }
975- #define JS_ALIAS_BASE_DEF (name , from , base ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_ALIAS, 0, .u = { .alias = { from, base } } }
961+ #define JS_CFUNC_DEF (name , length , func1 ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, { .func = { length, JS_CFUNC_generic, { .generic = func1 } } } }
962+ #define JS_CFUNC_DEF2 (name , length , func1 , prop_flags ) { name, prop_flags, JS_DEF_CFUNC, 0, { .func = { length, JS_CFUNC_generic, { .generic = func1 } } } }
963+ #define JS_CFUNC_MAGIC_DEF (name , length , func1 , magic ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, magic, { .func = { length, JS_CFUNC_generic_magic, { .generic_magic = func1 } } } }
964+ #define JS_CFUNC_SPECIAL_DEF (name , length , cproto , func1 ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, 0, { .func = { length, JS_CFUNC_ ## cproto, { .cproto = func1 } } } }
965+ #define JS_ITERATOR_NEXT_DEF (name , length , func1 , magic ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_CFUNC, magic, { .func = { length, JS_CFUNC_iterator_next, { .iterator_next = func1 } } } }
966+ #define JS_CGETSET_DEF (name , fgetter , fsetter ) { name, JS_PROP_CONFIGURABLE, JS_DEF_CGETSET, 0, { .getset = { .get = { .getter = fgetter }, .set = { .setter = fsetter } } } }
967+ #define JS_CGETSET_MAGIC_DEF (name , fgetter , fsetter , magic ) { name, JS_PROP_CONFIGURABLE, JS_DEF_CGETSET_MAGIC, magic, { .getset = { .get = { .getter_magic = fgetter }, .set = { .setter_magic = fsetter } } } }
968+ #define JS_PROP_STRING_DEF (name , cstr , prop_flags ) { name, prop_flags, JS_DEF_PROP_STRING, 0, { .str = cstr } }
969+ #define JS_PROP_INT32_DEF (name , val , prop_flags ) { name, prop_flags, JS_DEF_PROP_INT32, 0, { .i32 = val } }
970+ #define JS_PROP_INT64_DEF (name , val , prop_flags ) { name, prop_flags, JS_DEF_PROP_INT64, 0, { .i64 = val } }
971+ #define JS_PROP_DOUBLE_DEF (name , val , prop_flags ) { name, prop_flags, JS_DEF_PROP_DOUBLE, 0, { .f64 = val } }
972+ #define JS_PROP_UNDEFINED_DEF (name , prop_flags ) { name, prop_flags, JS_DEF_PROP_UNDEFINED, 0, { .i32 = 0 } }
973+ #define JS_OBJECT_DEF (name , tab , len , prop_flags ) { name, prop_flags, JS_DEF_OBJECT, 0, { .prop_list = { tab, len } } }
974+ #define JS_ALIAS_DEF (name , from ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_ALIAS, 0, { .alias = { from, -1 } } }
975+ #define JS_ALIAS_BASE_DEF (name , from , base ) { name, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE, JS_DEF_ALIAS, 0, { .alias = { from, base } } }
976976
977977JS_EXTERN void JS_SetPropertyFunctionList (JSContext * ctx , JSValue obj ,
978978 const JSCFunctionListEntry * tab ,
0 commit comments