summaryrefslogtreecommitdiffstats
path: root/php
diff options
context:
space:
mode:
Diffstat (limited to 'php')
-rwxr-xr-xphp/patch_swig_output.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/php/patch_swig_output.py b/php/patch_swig_output.py
index fcf03d71..d00df59e 100755
--- a/php/patch_swig_output.py
+++ b/php/patch_swig_output.py
@@ -195,4 +195,11 @@ wrap = re.sub(r'zend_register_internal_class_ex(.*)NULL,NULL\)',
wrap = re.sub('zend_rsrc_list_get_rsrc_type(.*)lval',
r'zend_rsrc_list_get_rsrc_type\1lval TSRMLS_CC', wrap)
+wrap = wrap.replace('int argbase=0 ;\n \n \n', 'int argbase=0 ;\n TSRMLS_FETCH();\n\n')
+wrap = wrap.replace('zval *return_value=&_return_value;',
+ 'zval *return_value=&_return_value;\n TSRMLS_FETCH();\n')
+
+wrap = wrap.replace('int argbase=0 ;\n \n {\n node_info *info, *super;\n%s' % (' \n'*8),
+ 'int argbase=0 ;\n\n TSRMLS_FETCH();\n {\n node_info *info, *super;\n')
+
print wrap