diff options
author | Frederic Peters <fpeters@entrouvert.com> | 2006-03-20 19:26:21 +0000 |
---|---|---|
committer | Frederic Peters <fpeters@entrouvert.com> | 2006-03-20 19:26:21 +0000 |
commit | 4424838976667824112217deed7b84c705c2788e (patch) | |
tree | 839ed2782f881c44d990cb79fa830ba97a2755ec /php | |
parent | 286d265588f283dbf14c102036a378a55bf503f1 (diff) | |
download | lasso-4424838976667824112217deed7b84c705c2788e.tar.gz lasso-4424838976667824112217deed7b84c705c2788e.tar.xz lasso-4424838976667824112217deed7b84c705c2788e.zip |
killed a chicken to restore swig voodoo; hope it is enough, I'm running out
of virgins.
Diffstat (limited to 'php')
-rwxr-xr-x | php/patch_swig_output.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/php/patch_swig_output.py b/php/patch_swig_output.py index d2ec2626..1b14d3e3 100755 --- a/php/patch_swig_output.py +++ b/php/patch_swig_output.py @@ -142,24 +142,24 @@ wrap = sys.stdin.read() # (1) begin = """ - } - - /* Wrap this return value */ + } + + /* Wrap this return value */ """ end = """ - *return_value=*obj; - } + *return_value=*obj; + } """ i = wrap.find(begin) while i >= 0: j = wrap.find(end, i) + len(end) segment = wrap[i:j] segment = segment.replace(begin, """ - /* Wrap this return value */ + /* Wrap this return value */ """) segment = segment.replace(end, """ - *return_value=*obj; - }} + *return_value=*obj; + }} """) wrap = '%s%s%s' % (wrap[:i], segment, wrap[j:]) i = wrap.find(begin, i + len(segment)) @@ -167,12 +167,13 @@ while i >= 0: # (2) begin = 'swig_type_info *ty = SWIG_TypeDynamicCast(' end = """ - *return_value=*obj; - }} + *return_value=*obj; + }} """ i = wrap.find(begin) while i >= 0: j = wrap.find(end, i) + len(end) + print >> sys.stderr, "END:", j, len(end) if j < len(end): # bails out if not found break segment = wrap[i:j] |