[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: [EXTERNAL] Re: Hit bug in sip wrapper generation of template expansion involving enums
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2021-03-04 16:46:34
Message-ID: 42800bbe1e507dc00b8a1fb57d8ed885 () riverbankcomputing ! com
[Download RAW message or body]

On 04/03/2021 15:36, Gehlhaar, Daniel Kurt wrote:
> Phil,
> 
> Apologies. Please see attached. The easiest way to replicate this is
> to put the enum declaration in the same file (as here). In the actual
> production process, it is in a different directory and is built into a
> dependent sip module. I think if this case is fixed, it will fix the
> other case.
> 
> In any case, this is a "showstopper" for me, I cannot proceed with my
> migration from sip 4 to sip 6 unless this is resolved. Any advice or
> mitigation you could provide would be helpful.

SIP does not support enums as an argument to template-based mapped 
types. It is a bug that SIP does not complain about this and generates 
code on the assumption that the type is a class. The generated code may 
or not compile.

You need to provide an explicit mapped type convertor. In its 
%TypeHeaderCode you can specify the .h file that contains the C++ 
definition of the enum. You can look at PyQt5's qpycore_qlist.sip to see 
how enum arguments are handled explicitly.

Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic