codekingpro/portable-devtools
114k
1#ifndef Py_INTERNAL_GLOBAL_OBJECTS_H2#define Py_INTERNAL_GLOBAL_OBJECTS_H3#ifdef __cplusplus4extern "C" {5#endif6 7#ifndef Py_BUILD_CORE8# error "this header requires Py_BUILD_CORE define"9#endif10 11 12// Only immutable objects should be considered runtime-global.13// All others must be per-interpreter.14 15#define _Py_GLOBAL_OBJECT(NAME) \16 _PyRuntime.static_objects.NAME17#define _Py_SINGLETON(NAME) \18 _Py_GLOBAL_OBJECT(singletons.NAME)19 20 21#define _Py_INTERP_CACHED_OBJECT(interp, NAME) \22 (interp)->cached_objects.NAME23 24 25#define _Py_INTERP_STATIC_OBJECT(interp, NAME) \26 (interp)->static_objects.NAME27#define _Py_INTERP_SINGLETON(interp, NAME) \28 _Py_INTERP_STATIC_OBJECT(interp, singletons.NAME)29 30 31#ifdef __cplusplus32}33#endif34#endif /* !Py_INTERNAL_GLOBAL_OBJECTS_H */35 