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
Next Next commit
Rename PyObject_GetAttrStackRef to _PyObject_GetAttrStackRef
  • Loading branch information
colesbury committed Feb 2, 2026
commit 6edb13fd32f0114c575e00c9a0b0aad0f61d35fe
2 changes: 1 addition & 1 deletion Include/internal/pycore_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ PyAPI_FUNC(int) _PyObject_GetMethodStackRef(PyThreadState *ts, PyObject *obj,

// Like PyObject_GetAttr but returns a _PyStackRef. For types, this can
// return a deferred reference to reduce reference count contention.
PyAPI_FUNC(_PyStackRef) PyObject_GetAttrStackRef(PyObject *obj, PyObject *name);
PyAPI_FUNC(_PyStackRef) _PyObject_GetAttrStackRef(PyObject *obj, PyObject *name);

// Cache the provided init method in the specialization cache of type if the
// provided type version matches the current version of the type.
Expand Down
2 changes: 1 addition & 1 deletion Modules/_testinternalcapi/test_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ PyObject_GetAttr(PyObject *v, PyObject *name)
For types (tp_getattro == _Py_type_getattro), this can return
a deferred reference to reduce reference count contention. */
_PyStackRef
PyObject_GetAttrStackRef(PyObject *v, PyObject *name)
_PyObject_GetAttrStackRef(PyObject *v, PyObject *name)
{
PyTypeObject *tp = Py_TYPE(v);
if (!PyUnicode_Check(name)) {
Expand Down
2 changes: 1 addition & 1 deletion Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -10984,7 +10984,7 @@ slot_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds)

_PyCStackRef func_ref;
_PyThreadState_PushCStackRef(tstate, &func_ref);
func_ref.ref = PyObject_GetAttrStackRef((PyObject *)type, &_Py_ID(__new__));
func_ref.ref = _PyObject_GetAttrStackRef((PyObject *)type, &_Py_ID(__new__));
if (PyStackRef_IsNull(func_ref.ref)) {
_PyThreadState_PopCStackRef(tstate, &func_ref);
return NULL;
Expand Down
2 changes: 1 addition & 1 deletion Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2389,7 +2389,7 @@ dummy_func(
}
else {
/* Classic, pushes one value. */
attr = PyObject_GetAttrStackRef(PyStackRef_AsPyObjectBorrow(owner), name);
attr = _PyObject_GetAttrStackRef(PyStackRef_AsPyObjectBorrow(owner), name);
PyStackRef_CLOSE(owner);
ERROR_IF(PyStackRef_IsNull(attr));
}
Expand Down
2 changes: 1 addition & 1 deletion Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading