Skip to content
Browse files

Bugfixes

  • Loading branch information...
1 parent da05103 commit 9d6cd75c7324397f866e0704deb6ed93ffdcf032 @v-for-vandal v-for-vandal committed Nov 8, 2013
View
2 Examples/test-suite/director_nspace.i
@@ -40,7 +40,7 @@ namespace TopLevel
%include <std_string.i>
// nspace feature only supported by these languages
-#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD)
+#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD) || defined(SWIGLUA)
%nspace TopLevel::Bar::Foo;
%nspace TopLevel::Bar::FooBar;
#else
View
2 Examples/test-suite/director_nspace_director_name_collision.i
@@ -34,7 +34,7 @@ namespace TopLevel
%include <std_string.i>
// nspace feature only supported by these languages
-#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD)
+#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD) || defined(SWIGLUA)
%nspace TopLevel::A::Foo;
%nspace TopLevel::B::Foo;
#else
View
2 Examples/test-suite/lua/nspace_runme.lua
@@ -10,7 +10,7 @@ ns = nspace
-- Inheritance
blue1 = ns.Outer.Inner3.Blue()
-debug.debug()
+
-- blue1:blueInstanceMethod()
blue1:colorInstanceMethod(60.0)
blue1.instanceMemberVariable = 4
View
2 Examples/test-suite/nspace_extend.i
@@ -2,7 +2,7 @@
%module nspace_extend
// nspace feature only supported by these languages
-#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD)
+#if defined(SWIGJAVA) || defined(SWIGCSHARP) || defined(SWIGD) || defined(SWIGLUA)
#if defined(SWIGJAVA)
SWIG_JAVABODY_PROXY(public, public, SWIGTYPE)
View
4 Lib/lua/luarun.swg
@@ -70,6 +70,10 @@ extern "C" {
# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
#endif
+/* lua_absindex was introduced in Lua 5.2 */
+#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
+# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
+#endif
/* --------------------------------------------------------------------------
* Helper functions for error handling
View
8 Source/Modules/lua.cxx
@@ -1712,7 +1712,7 @@ class LUA:public Language {
Printf(methods_tab, "static LUA_REG_TYPE ");
else
Printf(methods_tab, "static swig_lua_method ");
- Printv(methods_tab, methods_tab_name, "[]");
+ Printv(methods_tab, methods_tab_name, "[]", NIL);
Printv(methods_tab_decl, methods_tab, ";\n", NIL);
Printv(methods_tab, "= {\n", NIL);
Setattr(nspace_hash, "methods", methods_tab );
@@ -1737,7 +1737,7 @@ class LUA:public Language {
String *classes_tab_name = NewStringf("swig_%s_classes", mangled_name );
String *classes_tab_decl = NewString("");
Printf(classes_tab, "static swig_lua_class* ");
- Printv(classes_tab, classes_tab_name, "[]");
+ Printv(classes_tab, classes_tab_name, "[]", NIL);
Printv(classes_tab_decl, classes_tab, ";", NIL);
Printv(classes_tab, "= {\n", NIL);
Setattr(nspace_hash, "classes", classes_tab );
@@ -1748,7 +1748,7 @@ class LUA:public Language {
String* namespaces_tab_name = NewStringf("swig_%s_namespaces", mangled_name );
String* namespaces_tab_decl = NewString("");
Printf(namespaces_tab, "static swig_lua_namespace* ");
- Printv(namespaces_tab, namespaces_tab_name, "[]");
+ Printv(namespaces_tab, namespaces_tab_name, "[]", NIL);
Printv(namespaces_tab_decl, namespaces_tab, ";", NIL);
Printv(namespaces_tab, " = {\n", NIL);
Setattr(nspace_hash, "namespaces", namespaces_tab );
@@ -1772,7 +1772,7 @@ class LUA:public Language {
if (!eluac_ltr) {
String* metatable_tab = NewString("");
String* metatable_tab_name = NewStringf("swig_%s_meta", mangled_name);
- Printv(metatable_tab, "const LUA_REG_TYPE ", metatable_tab_name, "[] = {\n");
+ Printv(metatable_tab, "const LUA_REG_TYPE ", metatable_tab_name, "[] = {\n", NIL);
Setattr(nspace_hash, "metatable", metatable_tab);
Setattr(nspace_hash, "metatable:name", metatable_tab_name);
}

0 comments on commit 9d6cd75

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