*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6009 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6b5b4028db
commit
f9ab536aca
1 changed files with 46 additions and 0 deletions
|
|
@ -133,6 +133,52 @@ Version 1.3.22 (in progress)
|
|||
|
||||
*** 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.
|
||||
They must now include the class type. Previously 'class' was hard coded.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue