From 81ef2515cee1c5c0dd46be667e23e6f407b68728 Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Tue, 29 Apr 2008 12:08:43 +0000 Subject: [project @ fpeters@0d.be-20080326094754-cw66nuog62q06ekk] merging benjamin branch Original author: Frederic Peters Date: 2008-03-26 10:47:54.384000+01:00 --- bindings/lang_php5_helpers/php_code.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bindings/lang_php5_helpers/php_code.py') diff --git a/bindings/lang_php5_helpers/php_code.py b/bindings/lang_php5_helpers/php_code.py index 5c175f87..fc4a2f95 100644 --- a/bindings/lang_php5_helpers/php_code.py +++ b/bindings/lang_php5_helpers/php_code.py @@ -149,8 +149,12 @@ function getRequestTypeFromSoapMsg($mesg) { print >> self.fd, '' if m.name == method_prefix + 'new_from_dump': - print >> self.fd, ' public static function newFromDump($dump) {' - print >> self.fd, ' return cptrToPhp(%s($dump));' % m.name + if len(m.args) == 1: + print >> self.fd, ' public static function newFromDump($dump) {' + print >> self.fd, ' return cptrToPhp(%s($dump));' % m.name + else: + print >> self.fd, ' public static function newFromDump($server, $dump) {' + print >> self.fd, ' return cptrToPhp(%s($server->_cptr, $dump));' % m.name # XXX: Else throw an exception print >> self.fd, ' }' print >> self.fd, '' -- cgit