diff --git a/lua_translate b/lua_translate index a0334f0..7e08726 100755 --- a/lua_translate +++ b/lua_translate @@ -16,6 +16,10 @@ typesOut = { "char *": "lua_pushstring" } +functionBlacklist = [ + "engine_malloc" +] + functions = toml.loads(open("modules/engine/FUNCTIONS.toml").read()) ofile = open("modules/engine/addon/lua.c","w") @@ -28,6 +32,7 @@ lua_State * engine_lua_state; ''') for func in functions: + if func in functionBlacklist: continue invarCount = 1 funcnew = "engine_luaf_" +func.replace("engine_","",1) ofile.write('int ' +funcnew+ '(lua_State *L) {\n') @@ -70,6 +75,7 @@ void engine_luaInit() { ''') for func in functions: + if func in functionBlacklist: continue funcnew = "engine_luaf_" +func.replace("engine_","",1) ofile.write('\tlua_pushcfunction(engine_lua_state,' +funcnew+ ');\n') ofile.write('\tlua_setglobal (engine_lua_state,"' +func+ '");\n')