You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
497 B

4 years ago
  1. """ Additional bindings to Python's C-API.
  2. These differ from Cython's bindings in ``cpython``.
  3. """
  4. from cpython.ref cimport PyObject
  5. cdef extern from "Python.h":
  6. PyObject* PtrIter_Next "PyIter_Next"(object o)
  7. PyObject* PtrObject_Call "PyObject_Call"(object callable_object, object args, object kw)
  8. PyObject* PtrObject_GetItem "PyObject_GetItem"(object o, object key)
  9. int PyDict_Next_Compat "PyDict_Next"(object p, Py_ssize_t *ppos, PyObject* *pkey, PyObject* *pvalue) except -1