On Fri, Nov 27, 2009 at 8:05 PM, Greg Ewing <[email protected]> wrote:
> Robert Bradshaw wrote:
>> So, my proposal
>> is this: let the user specify via a compiler directive an encoding to
>> use for all conversions. Cython could then transparently and
>> efficiently handle all char* <-> str (a.k.a. unicode) encodings
>
> There's another kind of problem with implicit conversion from
> str to char * in Py3: for any encoding other than utf8, it requires
> allocating memory, and then there's the issue of who owns it
> and how it gets deallocated.
>

Sorry, Greg, I got lost. It seems I still have things to learn in Py3.
How do you avoid the memory allocation in the case of UTF-8 ?


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to