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:
parent
2f83a02f4a
commit
e2d6865cc3
2 changed files with 21 additions and 5 deletions
|
|
@ -29,17 +29,31 @@ import java.lang.*; // for Exception
|
||||||
%}
|
%}
|
||||||
|
|
||||||
// Create a new getCPtr() function which takes Java null and is public
|
// Create a new getCPtr() function which takes Java null and is public
|
||||||
// Make the pointer constructor public
|
|
||||||
%typemap(javabody) NS::Greeting %{
|
%typemap(javabody) NS::Greeting %{
|
||||||
private long swigCPtr;
|
private long swigCPtr;
|
||||||
protected boolean swigCMemOwn;
|
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) {
|
public $javaclassname(long cPtr, boolean cMemoryOwn) {
|
||||||
swigCMemOwn = cMemoryOwn;
|
swigCMemOwn = cMemoryOwn;
|
||||||
swigCPtr = cPtr;
|
swigCPtr = cPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static long getCPtr($javaclassname obj) {
|
protected static long getCPtr($javaclassname obj) {
|
||||||
return (obj == null) ? 0 : obj.swigCPtr;
|
return (obj == null) ? 0 : obj.swigCPtr;
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,15 @@ import java.lang.*; // for Exception
|
||||||
// Make the pointer constructor public
|
// Make the pointer constructor public
|
||||||
%typemap(javabody) Farewell * %{
|
%typemap(javabody) Farewell * %{
|
||||||
private long swigCPtr;
|
private long swigCPtr;
|
||||||
protected boolean swigCMemOwn;
|
|
||||||
|
|
||||||
public $javaclassname(long cPtr, boolean cMemoryOwn) {
|
public $javaclassname(long cPtr, boolean bFutureUse) {
|
||||||
swigCMemOwn = cMemoryOwn;
|
|
||||||
swigCPtr = cPtr;
|
swigCPtr = cPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected $javaclassname() {
|
||||||
|
swigCPtr = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public static long getCPtr($javaclassname obj) {
|
public static long getCPtr($javaclassname obj) {
|
||||||
return (obj == null) ? 0 : obj.swigCPtr;
|
return (obj == null) ? 0 : obj.swigCPtr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue