[C++-sig] Some thoughts on py3k support

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Thu Mar 19 17:07:22 CET 2009


> Of course the default converter policy we planed is not to convert to

> raw data buffer from unicode object via PyUnicode_AS_DATA(). The C-API
> such as PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString() will
> be used to convert unicode to bytes and then convert to char* and
> passed to your C++ function.
>
> By default we would use PyUnicode_AsUTF8String(), and encoding could
> be explicitly specified by a converter policy. That may keep most of
> your code compatible.

Thanks!
It means though that one has to think more about runtime overhead. Sigh.
Ralf


More information about the Cplusplus-sig mailing list