summaryrefslogtreecommitdiffstats
path: root/php
diff options
context:
space:
mode:
Diffstat (limited to 'php')
-rwxr-xr-xphp/patch_swig_output.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/php/patch_swig_output.py b/php/patch_swig_output.py
index 1ab9f6ea..9b548ac2 100755
--- a/php/patch_swig_output.py
+++ b/php/patch_swig_output.py
@@ -135,6 +135,7 @@ with:
if(arg_count > 1 - argbase) {
"""
+import re
import sys
wrap = sys.stdin.read()
@@ -187,4 +188,8 @@ wrap = wrap.replace('if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SU
for i in range(10):
wrap = wrap.replace('if(arg_count > %d) {' % i, 'if(arg_count > %d - argbase) {' % i)
+
+wrap = re.sub(r'zend_register_internal_class_ex(.*)NULL,NULL\)',
+ r'zend_register_internal_class_ex\1NULL,NULL TSRMLS_CC)', wrap)
+
print wrap