summaryrefslogtreecommitdiffstats
path: root/bindings/lang_php5_helpers/wrapper_source.py
diff options
context:
space:
mode:
Diffstat (limited to 'bindings/lang_php5_helpers/wrapper_source.py')
-rw-r--r--bindings/lang_php5_helpers/wrapper_source.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bindings/lang_php5_helpers/wrapper_source.py b/bindings/lang_php5_helpers/wrapper_source.py
index c6a348a9..e08c089c 100644
--- a/bindings/lang_php5_helpers/wrapper_source.py
+++ b/bindings/lang_php5_helpers/wrapper_source.py
@@ -217,7 +217,9 @@ PHP_MSHUTDOWN_FUNCTION(lasso)
print >> self.fd, ' %s = (%s)cvt_%s->obj;' % (arg[1], arg[0], arg[1])
if m.return_type is not None:
- print >> self.fd, ' return_c_value =',
+ print >> self.fd, ' return_c_value = ',
+ if 'new' in m.name:
+ print >> self.fd, '(%s)' % m.return_type,
else:
print >> self.fd, ' ',
print >> self.fd, '%s(%s);' % (m.name, ', '.join([x[1] for x in m.args]))