Skip to content

Commit

Permalink
add atomics for new_reference
Browse files Browse the repository at this point in the history
  • Loading branch information
Fidget-Spinner committed Jul 14, 2024
1 parent a183474 commit 307b675
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -2364,8 +2364,8 @@ new_reference(PyObject *op)
op->_padding = 0;
op->ob_mutex = (PyMutex){ 0 };
op->ob_gc_bits = 0;
op->ob_ref_local = 1;
op->ob_ref_shared = 0;
_Py_atomic_store_uint32_release(&op->ob_ref_local, 1);
_Py_atomic_store_ssize_release(&op->ob_ref_shared, 0);
#endif
#ifdef Py_TRACE_REFS
_Py_AddToAllObjects(op);
Expand Down

0 comments on commit 307b675

Please sign in to comment.