Skip to content

Commit

Permalink
Add JS_FreePropertyEnum corresponding to JS_GetOwnPropertyNames
Browse files Browse the repository at this point in the history
  • Loading branch information
Icemic authored and chqrlie committed May 27, 2024
1 parent 921c1ee commit 9a2a246
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -7808,6 +7808,12 @@ int JS_GetOwnProperty(JSContext *ctx, JSPropertyDescriptor *desc,
return JS_GetOwnPropertyInternal(ctx, desc, JS_VALUE_GET_OBJ(obj), prop);
}

void JS_FreePropertyEnum(JSContext *ctx, JSPropertyEnum *tab,
uint32_t len)
{
js_free_prop_enum(ctx, tab, len);
}

/* return -1 if exception (Proxy object only) or TRUE/FALSE */
int JS_IsExtensible(JSContext *ctx, JSValue obj)
{
Expand Down
2 changes: 2 additions & 0 deletions quickjs.h
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,8 @@ JS_EXTERN int JS_GetOwnPropertyNames(JSContext *ctx, JSPropertyEnum **ptab,
uint32_t *plen, JSValue obj, int flags);
JS_EXTERN int JS_GetOwnProperty(JSContext *ctx, JSPropertyDescriptor *desc,
JSValue obj, JSAtom prop);
JS_EXTERN void JS_FreePropertyEnum(JSContext *ctx, JSPropertyEnum *tab,
uint32_t len);

JS_EXTERN JSValue JS_Call(JSContext *ctx, JSValue func_obj, JSValue this_obj,
int argc, JSValue *argv);
Expand Down

0 comments on commit 9a2a246

Please sign in to comment.