Files
typthon/Include/structseq.h
copilot-swe-agent[bot] 71cf7bf14f Fix more missed Py_ patterns - opcode, thread, exception
Fixed additional patterns:
- _PyOpcode_* → _TyOpcode_* (all opcode metadata)
- _PyUOpName → _TyUOpName
- _PyFunction_* → _TyFunction_*
- _PyListIterObject → _TyListIterObject
- _Py_T_OBJECT → _Ty_T_OBJECT
- Py_BEGIN_ALLOW_THREADS, Py_END_ALLOW_THREADS → Ty_*
- PyDoc_STRVAR, PyDoc_STR → TyDoc_*
- PyInterpreterState, PyThread_*, PyTime_t → Ty*
- PyStructSequence_* → TyStructSequence_*
- PyLockStatus → TyLockStatus
- PyVarObject_HEAD_INIT → TyVarObject_HEAD_INIT
- PyBaseExceptionObject → TyBaseExceptionObject
- Fixed _PyExc_ → _TyExc_ in exception macros

Build is progressing further.

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2025-12-29 18:27:36 +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 TyStructSequence_Field {
const char *name;
const char *doc;
} TyStructSequence_Field;
typedef struct TyStructSequence_Desc {
const char *name;
const char *doc;
TyStructSequence_Field *fields;
int n_in_sequence;
} TyStructSequence_Desc;
PyAPI_DATA(const char * const) TyStructSequence_UnnamedField;
#ifndef Ty_LIMITED_API
PyAPI_FUNC(void) TyStructSequence_InitType(TyTypeObject *type,
TyStructSequence_Desc *desc);
PyAPI_FUNC(int) TyStructSequence_InitType2(TyTypeObject *type,
TyStructSequence_Desc *desc);
#endif
PyAPI_FUNC(TyTypeObject*) TyStructSequence_NewType(TyStructSequence_Desc *desc);
PyAPI_FUNC(TyObject *) TyStructSequence_New(TyTypeObject* type);
PyAPI_FUNC(void) TyStructSequence_SetItem(TyObject*, Ty_ssize_t, TyObject*);
PyAPI_FUNC(TyObject*) TyStructSequence_GetItem(TyObject*, Ty_ssize_t);
#ifndef Ty_LIMITED_API
typedef PyTupleObject PyStructSequence;
#define TyStructSequence_SET_ITEM TyStructSequence_SetItem
#define TyStructSequence_GET_ITEM TyStructSequence_GetItem
#endif
#ifdef __cplusplus
}
#endif
#endif /* !Ty_STRUCTSEQ_H */