lts to master

Signed-off-by: 17764556280 <hanfeng6@huawei.com>
This commit is contained in:
17764556280
2021-10-14 19:51:28 +08:00
parent 6f65d3492e
commit eaab31889e
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -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
+1
View File
@@ -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,