jeudi 22 février 2018

Swig+python. Returning an std::vector

When exposing C++ code to python via SWIG, I have a problem with some types.

If I return std::vector, SWIG generates code that results in python receiving a tuple. While I can always do something like bytes(answer) I would ideally like to just return the correct type: i.e. bytes or bytearray

Is this possible?

Aucun commentaire:

Enregistrer un commentaire