summaryrefslogtreecommitdiff
path: root/Cython/Includes/cpython
diff options
context:
space:
mode:
authorJeroen Demeyer <jdemeyer@cage.ugent.be>2017-11-05 12:48:41 +0100
committerJeroen Demeyer <jdemeyer@cage.ugent.be>2017-11-05 12:48:41 +0100
commit4e87c5ef7f2c00492af61c408635c85cf9b43975 (patch)
tree0f9980646531c53395fcf624f34e9f19f68930dc /Cython/Includes/cpython
parenteeff621bf9bc4b11e6545191c7df4602d6815b35 (diff)
downloadcython-4e87c5ef7f2c00492af61c408635c85cf9b43975.tar.gz
Add 'except' values for various function types
Diffstat (limited to 'Cython/Includes/cpython')
-rw-r--r--Cython/Includes/cpython/object.pxd20
1 files changed, 10 insertions, 10 deletions
diff --git a/Cython/Includes/cpython/object.pxd b/Cython/Includes/cpython/object.pxd
index 093a43ea7..23bf35947 100644
--- a/Cython/Includes/cpython/object.pxd
+++ b/Cython/Includes/cpython/object.pxd
@@ -10,26 +10,26 @@ cdef extern from "Python.h":
ctypedef object (*unaryfunc)(object)
ctypedef object (*binaryfunc)(object, object)
ctypedef object (*ternaryfunc)(object, object, object)
- ctypedef int (*inquiry)(object)
- ctypedef Py_ssize_t (*lenfunc)(object)
+ ctypedef int (*inquiry)(object) except -1
+ ctypedef Py_ssize_t (*lenfunc)(object) except -1
ctypedef object (*ssizeargfunc)(object, Py_ssize_t)
ctypedef object (*ssizessizeargfunc)(object, Py_ssize_t, Py_ssize_t)
- ctypedef int (*ssizeobjargproc)(object, Py_ssize_t, object)
- ctypedef int (*ssizessizeobjargproc)(object, Py_ssize_t, Py_ssize_t, object)
- ctypedef int (*objobjargproc)(object, object, object)
- ctypedef int (*objobjproc)(object, object)
+ ctypedef int (*ssizeobjargproc)(object, Py_ssize_t, object) except -1
+ ctypedef int (*ssizessizeobjargproc)(object, Py_ssize_t, Py_ssize_t, object) except -1
+ ctypedef int (*objobjargproc)(object, object, object) except -1
+ ctypedef int (*objobjproc)(object, object) except -1
- ctypedef Py_hash_t (*hashfunc)(object)
+ ctypedef Py_hash_t (*hashfunc)(object) except -1
ctypedef object (*reprfunc)(object)
- ctypedef int (*cmpfunc)(object, object)
+ ctypedef int (*cmpfunc)(object, object) except -2
ctypedef object (*richcmpfunc)(object, object, int)
# The following functions use 'PyObject*' as first argument instead of 'object' to prevent
# accidental reference counting when calling them during a garbage collection run.
ctypedef void (*destructor)(PyObject*)
- ctypedef int (*visitproc)(PyObject*, void *)
- ctypedef int (*traverseproc)(PyObject*, visitproc, void*)
+ ctypedef int (*visitproc)(PyObject*, void *) except -1
+ ctypedef int (*traverseproc)(PyObject*, visitproc, void*) except -1
ctypedef object (*descrgetfunc)(object, object, object)
ctypedef int (*descrsetfunc)(object, object, object) except -1