Skip to content

Commit 938979a

Browse files
committed
Fix Compilation Issues
1 parent 935c10a commit 938979a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/api/yue.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ static bool initYuescript(tic_mem* tic, const char* code)
7474

7575
core->currentVM = luaL_newstate();
7676
lua_State* lua = (lua_State*)core->currentVM;
77-
luaapi_open(lua);
7877

79-
// Create compiler with the Lua state and luaapi_open
80-
YueCompiler_t* compiler = yue_compiler_create(lua, luaapi_open, false);
78+
void (*open_func)(void*) = (void (*)(void*))luaapi_open;
79+
open_func(lua);
80+
81+
// Create compiler with the Lua state and open_func
82+
YueCompiler_t* compiler = yue_compiler_create(lua, open_func, false);
8183
YueConfig_t* config = yue_config_create();
8284
CompileInfo_t* result = yue_compile(compiler, code, config);
8385

src/api/yue_wrapper/yue_wrapper.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#define YUE_WRAPPER_EXPORTS
21
#include "yue_wrapper.h"
32
#include "yuescript/yue_compiler.h"
43
#include <cstring>

0 commit comments

Comments
 (0)