diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-03-04 06:05:36 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-03-04 06:05:36 (GMT) |
commit | 4ddb44a1d00cc513e27e43b4145c60d55c33b1a0 (patch) | |
tree | 4a94684a6c7b3f62247aec93db4dcc2dda8f9006 /Objects | |
parent | 69d7f6a6a78e02783e38621531ca8ae8f3b7c4e0 (diff) | |
download | cpython-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.c | 10 |
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; |