*** Modules/signalmodule.c 2008-03-06 08:37:58.000000000 -0300 --- Modules/signalmodule.c.2 2008-03-06 08:42:17.000000000 -0300 *************** itimer_retval(struct itimerval *iv) *** 115,130 **** { PyObject *r, *v; ! if(!(r = PyTuple_New(2))) return NULL; ! if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_value)))) return NULL; PyTuple_SET_ITEM(r, 0, v); ! if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_interval)))) return NULL; PyTuple_SET_ITEM(r, 1, v); --- 115,135 ---- { PyObject *r, *v; ! r = PyTuple_New(2); ! if (r == NULL) return NULL; ! if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_value)))) { ! Py_DECREF(r); return NULL; + } PyTuple_SET_ITEM(r, 0, v); ! if(!(v = PyFloat_FromDouble(double_from_timeval(&iv->it_interval)))) { ! Py_DECREF(r); return NULL; + } PyTuple_SET_ITEM(r, 1, v); *************** signal_setitimer(PyObject *self, PyObjec *** 411,418 **** PyDoc_STRVAR(setitimer_doc, "setitimer(which, seconds[, interval])\n\ \n\ ! Sets given itimer to fire after value seconds and after that every \n\ ! interval seconds.\n\ The itimer can be cleared by setting seconds to zero.\n\ \n\ Returns old values as a tuple: (delay, interval)."); --- 416,424 ---- PyDoc_STRVAR(setitimer_doc, "setitimer(which, seconds[, interval])\n\ \n\ ! Sets given itimer (one of ITIMER_REAL, ITIMER_VIRTUAL\n\ ! or ITIMER_PROF) to fire after value seconds and after\n\ ! that every interval seconds.\n\ The itimer can be cleared by setting seconds to zero.\n\ \n\ Returns old values as a tuple: (delay, interval)."); *************** initsignal(void) *** 772,780 **** Py_DECREF(x); #endif ! #ifdef SETITIMER || GETITIMER ! ItimerError = PyErr_NewException("itimer.error", NULL, NULL); ! PyDict_SetItemString(d, "error", ItimerError); #endif if (!PyErr_Occurred()) --- 778,787 ---- Py_DECREF(x); #endif ! #if defined (HAVE_SETITIMER) || defined (HAVE_GETITIMER) ! ItimerError = PyErr_NewException("signal.ItimerError", ! PyExc_IOError, NULL); ! PyDict_SetItemString(d, "ItimerError", ItimerError); #endif if (!PyErr_Occurred())