mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-25 22:25:43 +00:00
Massive automated renaming of all Py_/PyObject/etc. prefixes to Ty_/TyObject/etc. This includes: - All public API types (TyObject, TyTypeObject, etc.) - All public API functions (Ty_Initialize, Ty_BuildValue, etc.) - All internal API (_Ty_ prefixes) - Reference counting macros (Ty_INCREF, Ty_DECREF, etc.) - Type flags (Ty_TPFLAGS_*) - Debug flags (Ty_DEBUG, Ty_TRACE_REFS, etc.) - All object type APIs (TyList_, TyDict_, TyUnicode_, etc.) This changes over 60,000 occurrences across 1000+ files. Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
57 lines
1.5 KiB
C
57 lines
1.5 KiB
C
/* Generator object interface */
|
|
|
|
#ifndef Ty_LIMITED_API
|
|
#ifndef Ty_GENOBJECT_H
|
|
#define Ty_GENOBJECT_H
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* --- Generators --------------------------------------------------------- */
|
|
|
|
typedef struct _PyGenObject PyGenObject;
|
|
|
|
PyAPI_DATA(TyTypeObject) TyGen_Type;
|
|
|
|
#define TyGen_Check(op) PyObject_TypeCheck((op), &TyGen_Type)
|
|
#define TyGen_CheckExact(op) Ty_IS_TYPE((op), &TyGen_Type)
|
|
|
|
PyAPI_FUNC(TyObject *) TyGen_New(PyFrameObject *);
|
|
PyAPI_FUNC(TyObject *) TyGen_NewWithQualName(PyFrameObject *,
|
|
TyObject *name, TyObject *qualname);
|
|
PyAPI_FUNC(PyCodeObject *) TyGen_GetCode(PyGenObject *gen);
|
|
|
|
|
|
/* --- PyCoroObject ------------------------------------------------------- */
|
|
|
|
typedef struct _PyCoroObject PyCoroObject;
|
|
|
|
PyAPI_DATA(TyTypeObject) TyCoro_Type;
|
|
|
|
#define TyCoro_CheckExact(op) Ty_IS_TYPE((op), &TyCoro_Type)
|
|
PyAPI_FUNC(TyObject *) TyCoro_New(PyFrameObject *,
|
|
TyObject *name, TyObject *qualname);
|
|
|
|
|
|
/* --- Asynchronous Generators -------------------------------------------- */
|
|
|
|
typedef struct _PyAsyncGenObject PyAsyncGenObject;
|
|
|
|
PyAPI_DATA(TyTypeObject) PyAsyncGen_Type;
|
|
PyAPI_DATA(TyTypeObject) _PyAsyncGenASend_Type;
|
|
|
|
PyAPI_FUNC(TyObject *) PyAsyncGen_New(PyFrameObject *,
|
|
TyObject *name, TyObject *qualname);
|
|
|
|
#define PyAsyncGen_CheckExact(op) Ty_IS_TYPE((op), &PyAsyncGen_Type)
|
|
|
|
#define PyAsyncGenASend_CheckExact(op) Ty_IS_TYPE((op), &_PyAsyncGenASend_Type)
|
|
|
|
#undef _PyGenObject_HEAD
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* !Ty_GENOBJECT_H */
|
|
#endif /* Ty_LIMITED_API */
|