[PHP] Fix cleanup code handling issues

Fix to call cleanup code in exception situations and not to invoke
the freearg typemap twice in certain situations.

Fixes https://sourceforge.net/p/swig/bugs/1211/
This commit is contained in:
Olly Betts 2022-02-17 13:02:05 +13:00
commit 1707d6b89b
9 changed files with 54 additions and 16 deletions

View file

@ -51,7 +51,7 @@ namespace std {
%typemap(throws) string, const string& %{
zend_throw_exception(NULL, $1.c_str(), 0);
return;
goto fail;
%}
%typemap(in, phptype="string") const string & ($*1_ltype temp) %{