How to best return a string from C to CPython 2.5?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dylan.fun@gmail.com

    How to best return a string from C to CPython 2.5?

    I'm trying to return a Python string from a C++ function (actually
    inside gnuradio) using CPython 2.5. My C++ function is declared like:

    typedef struct {
    int size;
    unsigned char *data;
    } STRING

    STRINGBUF myfunc(std::str ing s)
    {
    STRINGBUF buf;
Working...