Commit 5bd29d5e authored by scoder's avatar scoder

Merge pull request #383 from jdemeyer/PyTypeObject_cmp

PyTypeObject members tp_compare, tp_richcompare, tp_base
parents 4b8c1991 fc728e4a
...@@ -22,6 +22,9 @@ cdef extern from "Python.h": ...@@ -22,6 +22,9 @@ cdef extern from "Python.h":
ctypedef Py_hash_t (*hashfunc)(object) ctypedef Py_hash_t (*hashfunc)(object)
ctypedef object (*reprfunc)(object) ctypedef object (*reprfunc)(object)
ctypedef int (*cmpfunc)(object, object)
ctypedef object (*richcmpfunc)(object, object, int)
# The following functions use 'PyObject*' as first argument instead of 'object' to prevent # The following functions use 'PyObject*' as first argument instead of 'object' to prevent
# accidental reference counting when calling them during a garbage collection run. # accidental reference counting when calling them during a garbage collection run.
ctypedef void (*destructor)(PyObject*) ctypedef void (*destructor)(PyObject*)
...@@ -46,6 +49,11 @@ cdef extern from "Python.h": ...@@ -46,6 +49,11 @@ cdef extern from "Python.h":
reprfunc tp_str reprfunc tp_str
reprfunc tp_repr reprfunc tp_repr
cmpfunc tp_compare
richcmpfunc tp_richcompare
PyTypeObject* tp_base
ctypedef struct PyObject: ctypedef struct PyObject:
Py_ssize_t ob_refcnt Py_ssize_t ob_refcnt
PyTypeObject *ob_type PyTypeObject *ob_type
......
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