Apply SF patch #3075150 - Java directors using static variables in named namespace

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12228 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2010-09-25 17:08:13 +00:00
commit e1ddf0ea3a
2 changed files with 8 additions and 2 deletions

View file

@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.1 (in progress)
===========================
2010-09-25: wsfulton
Apply SF patch #3075150 - Java directors using static variables in
named namespace.
2010-09-24: wsfulton
More file and line error/warning reporting fixes where SWIG macros
are used within {} braces (where the preprocessor expands macros),

View file

@ -3324,8 +3324,10 @@ public:
}
Printf(f_runtime, "namespace Swig {\n");
Printf(f_runtime, " static jclass jclass_%s = NULL;\n", imclass_name);
Printf(f_runtime, " static jmethodID director_methids[%d];\n", n_methods);
Printf(f_runtime, " namespace {\n");
Printf(f_runtime, " jclass jclass_%s = NULL;\n", imclass_name);
Printf(f_runtime, " jmethodID director_methids[%d];\n", n_methods);
Printf(f_runtime, " }\n");
Printf(f_runtime, "}\n");
Printf(w->def, "SWIGEXPORT void JNICALL Java_%s%s_%s(JNIEnv *jenv, jclass jcls) {", jnipackage, jni_imclass_name, swig_module_init_jni);