fix build

This commit is contained in:
2026-02-17 01:04:42 -06:00
parent bd4714a732
commit 400c58e5f2
3 changed files with 92 additions and 10 deletions

View File

@@ -100,7 +100,6 @@ TYPE##_free(rt,n);}\
static JSClassDef js_##TYPE##_class = {\
.class_name = #TYPE,\
.finalizer = js_##TYPE##_finalizer,\
.gc_mark = js_##TYPE##_mark,\
};\
TYPE *js2##TYPE (JSContext *js, JSValue val) { \
if (JS_GetClassID(val) != js_##TYPE##_id) return NULL; \
@@ -120,7 +119,6 @@ TYPE##_free(rt,n);}\
static JSClassDef js_##TYPE##_class = {\
.class_name = #TYPE,\
.finalizer = js_##TYPE##_finalizer,\
.gc_mark = js_##TYPE##_mark,\
};\
extern JSClassID js_##TYPE##_id;\
TYPE *js2##TYPE (JSContext *js, JSValue val) { \
@@ -231,9 +229,10 @@ JSValue CELL_USE_NAME(JSContext *js) { do { c ; } while(0); }
#define CELL_USE_FUNCS(FUNCS) \
JSValue CELL_USE_NAME(JSContext *js) { \
JSValue mod = JS_NewObject(js); \
JS_FRAME(js); \
JS_LOCAL(mod, JS_NewObject(js)); \
JS_SetPropertyFunctionList(js, mod, FUNCS, countof(FUNCS)); \
return mod; }
JS_RETURN(mod); }
#define CELL_PROGRAM_INIT(c) \
JSValue CELL_USE_NAME(JSContext *js) { do { c ; } while(0); }