SIP support for wchar_t constants

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SIP support for wchar_t constants

Scott Talbert
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
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: SIP support for wchar_t constants

Phil Thompson-5
On 30 Dec 2017, at 4:28 am, Scott Talbert <[hidden email]> 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
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt