diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2013-01-30 22:18:13 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2013-01-30 22:18:13 +0000 |
commit | 397409fbb1336690c99e77f4f23043626e495d98 (patch) | |
tree | bcee1f20134fbd66e49d236ec8dc67b5680a89b5 | |
parent | d172e3d0ed96e1f242ebaa4066f556a8abe0e764 (diff) | |
download | swig-397409fbb1336690c99e77f4f23043626e495d98.tar.gz |
Ensure 'javapackage' typemap is used as it stopped working from version 2.0.5
-rw-r--r-- | CHANGES.current | 3 | ||||
-rw-r--r-- | Doc/Manual/Java.html | 7 | ||||
-rw-r--r-- | Source/Modules/java.cxx | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/CHANGES.current b/CHANGES.current index 1d09ab875..e6aebdb06 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release. Version 2.0.10 (in progress) ============================ +2013-01-29: William + [Java] Ensure 'javapackage' typemap is used as it stopped working from version 2.0.5. + 2013-01-28: William [Python] Apply patch SF #334 - Fix default value conversions "TRUE"->True, "FALSE"->False. diff --git a/Doc/Manual/Java.html b/Doc/Manual/Java.html index 8245d46eb..0024d602a 100644 --- a/Doc/Manual/Java.html +++ b/Doc/Manual/Java.html @@ -5662,7 +5662,7 @@ to make the method and constructor public: <p> The Java directors feature requires the "javadirectorin", "javadirectorout", "directorin" and the "directorout" typemaps in order to work properly. -The "javapackage" typemap is an optional typemap used to identify the Java package path for individual SWIG generated proxy classes. +The "javapackage" typemap is an optional typemap used to identify the Java package path for individual SWIG generated proxy classes used in director methods. </p> <p><tt>%typemap(directorin)</tt></p> @@ -5803,6 +5803,7 @@ The target method is the method in the Java proxy class which overrides the virt <p> The "javapackage" typemap is optional; it serves to identify a class's Java package. This typemap should be used in conjunction with classes that are defined outside of the current SWIG interface file. +The typemap is only used if the type is used in a director method, that is, in a virtual method in a director class. For example: </p> @@ -5819,7 +5820,7 @@ For example: class Example { public: virtual ~Example(); - void ping(Foo *arg1, Bar *arg2); + virtual void ping(Foo *arg1, Bar *arg2); }; } </pre> @@ -5844,7 +5845,7 @@ The corrected interface file looks like: class Example { public: virtual ~Example(); - void ping(Foo *arg1, Bar *arg2); + virtual void ping(Foo *arg1, Bar *arg2); }; } </pre> diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx index 987b6ddf6..2fb21eca8 100644 --- a/Source/Modules/java.cxx +++ b/Source/Modules/java.cxx @@ -3527,7 +3527,7 @@ public: String *pkg_path = Swig_typemap_lookup("javapackage", p, "", 0); SwigType *type = Getattr(p, "type"); - if (pkg_path || Len(pkg_path) == 0) + if (!pkg_path || Len(pkg_path) == 0) pkg_path = package_path; String *descriptor_out = Copy(descriptor_in); |