SIP translate Union
phil at riverbankcomputing.com
Mon Nov 23 10:48:41 GMT 2020
On 23/11/2020 10:40, Marian Thomsen wrote:
> I’m trying to use SIP to translate an union. Just started using SIP
> and because unions are not supported directly I cant find a way to
> translate them.
> What would be a good approach?
> I’m trying to use %MappedType but cant get it to work.
> A simple example would be really appreciated!
The most direct translation would be to wrap it as a struct and
implement %GetCode and %SetCode for each of the union elements.
More information about the PyQt