Skip to content
Browse files

Small bugfixes

  • Loading branch information...
1 parent 705beb6 commit 0c6263a0c2f6c5794c6a2c943493579ea95eb72e @v-for-vandal v-for-vandal committed Nov 17, 2013
Showing with 6 additions and 2 deletions.
  1. +1 −1 Lib/lua/luarun.swg
  2. +5 −1 Source/Modules/lua.cxx
View
2 Lib/lua/luarun.swg
@@ -76,7 +76,7 @@ typedef struct swig_elua_entry {
#define lua_pushrotable(L,p)\
lua_newtable(L);\
- SWIG_Lua_elua_emulate_register(L,p);
+ SWIG_Lua_elua_emulate_register(L,(swig_elua_entry*)(p));
#define SWIG_LUA_CONSTTAB_POINTER(B,C,D)\
LSTRKEY(B), {LUA_TUSERDATA, { .userdata={0,0,(void*)(C),&D} } }
View
6 Source/Modules/lua.cxx
@@ -1776,7 +1776,11 @@ class LUA:public Language {
String *metatable_tab = NewString("");
String *metatable_tab_name = NewStringf("swig_%s_meta", mangled_name);
String *metatable_tab_decl = NewString("");
- Printv(metatable_tab, "swig_lua_method ", metatable_tab_name, "[]", NIL);
+ if (elua_ltr || eluac_ltr) // In this case const array holds rotable with namespace constants
+ Printf(metatable_tab, "const LUA_REG_TYPE ");
+ else
+ Printf(metatable_tab, "static swig_lua_method ");
+ Printv(metatable_tab, metatable_tab_name, "[]", NIL);
Printv(metatable_tab_decl, metatable_tab, ";", NIL);
Printv(metatable_tab, " = {\n", NIL);
Setattr(nspace_hash, "metatable", metatable_tab);

0 comments on commit 0c6263a

Please sign in to comment.
Something went wrong with that request. Please try again.