[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
This commit is contained in:
Olly Betts 2007-10-29 00:02:20 +00:00
commit cc879f7c29
2 changed files with 6 additions and 1 deletions

View file

@ -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)));