mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 13:27:24 +00:00
remove dart object when jsfree.
This commit is contained in:
11
cxx/ffi.h
11
cxx/ffi.h
@@ -8,6 +8,11 @@
|
||||
|
||||
extern "C"
|
||||
{
|
||||
struct ObjectOpaque
|
||||
{
|
||||
JSContext *ctx;
|
||||
void *opaque;
|
||||
};
|
||||
|
||||
typedef void *JSChannel(JSContext *ctx, const char *method, void *argv);
|
||||
|
||||
@@ -21,6 +26,12 @@ extern "C"
|
||||
|
||||
DLLEXPORT JSRuntime *jsNewRuntime(JSChannel channel);
|
||||
|
||||
DLLEXPORT uint32_t jsNewClass(JSContext *ctx, const char *name);
|
||||
|
||||
DLLEXPORT void *jsGetObjectOpaque(JSValue *obj, uint32_t classid);
|
||||
|
||||
DLLEXPORT JSValue *jsNewObjectClass(JSContext *ctx, uint32_t QJSClassId, void *opaque);
|
||||
|
||||
DLLEXPORT void jsSetMaxStackSize(JSRuntime *rt, size_t stack_size);
|
||||
|
||||
DLLEXPORT void jsFreeRuntime(JSRuntime *rt);
|
||||
|
Reference in New Issue
Block a user