chiark
/
gitweb
/
~mdw
/
pyke
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87aa2e3
)
util.c: Fix sense of error check in `popitem'.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 17 Nov 2019 01:33:34 +0000
(
01:33
+0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 22 Nov 2019 22:18:12 +0000
(22:18 +0000)
util.c
patch
|
blob
|
blame
|
history
diff --git
a/util.c
b/util.c
index 5abd7c92d2d99c3456d116d723d63061c7c64551..231e00a55afa7e6101abfbdce67a211bd0199e92 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-803,7
+803,7
@@
PyObject *gmapmeth_popitem(PyObject *me, PyObject *arg)
PyObject *i = 0, *k = 0, *v = 0, *rc = 0;
if (!PyArg_ParseTuple(arg, ":popitem") ||
- (i = PyObject_GetIter(me)))
+ (i = PyObject_GetIter(me))
== 0
)
goto end;
if ((k = PyIter_Next(i)) == 0) {
if (!PyErr_Occurred()) VALERR("popitem(): mapping is empty");