From: William F. <wsf...@us...> - 2004-07-04 07:14:29
|
Update of /cvsroot/swig/SWIG In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv833 Modified Files: CHANGES.current Log Message: Index: CHANGES.current =================================================================== RCS file: /cvsroot/swig/SWIG/CHANGES.current,v retrieving revision 1.262 retrieving revision 1.263 diff -C2 -d -r1.262 -r1.263 *** CHANGES.current 27 Jun 2004 21:08:34 -0000 1.262 --- CHANGES.current 4 Jul 2004 07:14:21 -0000 1.263 *************** *** 134,137 **** --- 134,183 ---- *** POTENTIAL INCOMPATIBILITY FOR JAVA MODULE *** + The following macros contributed by Scott Michel may help you upgrade if you have used + the javagetcptr typemap: + + /* Utility macro for manipulating the Java body code method attributes */ + %define SWIGJAVA_ATTRIBS(TYPENAME, CTOR_ATTRIB, GETCPTR_ATTRIB) + %typemap(javabody) TYPENAME %{ + private long swigCPtr; + protected boolean swigCMemOwn; + + CTOR_ATTRIB $javaclassname(long cPtr, boolean cMemoryOwn) { + swigCMemOwn = cMemoryOwn; + swigCPtr = cPtr; + } + + GETCPTR_ATTRIB static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + %} + + %typemap(javabody_derived) TYPENAME %{ + private long swigCPtr; + + CTOR_ATTRIB $javaclassname(long cPtr, boolean cMemoryOwn) { + super($moduleJNI.SWIG$javaclassnameUpcast(cPtr), cMemoryOwn); + swigCPtr = cPtr; + } + + GETCPTR_ATTRIB static long getCPtr($javaclassname obj) { + return (obj == null) ? 0 : obj.swigCPtr; + } + %} + %enddef + + /* The default is protected getCPtr, protected constructor */ + SWIGJAVA_ATTRIBS(SWIGTYPE, protected, protected) + + /* Public getCPtr method, protected constructor */ + %define PUBLIC_GETCPTR(TYPENAME) + SWIGJAVA_ATTRIBS(TYPENAME, protected, public) + %enddef + + /* Public getCPtr method, public constructor */ + %define PUBLIC_BODYMETHODS(TYPENAME) + SWIGJAVA_ATTRIBS(TYPENAME, public, public) + %enddef + 06/03/2004: wsfulton [Java, C#] The contents of the class modifier typemaps and pragmas have changed. |