[PyQt] SIP Support for wchar_t

Phil Thompson phil at riverbankcomputing.co.uk
Sun Apr 1 16:20:11 BST 2007


On Tuesday 27 March 2007 10:52 am, Giovanni Bajo wrote:
> On 3/25/2007 4:06 PM, Phil Thompson wrote:
> > As of tonight's snapshot SIP has support for wchar_t. There are some
> > issues related to wide strings and the heap - see the documentation for
> > details - which could be partly addressed with some new annotations. I'd
> > prefer that any changes are based on real world examples, so let me have
> > some feedback if you use want to use wchar_t in your own bindings.
>
> OK, first issue: it looks like both char* and wchar_t* map to the same
> Python type. I'm wrapping an API like this:
>
>     void Foo(char* string);
>     void Foo(wchar_t* string);
>
> The idea is that a 8-bit string (Python "str") goes to the first
> function, while an Unicode string (Python "unicode") goes to the second
> function.
>
> Comments?

Should be fixed in tonight's snapshot.

Phil


More information about the PyQt mailing list