Skip to content

Commit

Permalink
Remove some unused and incorrect declarations of Python C-API functio…
Browse files Browse the repository at this point in the history
…ns that can actually raise exceptions.
  • Loading branch information
scoder committed Oct 7, 2023
1 parent 0e7d7e5 commit f906a4a
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/lxml/python.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ cdef extern from "Python.h":
cdef Py_ssize_t PyBytes_GET_SIZE(object s)

cdef object PyNumber_Int(object value)
cdef Py_ssize_t PyInt_AsSsize_t(object value)

cdef Py_ssize_t PyTuple_GET_SIZE(object t)
cdef object PyTuple_GET_ITEM(object o, Py_ssize_t pos)
Expand All @@ -73,13 +72,10 @@ cdef extern from "Python.h":
cdef void PyList_SET_ITEM(object l, Py_ssize_t index, object value)
cdef int PyList_Insert(object l, Py_ssize_t index, object o) except -1
cdef object PyList_AsTuple(object l)
cdef void PyList_Clear(object l)

cdef PyObject* PyDict_GetItemString(object d, char* key)
cdef PyObject* PyDict_GetItem(object d, object key)
cdef void PyDict_Clear(object d)
cdef object PyDictProxy_New(object d)
cdef Py_ssize_t PyDict_Size(object d)
cdef object PySequence_List(object o)
cdef object PySequence_Tuple(object o)

Expand All @@ -95,7 +91,6 @@ cdef extern from "Python.h":
Py_ssize_t *slicelength) except -1

cdef object PyObject_RichCompare(object o1, object o2, int op)
cdef int PyObject_RichCompareBool(object o1, object o2, int op)

PyObject* PyWeakref_NewRef(object ob, PyObject* callback) except NULL # used for PyPy only
object PyWeakref_LockObject(PyObject* ob) # PyPy only
Expand Down

0 comments on commit f906a4a

Please sign in to comment.