Skip to content

Commit ddc8712

Browse files
committed
update to latest quickjs and fix compatibities
1 parent f098ba7 commit ddc8712

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

libquickjs-sys/embed/extensions.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ int JS_Ext_ValueGetTag(JSValue v)
1818
int JS_Ext_GetRefCount(JSValue v)
1919
{
2020

21-
int tag = JS_Ext_ValueGetTag(v);
22-
if (tag >= JS_TAG_FIRST)
21+
if (JS_VALUE_HAS_REF_COUNT(v))
2322
{
24-
JSRefCountHeader *ptr = (JSRefCountHeader *)JS_Ext_GetPtr(v);
25-
return ptr->ref_count;
23+
void *p = JS_VALUE_GET_PTR(v);
24+
return JS_REF_COUNT(p);
2625
}
2726
else
2827
{

0 commit comments

Comments
 (0)