genobject.pxd 1.0 KB

12345678910111213141516171819202122232425
  1. from .pystate cimport PyFrameObject
  2. cdef extern from "Python.h":
  3. ###########################################################################
  4. # Generator Objects
  5. ###########################################################################
  6. bint PyGen_Check(object ob)
  7. # Return true if ob is a generator object; ob must not be NULL.
  8. bint PyGen_CheckExact(object ob)
  9. # Return true if ob's type is PyGen_Type; ob must not be NULL.
  10. object PyGen_New(PyFrameObject *frame)
  11. # Return value: New reference.
  12. # Create and return a new generator object based on the frame object. A
  13. # reference to frame is stolen by this function. The argument must not be
  14. # NULL.
  15. object PyGen_NewWithQualName(PyFrameObject *frame, object name, object qualname)
  16. # Return value: New reference.
  17. # Create and return a new generator object based on the frame object, with
  18. # __name__ and __qualname__ set to name and qualname. A reference to frame
  19. # is stolen by this function. The frame argument must not be NULL.