Bugfixes
This commit is contained in:
parent
da0510376c
commit
9d6cd75c73
6 changed files with 12 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ ns = nspace
|
|||
|
||||
-- Inheritance
|
||||
blue1 = ns.Outer.Inner3.Blue()
|
||||
debug.debug()
|
||||
|
||||
-- blue1:blueInstanceMethod()
|
||||
blue1:colorInstanceMethod(60.0)
|
||||
blue1.instanceMemberVariable = 4
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1712,7 +1712,7 @@ public:
|
|||
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 @@ public:
|
|||
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 @@ public:
|
|||
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 @@ public:
|
|||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue