[PHP] Fix segfault in director upcall check
Manifest only when using PHP built with ZTS enabled.
This commit is contained in:
parent
f6b84f414b
commit
682b4dd843
2 changed files with 12 additions and 7 deletions
|
|
@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
|
|||
Version 3.0.4 (in progress)
|
||||
===========================
|
||||
|
||||
2015-01-12: olly
|
||||
[PHP] Fix segfault in director upcall check when using PHP built with
|
||||
ZTS enabled. Fixes #155, reported by Pierre Labastie.
|
||||
|
||||
2015-01-08: wsfulton
|
||||
[Python] Fix #294 #296 - Regression introduced in SWIG-3.0.3 when
|
||||
wrapping functions with default arguments. Now any method with default
|
||||
|
|
|
|||
|
|
@ -826,13 +826,6 @@ public:
|
|||
Delete(args);
|
||||
args = NULL;
|
||||
}
|
||||
if (is_member_director(n)) {
|
||||
Wrapper_add_local(f, "director", "Swig::Director *director = 0");
|
||||
Printf(f->code, "director = dynamic_cast<Swig::Director*>(arg1);\n");
|
||||
Wrapper_add_local(f, "upcall", "bool upcall = false");
|
||||
Printf(f->code, "upcall = !director->swig_is_overridden_method((char *)\"%s%s\", (char *)\"%s\");\n",
|
||||
prefix, Swig_class_name(Swig_methodclass(n)), name);
|
||||
}
|
||||
|
||||
// This generated code may be called:
|
||||
// 1) as an object method, or
|
||||
|
|
@ -921,6 +914,14 @@ public:
|
|||
Delete(source);
|
||||
}
|
||||
|
||||
if (is_member_director(n)) {
|
||||
Wrapper_add_local(f, "director", "Swig::Director *director = 0");
|
||||
Printf(f->code, "director = dynamic_cast<Swig::Director*>(arg1);\n");
|
||||
Wrapper_add_local(f, "upcall", "bool upcall = false");
|
||||
Printf(f->code, "upcall = !director->swig_is_overridden_method((char *)\"%s%s\", (char *)\"%s\");\n",
|
||||
prefix, Swig_class_name(Swig_methodclass(n)), name);
|
||||
}
|
||||
|
||||
Swig_director_emit_dynamic_cast(n, f);
|
||||
|
||||
/* Insert constraint checking code */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue