Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add PyInterpreterState.cached_objects.
  • Loading branch information
ericsnowcurrently committed Nov 11, 2022
commit 65532f63e195efc025491572a066db9757139194
7 changes: 7 additions & 0 deletions Include/internal/pycore_global_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ struct _Py_global_objects {
PyObject *interned;
};

#define _Py_INTERP_CACHED_OBJECT(interp, NAME) \
(interp)->cached_objects.NAME

struct _Py_interp_cached_objects {
int _not_set;
};

#define _Py_INTERP_STATIC_OBJECT(interp, NAME) \
(interp)->static_objects.NAME
#define _Py_INTERP_SINGLETON(interp, NAME) \
Expand Down
1 change: 1 addition & 0 deletions Include/internal/pycore_interp.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ struct _is {
struct callable_cache callable_cache;
PyCodeObject *interpreter_trampoline;

struct _Py_interp_cached_objects cached_objects;
struct _Py_interp_static_objects static_objects;

/* The following fields are here to avoid allocation during init.
Expand Down