Files
typthon/Include/structseq.h
copilot-swe-agent[bot] b198f511d2 Rename Py_ to Ty_ throughout C API
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>
2025-12-29 17:37:49 +00:00

47 lines
1.3 KiB
C

/* Named tuple object interface */
#ifndef Ty_STRUCTSEQ_H
#define Ty_STRUCTSEQ_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct PyStructSequence_Field {
const char *name;
const char *doc;
} PyStructSequence_Field;
typedef struct PyStructSequence_Desc {
const char *name;
const char *doc;
PyStructSequence_Field *fields;
int n_in_sequence;
} PyStructSequence_Desc;
PyAPI_DATA(const char * const) PyStructSequence_UnnamedField;
#ifndef Ty_LIMITED_API
PyAPI_FUNC(void) PyStructSequence_InitType(TyTypeObject *type,
PyStructSequence_Desc *desc);
PyAPI_FUNC(int) PyStructSequence_InitType2(TyTypeObject *type,
PyStructSequence_Desc *desc);
#endif
PyAPI_FUNC(TyTypeObject*) PyStructSequence_NewType(PyStructSequence_Desc *desc);
PyAPI_FUNC(TyObject *) PyStructSequence_New(TyTypeObject* type);
PyAPI_FUNC(void) PyStructSequence_SetItem(TyObject*, Ty_ssize_t, TyObject*);
PyAPI_FUNC(TyObject*) PyStructSequence_GetItem(TyObject*, Ty_ssize_t);
#ifndef Ty_LIMITED_API
typedef PyTupleObject PyStructSequence;
#define PyStructSequence_SET_ITEM PyStructSequence_SetItem
#define PyStructSequence_GET_ITEM PyStructSequence_GetItem
#endif
#ifdef __cplusplus
}
#endif
#endif /* !Ty_STRUCTSEQ_H */