[Cython] [BUG] PyFrozenset_CheckExact instead of PyFrozenSet_CheckExact
Robert Bradshaw
robertwb at math.washington.edu
Mon Sep 29 22:48:16 CEST 2008
On Sep 29, 2008, at 10:16 AM, Max Ivanov wrote:
> If you try to use frozenset inside your code, in .c file there will be
> "PyFrozenset_CheckExact" but in python2.5/setobject.h
> "PyFrozenSet_CheckExact" defined (notice "set" and "Set").
>
> How could I define new macro in pyx file? I would like to workaround
> this bug by defining macro "PyFrozenset_CheckExact" which points to
> another macro: "PyFrozenSet_CheckExact"
Hmm... perhaps we should #define these so that PyFrozenSet_CheckExact
is always available.
The best short term thing to do, if you want to compile against both
2.5 and < 2.5, I would make a .h file with the appropriate macro,
then in your file you can put
cdef extern from "file.h":
pass
More information about the Cython-dev
mailing list