On Wed, Feb 4, 2009 at 12:58 PM, Michael Abshoff
<[email protected]> wrote:
>
> Well, is Python.h guaranteed to be included in every Cython extension?
> I guess it would be.
>

AFAIK, yes. See yourself:

class ModuleScope(Scope):
   ....
    def __init__(self, name, parent_module, context):
        ....
        self.python_include_files = ["Python.h", "structmember.h"]

> But what about pure C files linked against an
> extension for example? People would be required to either include
> Python.h for size_t or find it somewhere else in the system. Not that
> this is hard, but it will confuse some people :)
>

Not sure if I understand you. If pure C file want to use 'size_t',
they are in charge of it.

> I am sure Python 2.3 (and also later releases obviously) defines it
> appropriately if it isn't provided by the system. Overall I think this
> is a worthwhile change, the new code just ought to be verified on some
> of the older known bad compilers.
>

Well, then I'll try to write a patch for all you to review and test.

> While poking around I found the following nugget in Sage:
>
> # Memory management
> cdef extern from "stdlib.h":
>     ctypedef unsigned long size_t
>
>
> So I would expect some buggy code to be exposed by the suggested change
> above.
>

Well, such a change would expose buggy code and perhaps be backward
incompatible, right?



-- 
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