File: genobject.pxd

package info (click to toggle)
cython 0.29.21-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,848 kB
  • sloc: python: 67,537; ansic: 14,505; cpp: 1,340; xml: 1,031; makefile: 367; lisp: 206; sed: 11; sh: 7
file content (25 lines) | stat: -rw-r--r-- 1,052 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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.