summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrant K. Kyser <brantkyser@gmail.com>2013-01-14 16:31:53 -0600
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2013-01-17 08:13:04 +0000
commitace33bbf41e3cd40bf252fefb236883af6d8be2e (patch)
tree883502f57a7320d8e33ba63fcac9ed9c2e9f6c9c
parent20ce05f9548e1bc69bdd2a45f3032e45288f8075 (diff)
downloadswig-ace33bbf41e3cd40bf252fefb236883af6d8be2e.tar.gz
Fix issue with using directors with the nspace feature without the -package commandline argument.
-rw-r--r--Source/Modules/java.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx
index df1f6dd78..18043e1a4 100644
--- a/Source/Modules/java.cxx
+++ b/Source/Modules/java.cxx
@@ -1930,9 +1930,10 @@ public:
SWIG_exit(EXIT_FAILURE);
}
} else {
- if (package) {
+ if (package)
full_proxy_class_name = NewStringf("%s.%s.%s", package, nspace, proxy_class_name);
- }
+ else
+ full_proxy_class_name = NewStringf("%s.%s", nspace, proxy_class_name);
}
if (!addSymbol(proxy_class_name, n, nspace))
@@ -3592,8 +3593,11 @@ public:
String *qualified_classname = Copy(classname);
String *nspace = getNSpace();
- if (nspace)
+ if (nspace && package)
Insert(qualified_classname, 0, NewStringf("%s.%s.", package, nspace));
+ else if(nspace)
+ Insert(qualified_classname, 0, NewStringf("%s.", nspace));
+
// Kludge Alert: functionWrapper sets sym:overload properly, but it
// isn't at this point, so we have to manufacture it ourselves. At least