Skip to content
Prev Previous commit
Next Next commit
Merge branch 'main' into isolate-types-next-version-tag
  • Loading branch information
ericsnowcurrently committed Apr 24, 2023
commit 5f8c3e4e55f561ba00427c353b9fbb5bc3d23695
2 changes: 0 additions & 2 deletions Include/internal/pycore_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ typedef struct pyruntimestate {
struct _py_object_runtime_state object_state;
struct _Py_float_runtime_state float_state;
struct _Py_unicode_runtime_state unicode_state;
struct _Py_dict_runtime_state dict_state;
struct _py_func_runtime_state func_state;
struct _types_runtime_state types;

/* All the objects that are shared by the runtime's interpreters. */
Expand Down
6 changes: 6 additions & 0 deletions Include/internal/pycore_runtime_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ extern PyTypeObject _PyExc_MemoryError;
}, \
}, \
.dtoa = _dtoa_state_INIT(&(INTERP)), \
.dict_state = { \
.next_keys_version = 2, \
}, \
.func_state = { \
.next_version = 1, \
}, \
.types = { \
.next_version_tag = _Py_TYPE_BASE_VERSION_TAG, \
}, \
Expand Down
3 changes: 2 additions & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,8 @@ assign_version_tag(PyInterpreterState *interp, PyTypeObject *type)

int PyUnstable_Type_AssignVersionTag(PyTypeObject *type)
{
return assign_version_tag(type);
PyInterpreterState *interp = _PyInterpreterState_GET();
return assign_version_tag(interp, type);
}


Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.