On Fri, Mar 20, 2009 at 12:07 AM, Ralf W. Grosse-Kunstleve
<r...@yahoo.com> wrote:
>
>> 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

Yes unicode string can't faster than raw string. However one can use
the bytes object while regarding to performance.

-- Haoyu Bai
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to