Skip to content

Commit 0f453d3

Browse files
committed
Add JS_FreePropertyEnum corresponding to JS_GetOwnPropertyNames
1 parent 1baa676 commit 0f453d3

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
@@ -7813,6 +7813,12 @@ int JS_GetOwnProperty(JSContext *ctx, JSPropertyDescriptor *desc,
78137813
return JS_GetOwnPropertyInternal(ctx, desc, JS_VALUE_GET_OBJ(obj), prop);
78147814
}
78157815

7816+
void JS_FreePropertyEnum(JSContext *ctx, JSPropertyEnum *tab,
7817+
uint32_t len)
7818+
{
7819+
js_free_prop_enum(ctx, tab, len);
7820+
}
7821+
78167822
/* return -1 if exception (Proxy object only) or TRUE/FALSE */
78177823
int JS_IsExtensible(JSContext *ctx, JSValue obj)
78187824
{

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)