summaryrefslogtreecommitdiffstats
path: root/php
diff options
context:
space:
mode:
authorEmmanuel Raviart <eraviart@entrouvert.com>2005-01-11 23:35:02 +0000
committerEmmanuel Raviart <eraviart@entrouvert.com>2005-01-11 23:35:02 +0000
commit938d60afcefacb9a9d4deb94ef171cb634c43774 (patch)
tree4783f632479e667af92b695713f3b40ae5a83a4b /php
parenta1f6a3fd8e4bf3d6adeafd381096659324f36997 (diff)
downloadlasso-938d60afcefacb9a9d4deb94ef171cb634c43774.tar.gz
lasso-938d60afcefacb9a9d4deb94ef171cb634c43774.tar.xz
lasso-938d60afcefacb9a9d4deb94ef171cb634c43774.zip
Corrected SWIG PHP output patch to be pre-C99 compatible.
Diffstat (limited to 'php')
-rwxr-xr-xphp/patch_swig_output.py19
1 files changed, 4 insertions, 15 deletions
diff --git a/php/patch_swig_output.py b/php/patch_swig_output.py
index 2c15c7eb..7a8fec2f 100755
--- a/php/patch_swig_output.py
+++ b/php/patch_swig_output.py
@@ -72,6 +72,7 @@ with:
swig_type_info *ty = SWIG_TypeDynamicCast(SWIGTYPE_p_LassoXXX, (void **) &result);
SWIG_SetPointerZval(return_value, (void *)result, ty, 0);
/* Wrap this return value */
+ {
/* ALTERNATIVE Constructor, make an object wrapper */
zval *obj, *_cPtr;
MAKE_STD_ZVAL(obj);
@@ -81,7 +82,7 @@ with:
object_init_ex(obj,ptr_ce_swig_LassoSamlpResponseAbstract);
add_property_zval(obj,"_cPtr",_cPtr);
*return_value=*obj;
- }
+ }}
"""
import sys
@@ -96,28 +97,16 @@ while i >= 0:
"""
j = wrap.find(end, i) + len(end)
segment = wrap[i:j]
- if 'this_ptr' in segment:
- segment = segment.replace("""
+ segment = segment.replace("""
}
/* Wrap this return value */
- if (this_ptr) {
""", """
/* Wrap this return value */
- if (this_ptr) {
""")
-
- segment = segment.replace(end, """
+ segment = segment.replace(end, """
*return_value=*obj;
}}
""")
- else:
- segment = segment.replace("""
- }
- /* Wrap this return value */
- {
-""", """
- /* Wrap this return value */
-""")
x = segment.find('object_init_ex(obj,') + len('object_init_ex(obj,')
y = segment.find(')', x)
segment = '%s%s%s' % (segment[:x], 'get_node_info_with_swig(ty)->php', segment[y:])