Correct changes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5977 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-06-04 23:19:44 +00:00
commit e2d6865cc3
2 changed files with 21 additions and 5 deletions

View file

@ -29,17 +29,31 @@ import java.lang.*; // for Exception
%}
// Create a new getCPtr() function which takes Java null and is public
// Make the pointer constructor public
%typemap(javabody) NS::Greeting %{
private long swigCPtr;
protected boolean swigCMemOwn;
protected $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
public static long getCPtr($javaclassname obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
%}
// Make the pointer constructor public
%typemap(javabody) NS::Farewell %{
private long swigCPtr;
protected boolean swigCMemOwn;
public $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
public static long getCPtr($javaclassname obj) {
protected static long getCPtr($javaclassname obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
%}

View file

@ -39,13 +39,15 @@ import java.lang.*; // for Exception
// Make the pointer constructor public
%typemap(javabody) Farewell * %{
private long swigCPtr;
protected boolean swigCMemOwn;
public $javaclassname(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
public $javaclassname(long cPtr, boolean bFutureUse) {
swigCPtr = cPtr;
}
protected $javaclassname() {
swigCPtr = 0;
}
public static long getCPtr($javaclassname obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}