Skip to content

Commit 3b079cd

Browse files
authored
Make autoinit dispatch table read-only (#972)
That way it ends up in .rodata instead of .data
1 parent 1f280a0 commit 3b079cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

quickjs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7386,7 +7386,7 @@ int JS_IsInstanceOf(JSContext *ctx, JSValueConst val, JSValueConst obj)
73867386
/* return the value associated to the autoinit property or an exception */
73877387
typedef JSValue JSAutoInitFunc(JSContext *ctx, JSObject *p, JSAtom atom, void *opaque);
73887388

7389-
static JSAutoInitFunc *js_autoinit_func_table[] = {
7389+
static JSAutoInitFunc *const js_autoinit_func_table[] = {
73907390
js_instantiate_prototype, /* JS_AUTOINIT_ID_PROTOTYPE */
73917391
js_module_ns_autoinit, /* JS_AUTOINIT_ID_MODULE_NS */
73927392
JS_InstantiateFunctionListItem2, /* JS_AUTOINIT_ID_PROP */

0 commit comments

Comments
 (0)