summaryrefslogtreecommitdiffstats
path: root/php
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2005-01-10 09:31:34 +0000
committerFrederic Peters <fpeters@entrouvert.com>2005-01-10 09:31:34 +0000
commita3ec4fd557958f906729ef221cf552b0898cb634 (patch)
tree02e3297ffcde8a54489f6c4894de9d503e64175d /php
parent9a741aa87859b4cb10f5c644608859ee8c112a1d (diff)
downloadlasso-a3ec4fd557958f906729ef221cf552b0898cb634.tar.gz
lasso-a3ec4fd557958f906729ef221cf552b0898cb634.tar.xz
lasso-a3ec4fd557958f906729ef221cf552b0898cb634.zip
changed php swig patch script to use stdin and stdout
Diffstat (limited to 'php')
-rwxr-xr-xphp/patch_swig_output.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/php/patch_swig_output.py b/php/patch_swig_output.py
index c8d82e2d..2c15c7eb 100755
--- a/php/patch_swig_output.py
+++ b/php/patch_swig_output.py
@@ -84,9 +84,9 @@ with:
}
"""
-wrapFile = file('lasso_wrap.c')
-wrap = wrapFile.read()
-wrapFile.close()
+import sys
+
+wrap = sys.stdin.read()
i = wrap.find(' {\n swig_type_info *ty = SWIG_TypeDynamicCast(')
while i >= 0:
@@ -124,6 +124,4 @@ while i >= 0:
wrap = '%s%s%s' % (wrap[:i], segment, wrap[j:])
i = wrap.find(' {\n swig_type_info *ty = SWIG_TypeDynamicCast(', i + len(segment))
-wrapFile = file('lasso_wrap_patched.c', 'w')
-wrapFile.write(wrap)
-wrapFile.close()
+print wrap