Fix to work with a ZTS build of PHP (broken in 2.0.7)

This commit is contained in:
Olly Betts 2013-01-08 18:33:47 +13:00
commit 0dd11cdd8d
2 changed files with 4 additions and 0 deletions

View file

@ -418,6 +418,7 @@ public:
Append(s_header, "static void SWIG_FAIL() __attribute__ ((__noreturn__));\n");
Append(s_header, "#endif\n\n");
Append(s_header, "static void SWIG_FAIL() {\n");
Append(s_header, " TSRMLS_FETCH();\n");
Append(s_header, " zend_error(SWIG_ErrorCode(), \"%s\", SWIG_ErrorMsg());\n");
// zend_error() should never return with the parameters we pass, but if it
// does, we really don't want to let SWIG_FAIL() return. This also avoids