[PyQt] SIP support for wchar_t constants

Scott Talbert swt at techie.net
Sat Dec 30 04:28:47 GMT 2017


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.

Scott


More information about the PyQt mailing list