Mailing List Archive

python/dist/src/Modules datetimemodule.c,1.1,1.2
Update of /cvsroot/python/python/dist/src/Modules
In directory sc8-pr-cvs1:/tmp/cvs-serv2252

Modified Files:
datetimemodule.c
Log Message:
Fix GCC warnings. It turns out two out of three pointed to real bugs!


Index: datetimemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/datetimemodule.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** datetimemodule.c 16 Dec 2002 20:18:05 -0000 1.1
--- datetimemodule.c 16 Dec 2002 20:34:55 -0000 1.2
***************
*** 335,339 ****
PyErr_Format(PyExc_OverflowError,
"days=%d; must have magnitude <= %d",
! days);
return -1;
}
--- 335,339 ----
PyErr_Format(PyExc_OverflowError,
"days=%d; must have magnitude <= %d",
! days, MAX_DELTA_DAYS);
return -1;
}
***************
*** 1026,1030 ****
/* Call time.time() and return its result (a Python float). */
static PyObject *
! time_time()
{
PyObject *result = NULL;
--- 1026,1030 ----
/* Call time.time() and return its result (a Python float). */
static PyObject *
! time_time(void)
{
PyObject *result = NULL;
***************
*** 4142,4146 ****
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
Py_TPFLAGS_BASETYPE, /* tp_flags */
! time_doc, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
--- 4142,4146 ----
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES |
Py_TPFLAGS_BASETYPE, /* tp_flags */
! timetz_doc, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */