On Fri, Sep 11, 2009 at 7:17 PM, Robert Bradshaw <[email protected]> wrote: > On Sep 11, 2009, at 2:23 PM, Lisandro Dalcin wrote: > >> Well, I guess it is too late to complain... But I think that explicit >> is better than implicit here, then I do not like this... I do not even >> like the automatic casting to bare char* !! It is almost impossible to >> be 100% sure that you code is bytes/unicode clean! >> >> Could we have at least a compile directive (or perhaps better/easier a >> global option?) to DISABLE these automatic castings to char*/uchar* ? > > It's certainly too late to disable it now, but I would be up for an > option that gives errors/warnings. (Maybe -W or lint flags of some > kind.) >
In understand ... Anyway, the implicit cast would not bother me at all I I would be able to disable it... > Just out of curiosity, what would the explicit method be? No idea... perhaps a manual cast? char *p =<char*> pystring ... > > Python/C API? > That's more or less what I'm currently doing in mpi4py... > - Robert > >> >> >> On Fri, Sep 11, 2009 at 6:13 PM, Stefan Behnel >> <[email protected]> wrote: >>> >>> Robert Bradshaw wrote: >>>> On Sep 9, 2009, at 11:24 AM, Stefan Behnel wrote: >>>>> I don't think there's anything wrong with letting Cython do the >>>>> necessary casting under the hood. >>>> >>>> http://trac.cython.org/cython_trac/ticket/359 >>> >>> Ok, I pushed a patch to both cython-devel and cython-unstable. >>> >>> http://hg.cython.org/cython-devel/rev/d273a3dc784b >>> >>> I hope these casts pass as expected... >>> >>> Stefan >>> _______________________________________________ >>> Cython-dev mailing list >>> [email protected] >>> http://codespeak.net/mailman/listinfo/cython-dev >>> >> >> >> >> -- >> 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 > > _______________________________________________ > Cython-dev mailing list > [email protected] > http://codespeak.net/mailman/listinfo/cython-dev > -- 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
