[C++-sig] pybindgen add_function_as_constructor

Robin Gilks robin.gilks at tait.co.nz
Mon Apr 27 07:15:09 CEST 2009


Robin Gilks wrote:
> I've found the pybindgen commit for revision 628 and that fixes the 
> PyObject problem - got a new one now!! I can't work out the syntax to 
> return any sort of pointer for example
>    mod.add_method('methodA', ReturnValue.new('uint8_t *'), [])
> This is probably me again not understanding the Python side of things 
> - how would I return a string otherwise?
>
>
> I see that some of the fixes are in the NS-3 project as 
> pybindgen-0.10.0.630 (I assume this means up to and including commit 
> 630) but there is no waf included in this project so I can't build it :-(
>

Sorry about constantly replying to myself but the further I get into the 
pybindgen code, the more I get lost!! I've temporarily solved my 
'uint8_t *' problem by using 'char *' but since I'll be using strings 
that may have embedded nulls I'm moving everything across to std::string 
types so that problem goes away:-)

Where I've got to now is I can't find how to declare a docstring for a 
function or method.

Any clues?

Cheers

-- 
Robin


=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
 altered or corrupted during transmission.
=======================================================================



More information about the Cplusplus-sig mailing list