- pgcpp fix for const methods
- DeleteLocalRef removed from end of director methods - it causes crashes on Solaris git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9493 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
206e5c64af
commit
3f0d00a5d3
1 changed files with 8 additions and 1 deletions
|
|
@ -1947,17 +1947,22 @@ class JAVA : public Language {
|
||||||
Printv(imcall, imclass_name, ".", intermediary_function_name, "(", NIL);
|
Printv(imcall, imclass_name, ".", intermediary_function_name, "(", NIL);
|
||||||
if (!static_flag) {
|
if (!static_flag) {
|
||||||
Printf(imcall, "swigCPtr");
|
Printf(imcall, "swigCPtr");
|
||||||
|
|
||||||
String *this_type = Copy(getClassType());
|
String *this_type = Copy(getClassType());
|
||||||
String *name = NewString("self");
|
String *name = NewString("self");
|
||||||
|
String *qualifier = Getattr(n, k_qualifier);
|
||||||
|
if (qualifier)
|
||||||
|
SwigType_push(this_type, qualifier);
|
||||||
SwigType_add_pointer(this_type);
|
SwigType_add_pointer(this_type);
|
||||||
Parm *this_parm = NewParm(this_type, name);
|
Parm *this_parm = NewParm(this_type, name);
|
||||||
Swig_typemap_attach_parms("jtype", this_parm, NULL);
|
Swig_typemap_attach_parms("jtype", this_parm, NULL);
|
||||||
|
|
||||||
if (prematureGarbageCollectionPreventionParameter(this_type, this_parm))
|
if (prematureGarbageCollectionPreventionParameter(this_type, this_parm))
|
||||||
Printf(imcall, ", this");
|
Printf(imcall, ", this");
|
||||||
|
|
||||||
|
Delete(this_parm);
|
||||||
Delete(name);
|
Delete(name);
|
||||||
Delete(this_type);
|
Delete(this_type);
|
||||||
Delete(this_parm);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit_mark_varargs(l);
|
emit_mark_varargs(l);
|
||||||
|
|
@ -3567,7 +3572,9 @@ class JAVA : public Language {
|
||||||
Printf(w->code, "SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, \"null upcall object\");\n");
|
Printf(w->code, "SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, \"null upcall object\");\n");
|
||||||
Printf(w->code, "}\n");
|
Printf(w->code, "}\n");
|
||||||
|
|
||||||
|
/* This makes all the director methods segfault on Solaris 8
|
||||||
Printf(w->code, "if (jobj) jenv->DeleteLocalRef(jobj);\n");
|
Printf(w->code, "if (jobj) jenv->DeleteLocalRef(jobj);\n");
|
||||||
|
*/
|
||||||
|
|
||||||
if (!is_void)
|
if (!is_void)
|
||||||
Printf(w->code, "return %s;", qualified_return);
|
Printf(w->code, "return %s;", qualified_return);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue