[C++-sig] returning vector arrays and multiple values

Leonard Ritter paniq at paniq.org
Thu Oct 23 15:44:05 CEST 2008

i have a function which i wish to wrap, which returns a float buffer and an

std::vector<float> get_recording_buffer(/* out */ size_t &write_ptr);

alternatively, the function could also just return a pointer to a float

const float *get_recording_buffer(/* out */ size_t &size, /* out */ size_t

the signature doesn't matter as much as the intention here.

using boost.python, how can i export the method so its appropriate python
counterpart would be something like:

def get_recording_buffer():
    return (<float list or tuple>, <int>)

i skimmed through the tutorial, the faq and the wiki, but found nothing
related to these two issues.

thank you in advance :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20081023/df4d77e1/attachment.htm>

More information about the Cplusplus-sig mailing list