mirror of
https://github.com/openharmony/third_party_quickjs.git
synced 2026-07-18 21:04:31 -04:00
@@ -9807,6 +9807,15 @@ void *JS_GetOpaque2(JSContext *ctx, JSValueConst obj, JSClassID class_id)
|
||||
return p;
|
||||
}
|
||||
|
||||
void *JS_GetOpaque3(JSValueConst obj)
|
||||
{
|
||||
JSObject *p;
|
||||
if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT)
|
||||
return NULL;
|
||||
p = JS_VALUE_GET_OBJ(obj);
|
||||
return p->u.opaque;
|
||||
}
|
||||
|
||||
#define HINT_STRING 0
|
||||
#define HINT_NUMBER 1
|
||||
#define HINT_NONE 2
|
||||
|
||||
@@ -807,6 +807,7 @@ int JS_DefinePropertyGetSet(JSContext *ctx, JSValueConst this_obj,
|
||||
void JS_SetOpaque(JSValue obj, void *opaque);
|
||||
void *JS_GetOpaque(JSValueConst obj, JSClassID class_id);
|
||||
void *JS_GetOpaque2(JSContext *ctx, JSValueConst obj, JSClassID class_id);
|
||||
void *JS_GetOpaque3(JSValueConst obj);
|
||||
|
||||
/* 'buf' must be zero terminated i.e. buf[buf_len] = '\0'. */
|
||||
JSValue JS_ParseJSON(JSContext *ctx, const char *buf, size_t buf_len,
|
||||
|
||||
Reference in New Issue
Block a user