[PyKDE] SIP: unicode to wchar_t* in C modules

Giovanni Bajo rasky at develer.com
Thu Mar 30 08:56:20 BST 2006

Phil Thompson <phil at riverbankcomputing.co.uk> wrote:

>> I'm having some trouble mapping a unicode Python variable to a C
>> wchar_t* . I reused a MappedType directive that works flawlessy for a
>> C++ module.
> %MappedTypes are for mapping classes and structs, not for basic
> types. If it works in a C++ context then it's down to luck.
> I'm happy to add support for wchar_t in C++ modules in a future
> version of SIP (because it is a basic type in C++ - something I
> hadn't realised until recently). I will only add support for it in C
> modules if it comes for free with the C++ support.

Notice that wchar_t is also a basic type as of ISO C99, and it's been supported
in C compilers as extension far longer before C99 was standardized (which is,
uh, 7 years ago).

Giovanni Bajo

More information about the PyQt mailing list