Re: [Cython] Compilation failes if a class member is named "INFINITY"

2015-02-05 Thread Michael
Am 05.02.2015 um 12:30 schrieb Greg Ewing: > Stefan Behnel wrote: >> Python extension types are just structs at the C level, and struct member >> names cannot be mangled. > > Well, in principle it *could* mangle the names in > structs that aren't declared "cdef extern". I didn't > do that in Pyrex

Re: [Cython] Compilation failes if a class member is named "INFINITY"

2015-02-05 Thread Greg Ewing
Stefan Behnel wrote: Python extension types are just structs at the C level, and struct member names cannot be mangled. Well, in principle it *could* mangle the names in structs that aren't declared "cdef extern". I didn't do that in Pyrex because it didn't seem necessary; I hadn't anticipated

Re: [Cython] Compilation failes if a class member is named "INFINITY"

2015-02-05 Thread Michael
Am 05.02.2015 um 10:44 schrieb Stefan Behnel: > Michael schrieb am 05.02.2015 um 09:52: >> Am 31.01.2015 um 19:48 schrieb Matthew Brett: >>> On Fri, Jan 30, 2015 at 1:49 AM, Michael wrote: if I try to compile the following minimal example: cdef class Test: cdef readonly

Re: [Cython] Compilation failes if a class member is named "INFINITY"

2015-02-05 Thread Stefan Behnel
Michael schrieb am 05.02.2015 um 09:52: > Am 31.01.2015 um 19:48 schrieb Matthew Brett: >> On Fri, Jan 30, 2015 at 1:49 AM, Michael wrote: >>> if I try to compile the following minimal example: >>> >>> cdef class Test: >>> >>> cdef readonly int INFINITY >>> >>> cython does not complain but gcc

Re: [Cython] Compilation failes if a class member is named "INFINITY"

2015-02-05 Thread Michael
Am 31.01.2015 um 19:48 schrieb Matthew Brett: > Hi, > > On Fri, Jan 30, 2015 at 1:49 AM, Michael wrote: >> Hello, >> >> if I try to compile the following minimal example: >> >> cdef class Test: >> >> cdef readonly int INFINITY >> >> cython does not complain but gcc refuses with an error messa