From cc879f7c2931f7d41984e924a42f06365f2e1b16 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Mon, 29 Oct 2007 00:02:20 +0000 Subject: [PATCH] [lua] Fix swig_lua_class instances to be static to allow multiple SWIG wrappers to be compiled into the same executable statically. Patch from Andreas Fredriksson (posted to the swig mailing list). git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10068 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- CHANGES.current | 5 +++++ Source/Modules/lua.cxx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGES.current b/CHANGES.current index ad579fc14..e6908b03b 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,11 @@ Version 1.3.32 (in progress) ============================ +10/28/2007: olly + [lua] Fix swig_lua_class instances to be static to allow multiple + SWIG wrappers to be compiled into the same executable statically. + Patch from Andreas Fredriksson (posted to the swig mailing list). + 10/28/2007: olly [lua] Fix Examples/lua to pass SRCS for C tests rather than CXXSRCS. The code as it was happened to work on x86, but broke on x86_64 (and diff --git a/Source/Modules/lua.cxx b/Source/Modules/lua.cxx index 06e9eca68..945caedea 100644 --- a/Source/Modules/lua.cxx +++ b/Source/Modules/lua.cxx @@ -929,7 +929,7 @@ NEW LANGUAGE NOTE:END ************************************************/ Printv(f_wrappers, "static char *swig_", mangled_classname, "_base_names[] = {", base_class_names, "0};\n", NIL); Delete(base_class_names); - Printv(f_wrappers, "swig_lua_class _wrap_class_", mangled_classname, " = { \"", class_name, "\", &SWIGTYPE", SwigType_manglestr(t), ",", NIL); + Printv(f_wrappers, "static swig_lua_class _wrap_class_", mangled_classname, " = { \"", class_name, "\", &SWIGTYPE", SwigType_manglestr(t), ",", NIL); if (have_constructor) { Printf(f_wrappers, "%s", Swig_name_wrapper(Swig_name_construct(constructor_name)));