summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-03-04 06:05:36 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-03-04 06:05:36 (GMT)
commit4ddb44a1d00cc513e27e43b4145c60d55c33b1a0 (patch)
tree4a94684a6c7b3f62247aec93db4dcc2dda8f9006 /Objects
parent69d7f6a6a78e02783e38621531ca8ae8f3b7c4e0 (diff)
downloadcpython-4ddb44a1d00cc513e27e43b4145c60d55c33b1a0.zip
cpython-4ddb44a1d00cc513e27e43b4145c60d55c33b1a0.tar.gz
cpython-4ddb44a1d00cc513e27e43b4145c60d55c33b1a0.tar.bz2
properly use PyObject_CallMethod in dictview binary operations (closes #26478)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/dictobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 3e1c583..fe19356 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -2998,7 +2998,8 @@ dictviews_sub(PyObject* self, PyObject *other)
if (result == NULL)
return NULL;
- tmp = PyObject_CallMethod(result, "difference_update", "O", other);
+
+ tmp = PyObject_CallMethod(result, "difference_update", "(O)", other);
if (tmp == NULL) {
Py_DECREF(result);
return NULL;
@@ -3016,7 +3017,7 @@ dictviews_and(PyObject* self, PyObject *other)
if (result == NULL)
return NULL;
- tmp = PyObject_CallMethod(result, "intersection_update", "O", other);
+ tmp = PyObject_CallMethod(result, "intersection_update", "(O)", other);
if (tmp == NULL) {
Py_DECREF(result);
return NULL;
@@ -3034,7 +3035,7 @@ dictviews_or(PyObject* self, PyObject *other)
if (result == NULL)
return NULL;
- tmp = PyObject_CallMethod(result, "update", "O", other);
+ tmp = PyObject_CallMethod(result, "update", "(O)", other);
if (tmp == NULL) {
Py_DECREF(result);
return NULL;
@@ -3052,8 +3053,7 @@ dictviews_xor(PyObject* self, PyObject *other)
if (result == NULL)
return NULL;
- tmp = PyObject_CallMethod(result, "symmetric_difference_update", "O",
- other);
+ tmp = PyObject_CallMethod(result, "symmetric_difference_update", "(O)", other);
if (tmp == NULL) {
Py_DECREF(result);
return NULL;