|
| 1 | +Version 1.3.17 (November 22, 2002) |
| 2 | +================================== |
| 3 | +11/19/2002: beazley |
| 4 | + Fixed [ 613922 ] preprocessor errors with HAVE_LONG_LONG. |
| 5 | + |
| 6 | +11/19/2002: beazley |
| 7 | + Fixed [ 615480 ] mzscheme SWIG_MustGetPtr_. |
| 8 | + |
| 9 | +11/19/2002: beazley |
| 10 | + Fixed [ 635119 ] SWIG_croak causes compiler warning. |
| 11 | + |
| 12 | +11/16/2002: cheetah (William Fulton) |
| 13 | + [Java] Added typemaps for pointers to class members. |
| 14 | + |
| 15 | +11/15/2002: cheetah (William Fulton) |
| 16 | + [Java] Bug fix: Overloaded C++ functions which cannot be overloaded in Java |
| 17 | + once again issue a warning. |
| 18 | + |
| 19 | +11/14/2002: cheetah (William Fulton) |
| 20 | + [Java] Handling of NULL pointers is improved. A java null object will now |
| 21 | + be translated to and from a NULL C/C++ pointer by default. Previously when |
| 22 | + wrapping: |
| 23 | + |
| 24 | + class SomeClass {...}; |
| 25 | + void foo(SomeClass *s); |
| 26 | + |
| 27 | + and it was called from Java with null: |
| 28 | + |
| 29 | + modulename.foo(null) |
| 30 | + |
| 31 | + a Java NullPointerException was thrown. Extra typemaps had to be written in |
| 32 | + order to obtain a NULL pointer to pass to functions like this one. Now the |
| 33 | + default wrapping will detect 'null' and translate it into a NULL pointer. |
| 34 | + Also if a function returns a NULL pointer, eg: |
| 35 | + |
| 36 | + SomeClass *bar() { return NULL; } |
| 37 | + |
| 38 | + Then this used to be wrapped with a SomeClass proxy class holding a NULL |
| 39 | + pointer. Now null is returned instead. These changes are subtle but useful. |
| 40 | + The original behaviour can be obtained by using the original typemaps: |
| 41 | + |
| 42 | + %typemap(javaout) SWIGTYPE { |
| 43 | + return new $&javaclassname($jnicall, true); |
| 44 | + } |
| 45 | + %typemap(javaout) SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] { |
| 46 | + return new $javaclassname($jnicall, $owner); |
| 47 | + } |
| 48 | + %typemap(javagetcptr) SWIGTYPE, SWIGTYPE *, SWIGTYPE &, SWIGTYPE [] %{ |
| 49 | + protected static long getCPtr($javaclassname obj) { |
| 50 | + return obj.swigCPtr; |
| 51 | + } |
| 52 | + %} |
| 53 | + |
| 54 | + *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE *** |
| 55 | + |
| 56 | + |
| 57 | +11/12/2002: beazley |
| 58 | + Fixed problem with abstract methods and signatures. For example: |
| 59 | + |
| 60 | + class abstract_foo { |
| 61 | + public: |
| 62 | + virtual int meth(int meth_param) = 0; |
| 63 | + }; |
| 64 | + |
| 65 | + |
| 66 | + class abstract_bar : public abstract_foo { |
| 67 | + public: |
| 68 | + int meth(int meth_param_1, int meth_param_2) { return 0; } |
| 69 | + }; |
| 70 | + |
| 71 | + In this case, abstract_bar is still abstract. |
| 72 | + |
| 73 | + Fixes [ 628438 ] Derived abstract class not abstract. |
| 74 | + Reported and patched by Scott Michel. |
| 75 | + |
| 76 | +11/11/2002: beazley |
| 77 | + Fixed a matching problem with typemaps and array dimensions. For example, if you |
| 78 | + had this: |
| 79 | + |
| 80 | + typedef char blah[20]; |
| 81 | + |
| 82 | + and a typemap: |
| 83 | + |
| 84 | + %typemap() char [ANY] { |
| 85 | + ... $1_dim0 ... |
| 86 | + } |
| 87 | + |
| 88 | + then $1_dim* variables weren't be expanded properly. It should work now. |
| 89 | + Problem reported by Pankaj Kumar Goel. |
| 90 | + |
| 91 | +11/07/2002: mkoeppe |
| 92 | + Added an experimental new module that dumps SWIG's parse |
| 93 | + tree as (Common) Lisp s-expressions. The module is |
| 94 | + invoked with SWIG's -sexp command-line switch. The output |
| 95 | + can be read into Common Lisp. There is (prototype) |
| 96 | + example Lisp code that generates Foreign Function Interface |
| 97 | + definitions for use with Kevin Rosenberg's UFFI. |
| 98 | + |
| 99 | + *** EXPERIMENTAL NEW FEATURE *** |
| 100 | + |
| 101 | +11/07/2002: mkoeppe |
| 102 | + Removed duplicate declaration of "cpp_template_decl" in |
| 103 | + parser.y; bison 1.75 complained. |
| 104 | + |
| 105 | +11/06/2002: cheetah (William Fulton) |
| 106 | + [Java] Default primitive array handling has changed like arrays of classes. |
| 107 | + C primitive arrays are no longer wrapped by a Java array but with a pointer |
| 108 | + (type wrapper class). Again the changes have been made for efficiency reasons. |
| 109 | + The original typemaps have been moved into arrays_java.i, so the original |
| 110 | + behaviour can be obtained merely including this file: |
| 111 | + |
| 112 | + %include "arrays_java.i" |
| 113 | + |
| 114 | + The array support functions are no longer generated by default. They are only |
| 115 | + generated when including this file, thus this often unused code is only |
| 116 | + generated when specifically requiring this type of array support. |
| 117 | + |
| 118 | + *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE *** |
| 119 | + |
| 120 | +11/05/2002: ljohnson (Lyle Johnson) |
| 121 | + [Ruby] Added support for nested module declarations (as was |
| 122 | + previously added for the Perl module). So a %module directive |
| 123 | + of the form: |
| 124 | + |
| 125 | + %module "Outer::Inner::Foo" |
| 126 | + |
| 127 | + will nest everything as (in Ruby code): |
| 128 | + |
| 129 | + module Outer |
| 130 | + module Inner |
| 131 | + module Foo |
| 132 | + # stuff goes here |
| 133 | + end |
| 134 | + end |
| 135 | + end |
| 136 | + |
| 137 | +11/05/2002: mkoeppe |
| 138 | + [MzScheme] Add an argument (-declaremodule) that generates |
| 139 | + code to correctly declare a primitive module extension. |
| 140 | + Patch submitted by Bruce Butterfield. |
| 141 | + |
| 142 | +11/02/2002: cheetah (William Fulton) |
| 143 | + [Java] Added patch submitted by Michael Cahill to remove unused parameter |
| 144 | + warnings for the jenv and cls parameters. This patch also also allows one |
| 145 | + to use "void" in the jni typemap for any type without code being generated |
| 146 | + attempting to return a value. |
| 147 | + |
| 148 | +10/29/2002: cheetah (William Fulton) |
| 149 | + [Java] Array handling is different. Arrays of classes are no longer wrapped |
| 150 | + with proxy arrays, eg wrapping |
| 151 | + |
| 152 | + class X {...}; |
| 153 | + X foo[10]; |
| 154 | + |
| 155 | + used to be wrapped with these Java getters and setters: |
| 156 | + |
| 157 | + public static void setFoo(X[] value) {...} |
| 158 | + public static X[] getFoo() {...} |
| 159 | + |
| 160 | + This approach is very inefficient as the entire array is copied numerous |
| 161 | + times on each invocation of the getter or setter. These arrays are now |
| 162 | + wrapped with a pointer so it is only possible to access the first array element |
| 163 | + using a proxy class: |
| 164 | + |
| 165 | + public static void setFoo(X value) {...} |
| 166 | + public static X getFoo() {...} |
| 167 | + |
| 168 | + Arrays of enums have also been similarly changed. This behaviour is now like the |
| 169 | + other SWIG language's implementation and the array library should be used to |
| 170 | + access the other elements. The original behaviour can be achieved using the |
| 171 | + macros and typemaps in arrays_java.i, for example: |
| 172 | + |
| 173 | + %include "arrays_java.i" |
| 174 | + JAVA_ARRAYSOFCLASSES(X) |
| 175 | + class X {...}; |
| 176 | + X foo[10]; |
| 177 | + |
| 178 | + *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE *** |
| 179 | + |
| 180 | +10/29/2002: cheetah (William Fulton) |
| 181 | + [Java] Two new typemaps javain and javaout for generating the proxy class |
| 182 | + and type wrapper class method calls to the JNI class. The new typemaps are |
| 183 | + really used for transforming the jstype (used in proxy class and type wrapper |
| 184 | + classes) to the jtype (used in the JNI class) and visa versa. A javain typemap |
| 185 | + is required whenever an in typemap is written and similarly javaout for an out |
| 186 | + typemap. An example is probably best to show them working: |
| 187 | + |
| 188 | + %typemap(javain) Class "Class.getCPtr($javainput)" |
| 189 | + %typemap(javain) unsigned short "$javainput" |
| 190 | + %typemap(javaout) Class * { |
| 191 | + return new Class($jnicall, $owner); |
| 192 | + } |
| 193 | + |
| 194 | + %inline %{ |
| 195 | + class Class {}; |
| 196 | + Class * bar(Class cls, unsigned short ush) { return new Class(); }; |
| 197 | + %} |
| 198 | + |
| 199 | + The generated proxy code is then: |
| 200 | + |
| 201 | + public static Class bar(Class cls, int ush) { |
| 202 | + return new Class(exampleJNI.bar(Class.getCPtr(cls), ush), false); |
| 203 | + } |
| 204 | + |
| 205 | + |
| 206 | + Some new special variables have been introduced in order to use these typemaps. |
| 207 | + Here $javainput has been replaced by 'cls' and 'ush'. $jnicall has been replaced by |
| 208 | + the native method call, 'exampleJNI.bar(...)' and $owner has been replaced by 'false'. |
| 209 | + $javainput is analogous to the $input special variable. It is replaced by the parameter name. |
| 210 | + $jnicall is analogous to $action in %exception. It is replaced by the call to the native |
| 211 | + method in the JNI class. |
| 212 | + $owner is replaced by either true if %newobject has been used otherwise false. |
| 213 | + |
| 214 | + The java.swg file contains default javain and javout typemaps which will produce the same code |
| 215 | + as previously. This change is only of concern to those who have written their own typemaps as |
| 216 | + you will then most likely have to write your own javain and javaout typemaps. |
| 217 | + |
| 218 | + The javaout typemap also makes it possible to use a Java downcast to be used on abstract |
| 219 | + proxy base classes. See the Java documentation on dynamic_cast. |
| 220 | + |
| 221 | + *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE *** |
| 222 | + |
| 223 | +10/24/2002: ttn |
| 224 | + [Methodology] Upgaded to libtool 1.4.3, presumably w/ better |
| 225 | + support for newish platforms (like MacOS X). |
| 226 | + |
| 227 | +10/21/2002: ttn |
| 228 | + Fixed Runtime/Makefile.in bug -- thanks to Richard Calmbach. |
| 229 | + |
| 230 | +10/18/2002: ttn |
| 231 | + Fixed typo in doh.h -- thanks to Max Horn. |
| 232 | + |
0 commit comments