[Python-checkins] r69857 - in python/branches/py3k: Modules/itertoolsmodule.c
benjamin.peterson
python-checkins at python.org
Sun Feb 22 00:14:56 CET 2009
Author: benjamin.peterson
Date: Sun Feb 22 00:14:55 2009
New Revision: 69857
Log:
Merged revisions 69855 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r69855 | benjamin.peterson | 2009-02-21 17:09:33 -0600 (Sat, 21 Feb 2009) | 1 line
fix compiler warnings
........
Modified:
python/branches/py3k/ (props changed)
python/branches/py3k/Modules/itertoolsmodule.c
Modified: python/branches/py3k/Modules/itertoolsmodule.c
==============================================================================
--- python/branches/py3k/Modules/itertoolsmodule.c (original)
+++ python/branches/py3k/Modules/itertoolsmodule.c Sun Feb 22 00:14:55 2009
@@ -2923,15 +2923,15 @@
kwlist, &long_cnt, &long_step))
return NULL;
- if (long_cnt != NULL && !PyNumber_Check(long_cnt) ||
- long_step != NULL && !PyNumber_Check(long_step)) {
+ if ((long_cnt != NULL && !PyNumber_Check(long_cnt)) ||
+ (long_step != NULL && !PyNumber_Check(long_step))) {
PyErr_SetString(PyExc_TypeError, "a number is required");
return NULL;
}
if (long_cnt != NULL) {
cnt = PyLong_AsSsize_t(long_cnt);
- if (cnt == -1 && PyErr_Occurred() || !PyLong_Check(long_cnt)) {
+ if ((cnt == -1 && PyErr_Occurred()) || !PyLong_Check(long_cnt)) {
PyErr_Clear();
slow_mode = 1;
}
@@ -2964,10 +2964,10 @@
else
Py_CLEAR(long_cnt);
- assert(cnt != PY_SSIZE_T_MAX && long_cnt == NULL && !slow_mode ||
- cnt == PY_SSIZE_T_MAX && long_cnt != NULL && slow_mode);
+ assert((cnt != PY_SSIZE_T_MAX && long_cnt == NULL && !slow_mode) ||
+ (cnt == PY_SSIZE_T_MAX && long_cnt != NULL && slow_mode));
assert(slow_mode ||
- PyLong_Check(long_step) && PyLong_AS_LONG(long_step) == 1);
+ (PyLong_Check(long_step) && PyLong_AS_LONG(long_step) == 1));
/* create countobject structure */
lz = (countobject *)type->tp_alloc(type, 0);
More information about the Python-checkins
mailing list