Projet

Général

Profil

Bug #1179

PHP binding variables contain extraneous ._cptr declarations

Ajouté par Anonyme il y a environ 12 ans. Mis à jour il y a plus de 8 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Catégorie:
-
Version cible:
Début:
04 janvier 2012
Echéance:
% réalisé:

0%

Temps estimé:
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)


Fichiers

php_cptr.patch (497 octets) php_cptr.patch Anonyme, 04 janvier 2012 18:24
php_cptr2.patch (1,23 ko) php_cptr2.patch Anonyme, 04 janvier 2012 18:44

Historique

#1

Mis à jour par Anonyme il y a environ 12 ans

Attached patch file.

#2

Mis à jour par Anonyme il y a environ 12 ans

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

Mis à jour par Anonyme il y a environ 12 ans

It looks like your patch fixed the problem. Thanks!

#4

Mis à jour par Benjamin Dauvergne il y a plus de 8 ans

  • Version cible mis à future
#5

Mis à jour par Benjamin Dauvergne il y a plus de 8 ans

  • Statut changé de Nouveau à Fermé

Fixed in trunk long time ago.

Formats disponibles : Atom PDF