[php] Initialise zval in directorin typemaps
SWIG_SetPointerZval() requires the zval structure passed to be initialised (so it can handle the constructor case where the zval is already initialised as a PHP object. I couldn't think of a suitable regression test for this, but it fixes 2 issues detected by running director_basic under valgrind.
This commit is contained in:
parent
901d1fc061
commit
5f5a8f2d4a
1 changed files with 2 additions and 0 deletions
|
|
@ -419,6 +419,7 @@
|
|||
SWIGTYPE &,
|
||||
SWIGTYPE &&
|
||||
%{
|
||||
ZVAL_UNDEF($input);
|
||||
SWIG_SetPointerZval($input, (void *)&$1, $1_descriptor, $owner);
|
||||
%}
|
||||
|
||||
|
|
@ -460,6 +461,7 @@
|
|||
|
||||
%typemap(directorin) SWIGTYPE
|
||||
%{
|
||||
ZVAL_UNDEF($input);
|
||||
SWIG_SetPointerZval($input, SWIG_as_voidptr(new $1_ltype((const $1_ltype &)$1)), $&1_descriptor, 1);
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue