Commit 497af27e authored by Stefan Behnel's avatar Stefan Behnel

Py2.4 requires some more definitions for the set type

parent 4148f516
...@@ -169,6 +169,13 @@ py23_set_utility_code = [""" ...@@ -169,6 +169,13 @@ py23_set_utility_code = ["""
((ob)->ob_type == ((PyTypeObject*)&PySet_Type) || \ ((ob)->ob_type == ((PyTypeObject*)&PySet_Type) || \
(ob)->ob_type == ((PyTypeObject*)&PyFrozenSet_Type)) (ob)->ob_type == ((PyTypeObject*)&PyFrozenSet_Type))
#define PySet_New(iterable) \
PyObject_CallFunctionObjArgs((PyObject *)PySet_Type, iterable, NULL)
#define Pyx_PyFrozenSet_New(iterable) \
PyObject_CallFunctionObjArgs((PyObject *)PyFrozenSet_Type, iterable, NULL)
#define PySet_Size(anyset) PyObject_Size(anyset)
#define PySet_Contains(anyset, key) PySequence_Contains(anyset, key)
#define PySet_Pop(set) PyObject_CallMethod(set, "pop", NULL) #define PySet_Pop(set) PyObject_CallMethod(set, "pop", NULL)
static INLINE int PySet_Clear(PyObject *set) { static INLINE int PySet_Clear(PyObject *set) {
...@@ -205,14 +212,6 @@ static PyTypeObject *PyFrozenSet_Type = NULL; ...@@ -205,14 +212,6 @@ static PyTypeObject *PyFrozenSet_Type = NULL;
#define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type) #define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type)
#define PySet_New(iterable) \
PyObject_CallFunctionObjArgs((PyObject *)PySet_Type, iterable, NULL)
#define Pyx_PyFrozenSet_New(iterable) \
PyObject_CallFunctionObjArgs((PyObject *)PyFrozenSet_Type, iterable, NULL)
#define PySet_Size(anyset) PyObject_Size(anyset)
#define PySet_Contains(anyset, key) PySequence_Contains(anyset, key)
/* ---------------------------------------------------------------- */ /* ---------------------------------------------------------------- */
static int __Pyx_Py23SetsImport(void) { static int __Pyx_Py23SetsImport(void) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment