Skip to content

Commit 9a2a246

Browse files
Icemicchqrlie
authored andcommitted
Add JS_FreePropertyEnum corresponding to JS_GetOwnPropertyNames
1 parent 921c1ee commit 9a2a246

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

quickjs.c

+6
Original file line numberDiff line numberDiff line change
@@ -7808,6 +7808,12 @@ int JS_GetOwnProperty(JSContext *ctx, JSPropertyDescriptor *desc,
78087808
return JS_GetOwnPropertyInternal(ctx, desc, JS_VALUE_GET_OBJ(obj), prop);
78097809
}
78107810

7811+
void JS_FreePropertyEnum(JSContext *ctx, JSPropertyEnum *tab,
7812+
uint32_t len)
7813+
{
7814+
js_free_prop_enum(ctx, tab, len);
7815+
}
7816+
78117817
/* return -1 if exception (Proxy object only) or TRUE/FALSE */
78127818
int JS_IsExtensible(JSContext *ctx, JSValue obj)
78137819
{

quickjs.h

+2
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,8 @@ JS_EXTERN int JS_GetOwnPropertyNames(JSContext *ctx, JSPropertyEnum **ptab,
707707
uint32_t *plen, JSValue obj, int flags);
708708
JS_EXTERN int JS_GetOwnProperty(JSContext *ctx, JSPropertyDescriptor *desc,
709709
JSValue obj, JSAtom prop);
710+
JS_EXTERN void JS_FreePropertyEnum(JSContext *ctx, JSPropertyEnum *tab,
711+
uint32_t len);
710712

711713
JS_EXTERN JSValue JS_Call(JSContext *ctx, JSValue func_obj, JSValue this_obj,
712714
int argc, JSValue *argv);

0 commit comments

Comments
 (0)