Skip to content
Merged
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
More renames
  • Loading branch information
DinoV committed Jan 25, 2024
commit 87e94657436bc27a9d6eea6255465e3898bf72d3
9 changes: 4 additions & 5 deletions Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ _Py_TryIncRefShared(PyObject *op)

/* Tries to incref the object op and ensures that *src still points to it. */
static inline int
_Py_TryAcquireObject(PyObject **src, PyObject *op)
_Py_TryIncref(PyObject **src, PyObject *op)
{
if (_Py_TryIncrefFast(op)) {
return 1;
Expand All @@ -456,7 +456,7 @@ _Py_XGetRef(PyObject **ptr)
if (value == NULL) {
return value;
}
if (_Py_TryAcquireObject(ptr, value)) {
if (_Py_TryIncref(ptr, value)) {
return value;
}
}
Expand All @@ -465,13 +465,13 @@ _Py_XGetRef(PyObject **ptr)
/* Attempts to loads and increfs an object from ptr. Returns NULL
on failure, which may be due to a NULL value or a concurrent update. */
static inline PyObject *
_Py_TryXFetchRef(PyObject **ptr)
_Py_TryXGetRef(PyObject **ptr)
{
PyObject *value = _Py_atomic_load_ptr(ptr);
if (value == NULL) {
return value;
}
if (_Py_TryAcquireObject(ptr, value)) {
if (_Py_TryIncref(ptr, value)) {
return value;
}
return NULL;
Expand Down Expand Up @@ -499,7 +499,6 @@ _Py_NewRefWithLock(PyObject *op)
return op;
}
}
return op;
}

static inline PyObject *
Expand Down