diff options
author | Brant K. Kyser <brantkyser@gmail.com> | 2013-01-15 13:09:01 -0600 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2013-01-17 08:13:05 +0000 |
commit | f7e27ec7a966e05c6f8bc4336f0270f61c12b0d7 (patch) | |
tree | 42c1e7774d9398d41e121d51f40350e67ed91036 | |
parent | ace33bbf41e3cd40bf252fefb236883af6d8be2e (diff) | |
download | swig-f7e27ec7a966e05c6f8bc4336f0270f61c12b0d7.tar.gz |
Fix issue with using directors with the nspace feature without the -package commandline argument.
-rw-r--r-- | Source/Modules/java.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index 18043e1a4..5cb194605 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -4294,19 +4294,19 @@ public: Wrapper *w = NewWrapper(); - if (Len(package_path) > 0) - if (Len(getNSpace()) > 0) { - internal_classname = NewStringf("%s/%s/%s", package_path, getNSpace(), classname); - - // If the namespace is multiple levels, the result of getNSpace() will have inserted - // .'s to delimit namespaces, so we need to replace those with /'s - Replace(internal_classname, ".", "/", DOH_REPLACE_ANY); - } - else - internal_classname = NewStringf("%s/%s", package_path, classname); + if (Len(package_path) > 0 && Len(getNSpace()) > 0) + internal_classname = NewStringf("%s/%s/%s", package_path, getNSpace(), classname); + else if (Len(package_path) > 0) + internal_classname = NewStringf("%s/%s", package_path, classname); + else if (Len(getNSpace()) > 0) + internal_classname = NewStringf("%s/%s", getNSpace(), classname); else internal_classname = NewStringf("%s", classname); + // If the namespace is multiple levels, the result of getNSpace() will have inserted + // .'s to delimit namespaces, so we need to replace those with /'s + Replace(internal_classname, ".", "/", DOH_REPLACE_ANY); + Wrapper_add_localv(w, "baseclass", "static jclass baseclass", "= 0", NIL); Printf(w->def, "void %s::swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls, bool swig_mem_own, bool weak_global) {", director_classname); |