Am 06.09.2010 22:07, schrieb Stefan Behnel:
> That's not the problem we are discussing here, though. This thread is about
> *C string*  literals, which should or should not change due to
> unicode_literals being enabled. That's the question.
>
> I think it makes sense to keep the two discussions separate.

Wasn't this why wchar_t was invented? I recall that some define at least 
on Windows allowed to decide if it was unicode or ascii.

So suppose that you have:

cdef wchar_t *str1;
str2 = "lalala"

Now dependent on "unicode_literals" the wchar_t could change to be a 
"char" or a "Py_UNICODE". I think that Wikipedia has good information 
about this here:

http://en.wikipedia.org/wiki/Wide_character#Programming_specifics

This way the type of literals and C strings and would always be in sync 
and it should allow you to address both platforms.

Yours,
Kay
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to