diff options
author | Florian Dold <florian@dold.me> | 2024-02-23 15:54:29 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-02-26 21:06:41 +0100 |
commit | 47fc98540143afee8f77c6298fdeb3c0b0d7b6ec (patch) | |
tree | 868d9b582cd9745c30161f5e6753c945d8d49333 /quickjs/quickjs.c | |
parent | 0595d6b972a4c3a9f26c93ced206a82a403146de (diff) | |
download | quickjs-tart-dev/dold/native-http.tar.gz quickjs-tart-dev/dold/native-http.tar.bz2 quickjs-tart-dev/dold/native-http.zip |
native http lib interfacedev/dold/native-http
Diffstat (limited to 'quickjs/quickjs.c')
-rw-r--r-- | quickjs/quickjs.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/quickjs/quickjs.c b/quickjs/quickjs.c index bae5541..561374b 100644 --- a/quickjs/quickjs.c +++ b/quickjs/quickjs.c @@ -7776,6 +7776,17 @@ int JS_PreventExtensions(JSContext *ctx, JSValueConst obj) } /* return -1 if exception otherwise TRUE or FALSE */ +int JS_HasPropertyStr(JSContext *ctx, JSValueConst obj, const char *propname) +{ + JSAtom atom; + int ret; + atom = JS_NewAtom(ctx, propname); + ret = JS_HasProperty(ctx, obj, atom); + JS_FreeAtom(ctx, atom); + return ret; +} + +/* return -1 if exception otherwise TRUE or FALSE */ int JS_HasProperty(JSContext *ctx, JSValueConst obj, JSAtom prop) { JSObject *p; |