refactor cmake

This commit is contained in:
ekibun
2020-09-25 00:01:18 +08:00
parent fc27d0f2db
commit 3c41d0d250
14 changed files with 45 additions and 142 deletions

View File

@@ -3,7 +3,7 @@
* @Author: ekibun
* @Date: 2020-09-06 18:32:45
* @LastEditors: ekibun
* @LastEditTime: 2020-09-24 00:28:11
* @LastEditTime: 2020-09-24 22:32:15
*/
#include "ffi.h"
#include <functional>
@@ -156,11 +156,13 @@ extern "C"
DLLEXPORT void jsFreeValue(JSContext *ctx, JSValue *v)
{
JS_FreeValue(ctx, *v);
delete v;
}
DLLEXPORT void jsFreeValueRT(JSRuntime *rt, JSValue *v)
{
JS_FreeValueRT(rt, *v);
delete v;
}
DLLEXPORT JSValue *jsDupValue(JSContext *ctx, JSValueConst *v)
@@ -217,11 +219,6 @@ extern "C"
return JS_IsArray(ctx, *val);
}
DLLEXPORT void deleteJSValue(JSValueConst *val)
{
delete val;
}
DLLEXPORT JSValue *jsGetProperty(JSContext *ctx, JSValueConst *this_obj,
JSAtom prop)
{