SIP cannot handle return type

Marian Thomsen marian.th at outlook.de
Fri May 7 09:07:49 BST 2021


Hello,

sip throws the following error because the return type does not exist in python:

new_PosPillar() unsupported function return type - provide %MethodCode and a C++ signature


Code in SipFile:

typedef unsigned short PosPillar;

PosPillar* new_PosPillar (CType& ccobj); <- throwing the error

typedef std::vector<PosPillar*> PositionOfPillars;


Unfortunately I have to use new_PosPillar, it keeps track of the created pointers.

How can I provide MethodCode or anything else (MappedType?) here to get e.g. a wrapped instance that I can pass to the MappedType std:vector and handle the wrapped instance there?

Or is there an easier approach?

Any advice would be appreciated!

Thank you.

M.T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20210507/d8241121/attachment.htm>


More information about the PyQt mailing list