Commit f80d0ae7 authored by Zackery Spytz's avatar Zackery Spytz Committed by Stefan Behnel

Add genobject.pxd

The comments are taken from the C API documentation
(https://docs.python.org/3.8/c-api/gen.html).
parent 2d71e7f0
from .pystate cimport PyFrameObject
cdef extern from "Python.h":
###########################################################################
# Generator Objects
###########################################################################
bint PyGen_Check(object ob)
# Return true if ob is a generator object; ob must not be NULL.
bint PyGen_CheckExact(object ob)
# Return true if ob's type is PyGen_Type; ob must not be NULL.
object PyGen_New(PyFrameObject *frame)
# Return value: New reference.
# Create and return a new generator object based on the frame object. A
# reference to frame is stolen by this function. The argument must not be
# NULL.
object PyGen_NewWithQualName(PyFrameObject *frame, object name, object qualname)
# Return value: New reference.
# Create and return a new generator object based on the frame object, with
# __name__ and __qualname__ set to name and qualname. A reference to frame
# is stolen by this function. The frame argument must not be NULL.
...@@ -18,6 +18,7 @@ cimport cpython.dict ...@@ -18,6 +18,7 @@ cimport cpython.dict
cimport cpython.exc cimport cpython.exc
cimport cpython.float cimport cpython.float
cimport cpython.function cimport cpython.function
cimport cpython.genobject
cimport cpython.getargs cimport cpython.getargs
cimport cpython.instance cimport cpython.instance
cimport cpython.int cimport cpython.int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment