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:
4c792b0
)
*.c: Use `Py_XDECREF' where applicable.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 19 Oct 2019 13:31:40 +0000
(14:31 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Fri, 10 Apr 2020 21:42:39 +0000
(22:42 +0100)
The Python 2.5 version of `Py_DECREF' isn't properly braced, so `if (x)
Py_DECREF(x);' provokes a dangling-`else' warning from the compiler.
util.c
patch
|
blob
|
blame
|
history
diff --git
a/util.c
b/util.c
index adb780034c2d762acab3fd27e98006193ddac663..aa75ea7a8bb0ea06cff575e0e46708bc38feb7fc 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-68,8
+68,8
@@
PyObject *getk64(kludge64 u)
Py_DECREF(i); i = t;
if ((rc = PyNumber_Int(i)) == 0) goto end;
end:
Py_DECREF(i); i = t;
if ((rc = PyNumber_Int(i)) == 0) goto end;
end:
-
if (i) Py_
DECREF(i);
-
if (j) Py_
DECREF(j);
+
Py_X
DECREF(i);
+
Py_X
DECREF(j);
return (rc);
#endif
}
return (rc);
#endif
}
@@
-185,7
+185,7
@@
int convk64(PyObject *o, void *pp)
rc = 1;
end:
rc = 1;
end:
-
if (i) Py_
DECREF(i);
+
Py_X
DECREF(i);
return (rc);
}
return (rc);
}