forked from cory/tildefriends
js: Add a place to start moving imports to C.
This commit is contained in:
19
src/api.js.c
Normal file
19
src/api.js.c
Normal file
@ -0,0 +1,19 @@
|
||||
#include "api.js.h"
|
||||
|
||||
#include "log.h"
|
||||
|
||||
#include <quickjs.h>
|
||||
|
||||
static JSValue _tf_api_register_imports(JSContext* context, JSValueConst this_val, int argc, JSValueConst* argv)
|
||||
{
|
||||
return JS_UNDEFINED;
|
||||
}
|
||||
|
||||
void tf_api_register(JSContext* context)
|
||||
{
|
||||
JSValue global = JS_GetGlobalObject(context);
|
||||
JSValue ssb = JS_GetPropertyStr(context, global, "ssb");
|
||||
JS_SetPropertyStr(context, ssb, "registerImports", JS_NewCFunction(context, _tf_api_register_imports, "registerImports", 2));
|
||||
JS_FreeValue(context, ssb);
|
||||
JS_FreeValue(context, global);
|
||||
}
|
Reference in New Issue
Block a user