Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d1a9cc2

Browse files
author
Victor Stinner
committed
dictviews_or() uses _Py_identifier
1 parent bfc6d74 commit d1a9cc2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Objects/dictobject.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2747,10 +2747,12 @@ dictviews_or(PyObject* self, PyObject *other)
27472747
{
27482748
PyObject *result = PySet_New(self);
27492749
PyObject *tmp;
2750+
_Py_identifier(update);
2751+
27502752
if (result == NULL)
27512753
return NULL;
27522754

2753-
tmp = PyObject_CallMethod(result, "update", "O", other);
2755+
tmp = _PyObject_CallMethodId(result, &PyId_update, "O", other);
27542756
if (tmp == NULL) {
27552757
Py_DECREF(result);
27562758
return NULL;

0 commit comments

Comments
 (0)