Don't segfault if PHP Null is passed as this pointer (e.g.
Class_method(Null)) - give a PHP Error instead. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9166 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
3c1661620a
commit
d95e0cce8a
2 changed files with 9 additions and 2 deletions
|
|
@ -1,6 +1,10 @@
|
|||
Version 1.3.30 (in progress)
|
||||
============================
|
||||
|
||||
06/17/2006: olly
|
||||
[php] Don't segfault if PHP Null is passed as this pointer (e.g.
|
||||
Class_method(Null)) - give a PHP Error instead.
|
||||
|
||||
06/15/2006: mutandiz
|
||||
[allegrocl]
|
||||
Add initial support for std::list container class.
|
||||
|
|
@ -50,7 +54,7 @@ Version 1.3.30 (in progress)
|
|||
|
||||
05/05/2006: olly
|
||||
[php] Fix wrappers generated for global 'char' variables to not
|
||||
include a terminating zero in the PHP string.
|
||||
include a terminating zero byte in the PHP string.
|
||||
|
||||
05/03/2006: wsfulton
|
||||
Modify typemaps so that char * can be applied to unsigned char * or signed char *
|
||||
|
|
|
|||
|
|
@ -1045,7 +1045,7 @@ public:
|
|||
// errors, or find a better way of dealing with _thisptr.
|
||||
// I would like, if objects are wrapped, to assume _thisptr is always
|
||||
// _this and not the first argument.
|
||||
// This may mean looking at Lang::memberfunctionhandler
|
||||
// This may mean looking at Language::memberfunctionHandler
|
||||
|
||||
for (i = 0, p = l; i < num_arguments; i++) {
|
||||
String * source;
|
||||
|
|
@ -1086,6 +1086,9 @@ public:
|
|||
Replaceall(tm,"$input", source);
|
||||
Setattr(p,"emit:input", source);
|
||||
Printf(f->code,"%s\n",tm);
|
||||
if (i == 0 && HashGetAttr(p, k_self)) {
|
||||
Printf(f->code,"\tif(!arg1) SWIG_PHP_Error(E_ERROR, \"this pointer is NULL\");\n");
|
||||
}
|
||||
p = Getattr(p,"tmap:in:next");
|
||||
if (i >= num_required) {
|
||||
Printf(f->code,"}\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue