*/}}
Explorar o código

Minor clean ups

YimingWu hai 1 ano
pai
achega
de1b67e20d
Modificáronse 1 ficheiros con 4 adicións e 1 borrados
  1. 4 1
      luajit.c

+ 4 - 1
luajit.c

@@ -73,6 +73,7 @@ int INV_RunCode(laOperator* a, laEvent* e){
     if(luaL_loadstring(L, Data.Code->Ptr)){ luaerr("luaL_loadstring() error:") };
     if(lua_pcall(L, 0, 0, 0)){ luaerr("lua_pcall() error:") };
 
+    printf("Lua state globals:\n");
     lua_pushvalue(L,LUA_GLOBALSINDEX); //lua_pushglobaltable(L);       // Get global table
     lua_pushnil(L);               // put a nil key on stack
     while (lua_next(L,-2) != 0) { // key(-1) is replaced by the next key(-1) in table(-2)
@@ -106,10 +107,12 @@ int main(int argc, char *argv[]){
     laWindow* w = laDesignWindow(-1,-1,600,600);
     laLayout* l = laDesignLayout(w,"My Layout");
     laCreatePanel(l->FirstBlock,"my_panel");
-    laCreatePanel(l->FirstBlock,"LAUI_input_mapper");
 
     laStartWindow(w);
     laMainLoop();
 
+    printf("Clearing Lua state.\n");
     lua_close(L);
+
+    return 0;
 }