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