mirror of
https://github.com/python/cpython.git
synced 2025-10-11 17:32:49 +00:00

* Rename Include/internal/ header files: * pyatomic.h -> pycore_atomic.h * ceval.h -> pycore_ceval.h * condvar.h -> pycore_condvar.h * context.h -> pycore_context.h * pygetopt.h -> pycore_getopt.h * gil.h -> pycore_gil.h * hamt.h -> pycore_hamt.h * hash.h -> pycore_hash.h * mem.h -> pycore_mem.h * pystate.h -> pycore_state.h * warnings.h -> pycore_warnings.h * PCbuild project, Makefile.pre.in, Modules/Setup: add the Include/internal/ directory to the search paths of header files. * Update includes. For example, replace #include "internal/mem.h" with #include "pycore_mem.h".
41 lines
699 B
C
41 lines
699 B
C
#ifndef Py_INTERNAL_CONTEXT_H
|
|
#define Py_INTERNAL_CONTEXT_H
|
|
|
|
|
|
#include "pycore_hamt.h"
|
|
|
|
|
|
struct _pycontextobject {
|
|
PyObject_HEAD
|
|
PyContext *ctx_prev;
|
|
PyHamtObject *ctx_vars;
|
|
PyObject *ctx_weakreflist;
|
|
int ctx_entered;
|
|
};
|
|
|
|
|
|
struct _pycontextvarobject {
|
|
PyObject_HEAD
|
|
PyObject *var_name;
|
|
PyObject *var_default;
|
|
PyObject *var_cached;
|
|
uint64_t var_cached_tsid;
|
|
uint64_t var_cached_tsver;
|
|
Py_hash_t var_hash;
|
|
};
|
|
|
|
|
|
struct _pycontexttokenobject {
|
|
PyObject_HEAD
|
|
PyContext *tok_ctx;
|
|
PyContextVar *tok_var;
|
|
PyObject *tok_oldval;
|
|
int tok_used;
|
|
};
|
|
|
|
|
|
int _PyContext_Init(void);
|
|
void _PyContext_Fini(void);
|
|
|
|
|
|
#endif /* !Py_INTERNAL_CONTEXT_H */
|