[PyQt] SIP support for wchar_t constants

Phil Thompson phil at riverbankcomputing.com
Sat Dec 30 12:38:29 GMT 2017


On 30 Dec 2017, at 4:28 am, Scott Talbert <swt at techie.net> wrote:
> 
> SIP does not seem to support wchar_t constants.  For example, .sip of:
> 
> typedef wchar_t wxChar;
> const wxChar wxRichTextLineBreakChar;
> 
> Seems to result in generated cpp:
> 
> /* Define the chars to be added to this module dictionary. */
> static sipCharInstanceDef charInstances[] = {
>    {sipName_RichTextLineBreakChar, wxRichTextLineBreakChar, 'N'},
>    {0, 0, 0}
> };
> 
> which isn't right because it's narrowing a wchar_t to a char.  This warns on gcc but fails to compile on clang.

Strangely I don't get any problems with clang.

Hopefully fixed in tonight's snapshot - not heavily tested.

Thanks,
Phil


More information about the PyQt mailing list