correct some casts
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8693 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5eee70b724
commit
00e438aaa7
1 changed files with 4 additions and 4 deletions
|
|
@ -5682,7 +5682,7 @@ allow the calling function to read the double * value after returning from the f
|
||||||
jfieldID fid = jenv->GetFieldID(clazz, "swigCPtr", "J");
|
jfieldID fid = jenv->GetFieldID(clazz, "swigCPtr", "J");
|
||||||
jlong cPtr = jenv->GetLongField($input, fid);
|
jlong cPtr = jenv->GetLongField($input, fid);
|
||||||
MyDouble *pMyDouble = NULL;
|
MyDouble *pMyDouble = NULL;
|
||||||
*(MyDouble **)&pMyDouble = *(MyDouble **)&cPtr;
|
*(MyDouble **)(void *)&pMyDouble = *(MyDouble **)(void *)&cPtr;
|
||||||
$1 = &pMyDouble->value;
|
$1 = &pMyDouble->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5847,7 +5847,7 @@ Add the following before the definition of <tt>vehicle_factory</tt>:
|
||||||
<div class="code"><pre>
|
<div class="code"><pre>
|
||||||
%typemap(out) Vehicle * {
|
%typemap(out) Vehicle * {
|
||||||
Ambulance *downcast = dynamic_cast<Ambulance *>($1);
|
Ambulance *downcast = dynamic_cast<Ambulance *>($1);
|
||||||
*(Ambulance **)&$result = downcast;
|
*(Ambulance **)(void *)&$result = downcast;
|
||||||
}
|
}
|
||||||
|
|
||||||
%typemap(javaout) Vehicle * {
|
%typemap(javaout) Vehicle * {
|
||||||
|
|
@ -5915,7 +5915,7 @@ Note that in this case, the Java class is constructed using JNI code rather than
|
||||||
jmethodID mid = jenv->GetMethodID(clazz, "<init>", "(JZ)V");
|
jmethodID mid = jenv->GetMethodID(clazz, "<init>", "(JZ)V");
|
||||||
if (mid) {
|
if (mid) {
|
||||||
jlong cptr = 0;
|
jlong cptr = 0;
|
||||||
*(Ambulance **)&cptr = ambulance;
|
*(Ambulance **)(void *)&cptr = ambulance;
|
||||||
$result = jenv->NewObject(clazz, mid, cptr, false);
|
$result = jenv->NewObject(clazz, mid, cptr, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5926,7 +5926,7 @@ Note that in this case, the Java class is constructed using JNI code rather than
|
||||||
jmethodID mid = jenv->GetMethodID(clazz, "<init>", "(JZ)V");
|
jmethodID mid = jenv->GetMethodID(clazz, "<init>", "(JZ)V");
|
||||||
if (mid) {
|
if (mid) {
|
||||||
jlong cptr = 0;
|
jlong cptr = 0;
|
||||||
*(FireEngine **)&cptr = fireengine;
|
*(FireEngine **)(void *)&cptr = fireengine;
|
||||||
$result = jenv->NewObject(clazz, mid, cptr, false);
|
$result = jenv->NewObject(clazz, mid, cptr, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue