mirror of
https://github.com/johndoe6345789/typthon.git
synced 2026-04-25 06:05:05 +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>
60 lines
1.1 KiB
C
60 lines
1.1 KiB
C
#ifndef Ty_INTERNAL_CONTEXT_H
|
|
#define Ty_INTERNAL_CONTEXT_H
|
|
|
|
#ifndef Ty_BUILD_CORE
|
|
# error "this header requires Ty_BUILD_CORE define"
|
|
#endif
|
|
|
|
#include "pycore_structs.h"
|
|
|
|
extern TyTypeObject _PyContextTokenMissing_Type;
|
|
|
|
/* runtime lifecycle */
|
|
|
|
PyStatus _TyContext_Init(PyInterpreterState *);
|
|
|
|
|
|
/* other API */
|
|
|
|
typedef struct {
|
|
PyObject_HEAD
|
|
} _PyContextTokenMissing;
|
|
|
|
struct _pycontextobject {
|
|
PyObject_HEAD
|
|
PyContext *ctx_prev;
|
|
PyHamtObject *ctx_vars;
|
|
TyObject *ctx_weakreflist;
|
|
int ctx_entered;
|
|
};
|
|
|
|
|
|
struct _pycontextvarobject {
|
|
PyObject_HEAD
|
|
TyObject *var_name;
|
|
TyObject *var_default;
|
|
#ifndef Ty_GIL_DISABLED
|
|
TyObject *var_cached;
|
|
uint64_t var_cached_tsid;
|
|
uint64_t var_cached_tsver;
|
|
#endif
|
|
Ty_hash_t var_hash;
|
|
};
|
|
|
|
|
|
struct _pycontexttokenobject {
|
|
PyObject_HEAD
|
|
PyContext *tok_ctx;
|
|
PyContextVar *tok_var;
|
|
TyObject *tok_oldval;
|
|
int tok_used;
|
|
};
|
|
|
|
|
|
// _testinternalcapi.hamt() used by tests.
|
|
// Export for '_testcapi' shared extension
|
|
PyAPI_FUNC(TyObject*) _TyContext_NewHamtForTests(void);
|
|
|
|
|
|
#endif /* !Ty_INTERNAL_CONTEXT_H */
|