cellobject.pxd 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  1. from .object cimport PyObject
  2. cdef extern from "Python.h":
  3. ############################################################################
  4. # Cell Objects
  5. ############################################################################
  6. bint PyCell_Check(object ob)
  7. # Return true if ob is a cell object; ob must not be NULL.
  8. object PyCell_New(PyObject* ob)
  9. # Return value: New reference.
  10. # Create and return a new cell object containing the value ob. The
  11. # parameter may be NULL.
  12. object PyCell_Get(object cell)
  13. # Return value: New reference.
  14. # Return the contents of the cell object cell.
  15. object PyCell_GET(object cell)
  16. # Return value: Borrowed reference.
  17. # Return the contents of the cell object cell, but without checking that
  18. # cell is non-NULL and is a cell object.
  19. int PyCell_Set(object cell, PyObject* value) except? -1
  20. # Set the contents of the cell object cell to value. This releases the
  21. # reference to any current content of the cell. value may be NULL. cell
  22. # must be non-NULL; if it is not a cell object, -1 will be returned. On
  23. # success, 0 will be returned.
  24. void PyCell_SET(object cell, PyObject* value)
  25. # Sets the value of the cell object cell to value. No reference counts are
  26. # adjusted, and no checks are made for safety; cell must be non-NULL and
  27. # must be a cell object.