SIP: MappedType with a PyInt annotation
Phil Thompson
phil at riverbankcomputing.com
Thu Mar 24 09:05:37 GMT 2022
On 23/03/2022 14:29, Marian Thomsen wrote:
> Hello,
>
> I'm searching for a way to use
>
>
> typedef unsigned char ASN1T_PosPillar /PyInt/;
>
>
> within a mapped type, e.g. when using the following vector
>
> typedef std::vector<ASN1T_PosPillar*> ASN1T_PositionOfPillars;
>
>
>
> The problem seems to be the /PyInt/ annotation. Sip does not seem to
> recognize
>
>
> %MappedType std::vector<unsigned char *>
>
> with it.
>
> I would be grateful for a hint.
>
>
> Regards
>
> Marian
The annotation is used to generate the Python calls to convert the C++
type to the correct type of Python object. In the context of a mapped
type you are providing that code so it's up to your code to do the right
thing (ie. convert to a Python int object rather than a str object).
Phil
More information about the PyQt
mailing list