Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -3415,7 +3415,9 @@ JSValue JS_NewSymbol(JSContext *ctx, const char *description, bool is_global)
JSAtom atom = JS_NewAtom(ctx, description);
if (atom == JS_ATOM_NULL)
return JS_EXCEPTION;
return JS_NewSymbolFromAtom(ctx, atom, is_global ? JS_ATOM_TYPE_GLOBAL_SYMBOL : JS_ATOM_TYPE_SYMBOL);
JSValue symbol = JS_NewSymbolFromAtom(ctx, atom, is_global ? JS_ATOM_TYPE_GLOBAL_SYMBOL : JS_ATOM_TYPE_SYMBOL);
JS_FreeAtom(ctx, atom);
return symbol;
}

#define ATOM_GET_STR_BUF_SIZE 64
Expand Down
Loading