Skip to content

Commit b3060f6

Browse files
committed
1 parent 1cc816b commit b3060f6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Objects/object.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,8 +2682,8 @@ _Py_SetImmortalUntracked(PyObject *op)
26822682
}
26832683
#ifdef Py_GIL_DISABLED
26842684
op->ob_tid = _Py_UNOWNED_TID;
2685-
_Py_atomic_store_uint32_relaxed(&op->ob_ref_local, _Py_IMMORTAL_REFCNT_LOCAL);
2686-
_Py_atomic_store_ssize_relaxed(&op->ob_ref_shared, 0);
2685+
op->ob_ref_local = _Py_IMMORTAL_REFCNT_LOCAL;
2686+
op->ob_ref_shared = 0;
26872687
_Py_atomic_or_uint8(&op->ob_gc_bits, _PyGC_BITS_DEFERRED);
26882688
#elif SIZEOF_VOID_P > 4
26892689
op->ob_flags = _Py_IMMORTAL_FLAGS;

Objects/unicodeobject.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,7 +1329,7 @@ PyUnicode_New(Py_ssize_t size, Py_UCS4 maxchar)
13291329
else
13301330
data = unicode + 1;
13311331
_PyUnicode_LENGTH(unicode) = size;
1332-
PyUnicode_SET_HASH((PyObject *)unicode, -1);
1332+
_PyUnicode_HASH(unicode) = -1;
13331333
_PyUnicode_STATE(unicode).interned = 0;
13341334
_PyUnicode_STATE(unicode).kind = kind;
13351335
_PyUnicode_STATE(unicode).compact = 1;
@@ -13903,9 +13903,9 @@ unicode_subtype_new(PyTypeObject *type, PyObject *unicode)
1390313903

1390413904
_PyUnicode_LENGTH(self) = length;
1390513905
#ifdef Py_DEBUG
13906-
PyUnicode_SET_HASH((PyObject *)self, -1);
13906+
_PyUnicode_HASH(self) = -1;
1390713907
#else
13908-
PyUnicode_SET_HASH((PyObject *)self, PyUnicode_HASH(unicode));
13908+
_PyUnicode_HASH(self) = _PyUnicode_HASH(unicode);
1390913909
#endif
1391013910
_PyUnicode_STATE(self).interned = 0;
1391113911
_PyUnicode_STATE(self).kind = kind;
@@ -13950,7 +13950,7 @@ unicode_subtype_new(PyTypeObject *type, PyObject *unicode)
1395013950
memcpy(data, PyUnicode_DATA(unicode), kind * (length + 1));
1395113951
assert(_PyUnicode_CheckConsistency(self, 1));
1395213952
#ifdef Py_DEBUG
13953-
PyUnicode_SET_HASH((PyObject *)self, PyUnicode_HASH(unicode));
13953+
_PyUnicode_HASH(self) = _PyUnicode_HASH(unicode);
1395413954
#endif
1395513955
return self;
1395613956

0 commit comments

Comments
 (0)