[Python-checkins] r69688 - python/trunk/Modules/itertoolsmodule.c
benjamin.peterson
python-checkins at python.org
Mon Feb 16 22:07:52 CET 2009
Author: benjamin.peterson
Date: Mon Feb 16 22:07:52 2009
New Revision: 69688
Log:
fix compiler warnings
Modified:
python/trunk/Modules/itertoolsmodule.c
Modified: python/trunk/Modules/itertoolsmodule.c
==============================================================================
--- python/trunk/Modules/itertoolsmodule.c (original)
+++ python/trunk/Modules/itertoolsmodule.c Mon Feb 16 22:07:52 2009
@@ -3239,8 +3239,8 @@
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;
}
@@ -3267,8 +3267,8 @@
} else
long_cnt = NULL;
}
- assert(cnt != PY_SSIZE_T_MAX && long_cnt == NULL ||
- cnt == PY_SSIZE_T_MAX && long_cnt != NULL);
+ assert((cnt != PY_SSIZE_T_MAX && long_cnt == NULL) ||
+ (cnt == PY_SSIZE_T_MAX && long_cnt != NULL));
/* create countobject structure */
lz = (countobject *)type->tp_alloc(type, 0);
@@ -3292,6 +3292,7 @@
Py_TYPE(lz)->tp_free(lz);
}
+static int
count_traverse(countobject *lz, visitproc visit, void *arg)
{
Py_VISIT(lz->long_cnt);
@@ -3302,7 +3303,6 @@
static PyObject *
count_nextlong(countobject *lz)
{
- static PyObject *one = NULL;
PyObject *long_cnt;
PyObject *stepped_up;
More information about the Python-checkins
mailing list