diff options
| author | Benjamin Peterson <benjamin@python.org> | 2009-02-21 23:09:33 (GMT) |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2009-02-21 23:09:33 (GMT) |
| commit | 873389dbd843bfccc54d679ba5ef3ca3e95bf2f7 (patch) | |
| tree | e83f73a464709c85ed40631face830273998e83d /Modules/itertoolsmodule.c | |
| parent | 3e4caeb3bf2b2579861e9f3379e3508fbb30549c (diff) | |
| download | cpython-873389dbd843bfccc54d679ba5ef3ca3e95bf2f7.zip cpython-873389dbd843bfccc54d679ba5ef3ca3e95bf2f7.tar.gz cpython-873389dbd843bfccc54d679ba5ef3ca3e95bf2f7.tar.bz2 | |
fix compiler warnings
Diffstat (limited to 'Modules/itertoolsmodule.c')
| -rw-r--r-- | Modules/itertoolsmodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 58b9b32..1353e76 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -3240,15 +3240,15 @@ count_new(PyTypeObject *type, PyObject *args, PyObject *kwds) 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 = PyInt_AsSsize_t(long_cnt); - if (cnt == -1 && PyErr_Occurred() || !PyInt_Check(long_cnt)) { + if ((cnt == -1 && PyErr_Occurred()) || !PyInt_Check(long_cnt)) { PyErr_Clear(); slow_mode = 1; } @@ -3281,10 +3281,10 @@ count_new(PyTypeObject *type, PyObject *args, PyObject *kwds) 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 || - PyInt_Check(long_step) && PyInt_AS_LONG(long_step) == 1); + (PyInt_Check(long_step) && PyInt_AS_LONG(long_step) == 1)); /* create countobject structure */ lz = (countobject *)type->tp_alloc(type, 0); |
