fix syntax
This commit is contained in:
@@ -69,7 +69,7 @@ static JSClassID js_mersenne_class_id;
|
||||
|
||||
static void js_mersenne_finalizer(JSRuntime *rt, JSValue val) {
|
||||
MTRand *mrand = JS_GetOpaque(val, js_mersenne_class_id);
|
||||
js_free_rt(rt, mrand);
|
||||
js_free_rt(mrand);
|
||||
}
|
||||
|
||||
static JSClassDef js_mersenne_class = {
|
||||
@@ -131,7 +131,7 @@ static JSValue js_mersenne_use_call(JSContext *js, JSValueConst new_target, int
|
||||
|
||||
CELL_USE_INIT(
|
||||
JS_NewClassID(&js_mersenne_class_id);
|
||||
JS_NewClass(JS_GetRuntime(js), js_mersenne_class_id, &js_mersenne_class);
|
||||
JS_NewClass(js, js_mersenne_class_id, &js_mersenne_class);
|
||||
|
||||
JSValue proto = JS_NewObject(js);
|
||||
JS_SetPropertyFunctionList(js, proto, js_mersenne_funcs, sizeof(js_mersenne_funcs)/sizeof(JSCFunctionListEntry));
|
||||
|
||||
Reference in New Issue
Block a user