swig php and returning an allocated buffer

View: New views
2 Messages — Rating Filter:   Alert me  

swig php and returning an allocated buffer

by dseroute-swus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi,
 
I'm trying to use
 
%cstring_output_allocate_size(char **p_data, size_t *data_length, free(*$1));

 
in php and it's not working like it does for Python.  Code will be generated to call the c++ function, but it doesn't look like there is any return/output object created for php.  In the python version, there is a call to create a python object to return (in the wrapper code).  How do I get the object (buffer string, in this case) generation in php?
 
Thanks
 

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user

Re: swig php and returning an allocated buffer

by Olly Betts :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

<dseroute-swus <at> yahoo.com> writes:
> I'm trying to use
>  
> %cstring_output_allocate_size(char **p_data, size_t *data_length, free(*$1));
>  
> in php and it's not working like it does for Python.

Without a complete self-contained example, it's rather hard to say why this
isn't working for you.  I'm afraid I don't have time to try to reverse engineer
your example from the single line of code above and your problem description.

There are some SWIG features which don't currently work correctly for PHP
and this might be one of them.

I've recently converted SWIG's test suite to work with PHP5 instead of PHP4
and I'm slowly working through the failures, but there are quite a few left.

(I should perhaps note that the PHP backend does actually work fairly well,
provided you don't need one of these features!)

Cheers,
    Olly


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user