diff options
| author | Emmanuel Raviart <eraviart@entrouvert.com> | 2005-01-21 16:47:44 +0000 |
|---|---|---|
| committer | Emmanuel Raviart <eraviart@entrouvert.com> | 2005-01-21 16:47:44 +0000 |
| commit | b6e35e7db50a95126f8926eae9145d9acfc123f3 (patch) | |
| tree | d209662d040319351e8c6007b149acbdbf56b59a /php | |
| parent | b9a98851882ef49126faca925578284b83351dd3 (diff) | |
| download | lasso-b6e35e7db50a95126f8926eae9145d9acfc123f3.tar.gz lasso-b6e35e7db50a95126f8926eae9145d9acfc123f3.tar.xz lasso-b6e35e7db50a95126f8926eae9145d9acfc123f3.zip | |
SWIG: Added yet another correction in generated PHP lasso_wrap.c for
handling of optional arguments.
Diffstat (limited to 'php')
| -rwxr-xr-x | php/patch_swig_output.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/php/patch_swig_output.py b/php/patch_swig_output.py index 4daf4e4e..f98c1bcc 100755 --- a/php/patch_swig_output.py +++ b/php/patch_swig_output.py @@ -126,6 +126,10 @@ with: }} This program corrects (3), by replacing things like: + if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS) +with: + if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS) +and by replacing: if(arg_count > 1) { with: if(arg_count > 1 - argbase) { @@ -178,6 +182,8 @@ while i >= 0: i = wrap.find(begin, i + len(segment)) # (3) +wrap = wrap.replace('if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)', + 'if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)') for i in range(10): wrap = wrap.replace('if(arg_count > %d) {' % i, 'if(arg_count > %d - argbase) {' % i) |
