Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
ab03e674
Commit
ab03e674
authored
Oct 25, 2008
by
Lisandro Dalcin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a few fixes for Py2.3 set support
parent
6ab8a67a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
Cython/Compiler/Builtin.py
Cython/Compiler/Builtin.py
+14
-12
No files found.
Cython/Compiler/Builtin.py
View file @
ab03e674
...
@@ -178,13 +178,19 @@ proto = """
...
@@ -178,13 +178,19 @@ proto = """
(ob)->ob_type == &PyFrozenSet_Type)
(ob)->ob_type == &PyFrozenSet_Type)
#define PySet_New(iterable)
\
\
#define PySet_New(iterable)
\
\
PyObject_CallFunctionObjArgs((PyObject *)PySet_Type, iterable, NULL)
PyObject_CallFunctionObjArgs((PyObject *)&PySet_Type, (iterable), NULL)
#define Pyx_PyFrozenSet_New(iterable)
\
\
#define Pyx_PyFrozenSet_New(iterable)
\
\
PyObject_CallFunctionObjArgs((PyObject *)PyFrozenSet_Type, iterable, NULL)
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_Size(anyset) PyObject_Size(anyset)
#define PySet_Pop(set)
\
\
#define PySet_Contains(anyset, key) PySequence_Contains(anyset, key)
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) {
PyObject *ret = PyObject_CallMethod(set, "clear", NULL);
PyObject *ret = PyObject_CallMethod(set, "clear", NULL);
...
@@ -218,13 +224,11 @@ static PyTypeObject *__Pyx_PyFrozenSet_Type = NULL;
...
@@ -218,13 +224,11 @@ static PyTypeObject *__Pyx_PyFrozenSet_Type = NULL;
#define PyAnySet_Check(ob)
\
\
#define PyAnySet_Check(ob)
\
\
(PyAnySet_CheckExact(ob) ||
\
\
(PyAnySet_CheckExact(ob) ||
\
\
PyType_IsSubtype((ob)->ob_type, &PySet_Type) ||
\
\
PyType_IsSubtype((ob)->ob_type, &PySet_Type) ||
\
\
PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type))
PyType_IsSubtype((ob)->ob_type, &PyFrozenSet_Type))
#define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type)
#define PyFrozenSet_CheckExact(ob) ((ob)->ob_type == &PyFrozenSet_Type)
/* ---------------------------------------------------------------- */
static int __Pyx_Py23SetsImport(void) {
static int __Pyx_Py23SetsImport(void) {
PyObject *sets=0, *Set=0, *ImmutableSet=0;
PyObject *sets=0, *Set=0, *ImmutableSet=0;
...
@@ -254,10 +258,8 @@ static int __Pyx_Py23SetsImport(void) {
...
@@ -254,10 +258,8 @@ static int __Pyx_Py23SetsImport(void) {
return -1;
return -1;
}
}
/* ---------------------------------------------------------------- */
#else
#else
static int
py23sets_i
mport(void) { return 0; }
static int
__Pyx_Py23SetsI
mport(void) { return 0; }
#endif /* !Py_SETOBJECT_H */
#endif /* !Py_SETOBJECT_H */
#endif /* < Py2.4 */
#endif /* < Py2.4 */
#endif /* < Py2.5 */
#endif /* < Py2.5 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment