Project

General

Profile

Bug #1179

PHP binding variables contain extraneous ._cptr declarations

Added by Anonymous almost 13 years ago. Updated over 9 years ago.

Status:
Fermé
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
04 January 2012
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Planning:

Description

Some of the generated variables in lasso.php have ._cptr tacked on to the end. This causes PHP to convert the variable to a string and concatenate '_cptr' to the end of it.

Example:
public function initFromXml($xmlnode) {
$rc = lasso_node_init_from_xml($this->_cptr, $xmlnode._cptr);

The following patch seems to resolve the issue:
--- a/bindings/php5/php_code.py
++ b/bindings/php5/php_code.py
@ -317,7 +317,7 @ function lassoRegisterIdWsf2DstService($prefix, $href) {
arg_type in self.binding_data.enums:
c_args.append(arg_name)
else:
- c_args.append('%s._cptr' % arg_name)
c_args.append('%s' % arg_name)
if is_out(arg):
php_args.pop()
php_args.append(arg_name)


Files

php_cptr.patch (497 Bytes) php_cptr.patch Anonymous, 04 January 2012 06:24 PM
php_cptr2.patch (1.23 KB) php_cptr2.patch Anonymous, 04 January 2012 06:44 PM

History

#1

Updated by Anonymous almost 13 years ago

Attached patch file.

#2

Updated by Anonymous almost 13 years ago

There is two bugs there that your patch do not address:
- first xmlnode content is passed as string, thus should be handled by the first case of the if-then-else structure
- second, the syntax for passing object arguments is wrong, this should be

->_cptr
not
._cptr

This new patch should cover both, could you confirm that it resolves your problem ?

#3

Updated by Anonymous almost 13 years ago

It looks like your patch fixed the problem. Thanks!

#4

Updated by Benjamin Dauvergne over 9 years ago

  • Target version set to future
#5

Updated by Benjamin Dauvergne over 9 years ago

  • Status changed from Nouveau to Fermé

Fixed in trunk long time ago.

Also available in: Atom PDF