diff -u -r Python-2.5/Modules/_csv.c lang/python/src/Modules/_csv.c --- Python-2.5/Modules/_csv.c 2006-05-10 07:57:58.000000000 +0100 +++ lang/python/src/Modules/_csv.c 2007-02-16 11:20:34.781649840 +0000 @@ -180,25 +180,25 @@ } static PyObject * -Dialect_get_lineterminator(DialectObj *self) +Dialect_get_lineterminator(DialectObj *self, void *closure) { return get_string(self->lineterminator); } static PyObject * -Dialect_get_escapechar(DialectObj *self) +Dialect_get_escapechar(DialectObj *self, void *closure) { return get_nullchar_as_None(self->escapechar); } static PyObject * -Dialect_get_quotechar(DialectObj *self) +Dialect_get_quotechar(DialectObj *self, void *closure) { return get_nullchar_as_None(self->quotechar); } static PyObject * -Dialect_get_quoting(DialectObj *self) +Dialect_get_quoting(DialectObj *self, void *closure) { return PyInt_FromLong(self->quoting); } @@ -1356,7 +1356,7 @@ * DIALECT REGISTRY */ static PyObject * -csv_list_dialects(PyObject *module, PyObject *args) +csv_list_dialects(PyObject *module, PyObject *NOARGS_NULL) { return PyDict_Keys(dialects); } diff -u -r Python-2.5/Modules/_randommodule.c lang/python/src/Modules/_randommodule.c --- Python-2.5/Modules/_randommodule.c 2006-01-19 06:09:39.000000000 +0000 +++ lang/python/src/Modules/_randommodule.c 2007-02-15 23:31:30.000000000 +0000 @@ -135,7 +135,7 @@ * The orginal code credited Isaku Wada for this algorithm, 2002/01/09. */ static PyObject * -random_random(RandomObject *self) +random_random(RandomObject *self, PyObject *NOARGS_NULL) { unsigned long a=genrand_int32(self)>>5, b=genrand_int32(self)>>6; return PyFloat_FromDouble((a*67108864.0+b)*(1.0/9007199254740992.0)); @@ -309,7 +309,7 @@ } static PyObject * -random_getstate(RandomObject *self) +random_getstate(RandomObject *self, PyObject *NOARGS_NULL) { PyObject *state; PyObject *element; diff -u -r Python-2.5/Modules/_sre.c lang/python/src/Modules/_sre.c --- Python-2.5/Modules/_sre.c 2006-08-12 02:53:28.000000000 +0100 +++ lang/python/src/Modules/_sre.c 2007-02-15 23:19:21.000000000 +0000 @@ -1628,7 +1628,7 @@ static PyObject*pattern_scanner(PatternObject*, PyObject*); static PyObject * -sre_codesize(PyObject* self, PyObject *unused) +sre_codesize(PyObject* self, PyObject *NOARGS_NULL) { return Py_BuildValue("l", sizeof(SRE_CODE)); } @@ -2475,7 +2475,7 @@ } static PyObject* -pattern_copy(PatternObject* self, PyObject *unused) +pattern_copy(PatternObject* self, PyObject *NOARGS_NULL) { #ifdef USE_BUILTIN_COPY PatternObject* copy; @@ -3016,7 +3016,7 @@ } static PyObject* -match_copy(MatchObject* self, PyObject *unused) +match_copy(MatchObject* self, PyObject *NOARGS_NULL) { #ifdef USE_BUILTIN_COPY MatchObject* copy; @@ -3233,7 +3233,7 @@ } static PyObject* -scanner_match(ScannerObject* self, PyObject *unused) +scanner_match(ScannerObject* self, PyObject *NOARGS_NULL) { SRE_STATE* state = &self->state; PyObject* match; @@ -3264,7 +3264,7 @@ static PyObject* -scanner_search(ScannerObject* self, PyObject *unused) +scanner_search(ScannerObject* self, PyObject *NOARGS_NULL) { SRE_STATE* state = &self->state; PyObject* match; diff -u -r Python-2.5/Modules/_struct.c lang/python/src/Modules/_struct.c --- Python-2.5/Modules/_struct.c 2006-08-05 00:59:21.000000000 +0100 +++ lang/python/src/Modules/_struct.c 2007-02-16 14:58:35.114137048 +0000 @@ -1704,14 +1704,14 @@ } static PyObject * -s_get_format(PyStructObject *self, void *unused) +s_get_format(PyStructObject *self, void *closure) { Py_INCREF(self->s_format); return self->s_format; } static PyObject * -s_get_size(PyStructObject *self, void *unused) +s_get_size(PyStructObject *self, void *closure) { return PyInt_FromSsize_t(self->s_size); } diff -u -r Python-2.5/Modules/_typesmodule.c lang/python/src/Modules/_typesmodule.c --- Python-2.5/Modules/_typesmodule.c 2006-07-28 00:46:36.000000000 +0100 +++ lang/python/src/Modules/_typesmodule.c 2007-02-16 11:22:21.517423536 +0000 @@ -20,7 +20,7 @@ }; static PyObject * -helper_getter(Helper *self, void *unused) +helper_getter(Helper *self, void *closure) { Py_RETURN_NONE; } diff -u -r Python-2.5/Modules/arraymodule.c lang/python/src/Modules/arraymodule.c --- Python-2.5/Modules/arraymodule.c 2006-08-12 18:03:09.000000000 +0100 +++ lang/python/src/Modules/arraymodule.c 2007-02-15 22:58:37.000000000 +0000 @@ -626,7 +626,7 @@ } static PyObject * -array_copy(arrayobject *a, PyObject *unused) +array_copy(arrayobject *a, PyObject *NOARGS_NULL) { return array_slice(a, 0, a->ob_size); } @@ -1045,7 +1045,7 @@ static PyObject * -array_buffer_info(arrayobject *self, PyObject *unused) +array_buffer_info(arrayobject *self, PyObject *NOARGS_NULL) { PyObject* retval = NULL; retval = PyTuple_New(2); @@ -1080,7 +1080,7 @@ static PyObject * -array_byteswap(arrayobject *self, PyObject *unused) +array_byteswap(arrayobject *self, PyObject *NOARGS_NULL) { char *p; Py_ssize_t i; @@ -1137,7 +1137,7 @@ 4, or 8 bytes in size, RuntimeError is raised."); static PyObject * -array_reduce(arrayobject *array) +array_reduce(arrayobject *array, PyObject *NOARGS_NULL) { PyObject *dict, *result; @@ -1160,7 +1160,7 @@ PyDoc_STRVAR(array_doc, "Return state information for pickling."); static PyObject * -array_reverse(arrayobject *self, PyObject *unused) +array_reverse(arrayobject *self, PyObject *NOARGS_NULL) { register Py_ssize_t itemsize = self->ob_descr->itemsize; register char *p, *q; @@ -1322,7 +1322,7 @@ static PyObject * -array_tolist(arrayobject *self, PyObject *unused) +array_tolist(arrayobject *self, PyObject *NOARGS_NULL) { PyObject *list = PyList_New(self->ob_size); Py_ssize_t i; @@ -1385,7 +1385,7 @@ static PyObject * -array_tostring(arrayobject *self, PyObject *unused) +array_tostring(arrayobject *self, PyObject *NOARGS_NULL) { return PyString_FromStringAndSize(self->ob_item, self->ob_size * self->ob_descr->itemsize); @@ -1442,7 +1442,7 @@ static PyObject * -array_tounicode(arrayobject *self, PyObject *unused) +array_tounicode(arrayobject *self, PyObject *NOARGS_NULL) { if (self->ob_descr->typecode != 'u') { PyErr_SetString(PyExc_ValueError, diff -u -r Python-2.5/Modules/cPickle.c lang/python/src/Modules/cPickle.c --- Python-2.5/Modules/cPickle.c 2006-08-02 05:27:11.000000000 +0100 +++ lang/python/src/Modules/cPickle.c 2007-02-16 11:38:30.455122616 +0000 @@ -2583,7 +2583,7 @@ } static PyObject * -Pickle_clear_memo(Picklerobject *self, PyObject *args) +Pickle_clear_memo(Picklerobject *self, PyObject *NOARGS_NULL) { if (self->memo) PyDict_Clear(self->memo); @@ -2938,7 +2938,7 @@ } static PyObject * -Pickler_get_pers_func(Picklerobject *p) +Pickler_get_pers_func(Picklerobject *p, void *closure) { if (p->pers_func == NULL) PyErr_SetString(PyExc_AttributeError, "persistent_id"); @@ -2948,7 +2948,7 @@ } static int -Pickler_set_pers_func(Picklerobject *p, PyObject *v) +Pickler_set_pers_func(Picklerobject *p, PyObject *v, void *closure) { if (v == NULL) { PyErr_SetString(PyExc_TypeError, @@ -2962,7 +2962,7 @@ } static int -Pickler_set_inst_pers_func(Picklerobject *p, PyObject *v) +Pickler_set_inst_pers_func(Picklerobject *p, PyObject *v, void *closure) { if (v == NULL) { PyErr_SetString(PyExc_TypeError, @@ -2976,7 +2976,7 @@ } static PyObject * -Pickler_get_memo(Picklerobject *p) +Pickler_get_memo(Picklerobject *p, void *closure) { if (p->memo == NULL) PyErr_SetString(PyExc_AttributeError, "memo"); @@ -2986,7 +2986,7 @@ } static int -Pickler_set_memo(Picklerobject *p, PyObject *v) +Pickler_set_memo(Picklerobject *p, PyObject *v, void *closure) { if (v == NULL) { PyErr_SetString(PyExc_TypeError, @@ -3004,7 +3004,7 @@ } static PyObject * -Pickler_get_error(Picklerobject *p) +Pickler_get_error(Picklerobject *p, void *closure) { /* why is this an attribute on the Pickler? */ Py_INCREF(PicklingError); @@ -5116,13 +5116,13 @@ static PyObject * -Unpickler_load(Unpicklerobject *self, PyObject *unused) +Unpickler_load(Unpicklerobject *self, PyObject *NOARGS_NULL) { return load(self); } static PyObject * -Unpickler_noload(Unpicklerobject *self, PyObject *unused) +Unpickler_noload(Unpicklerobject *self, PyObject *NOARGS_NULL) { return noload(self); } diff -u -r Python-2.5/Modules/cStringIO.c lang/python/src/Modules/cStringIO.c --- Python-2.5/Modules/cStringIO.c 2006-03-30 12:58:57.000000000 +0100 +++ lang/python/src/Modules/cStringIO.c 2007-02-15 23:28:36.000000000 +0000 @@ -102,7 +102,7 @@ }; static PyObject * -IO_flush(IOobject *self, PyObject *unused) { +IO_flush(IOobject *self, PyObject *NOARGS_NULL) { if (!IO__opencheck(self)) return NULL; @@ -143,7 +143,7 @@ PyDoc_STRVAR(IO_isatty__doc__, "isatty(): always returns 0"); static PyObject * -IO_isatty(IOobject *self, PyObject *unused) { +IO_isatty(IOobject *self, PyObject *NOARGS_NULL) { if (!IO__opencheck(self)) return NULL; Py_INCREF(Py_False); return Py_False; @@ -260,7 +260,7 @@ "reset() -- Reset the file position to the beginning"); static PyObject * -IO_reset(IOobject *self, PyObject *unused) { +IO_reset(IOobject *self, PyObject *NOARGS_NULL) { if (!IO__opencheck(self)) return NULL; @@ -273,7 +273,7 @@ PyDoc_STRVAR(IO_tell__doc__, "tell() -- get the current position."); static PyObject * -IO_tell(IOobject *self, PyObject *unused) { +IO_tell(IOobject *self, PyObject *NOARGS_NULL) { if (!IO__opencheck(self)) return NULL; @@ -413,7 +413,7 @@ PyDoc_STRVAR(O_close__doc__, "close(): explicitly release resources held."); static PyObject * -O_close(Oobject *self, PyObject *unused) { +O_close(Oobject *self, PyObject *NOARGS_NULL) { if (self->buf != NULL) free(self->buf); self->buf = NULL; diff -u -r Python-2.5/Modules/collectionsmodule.c lang/python/src/Modules/collectionsmodule.c --- Python-2.5/Modules/collectionsmodule.c 2006-08-13 19:13:02.000000000 +0100 +++ lang/python/src/Modules/collectionsmodule.c 2007-02-16 00:15:56.000000000 +0000 @@ -166,7 +166,7 @@ PyDoc_STRVAR(appendleft_doc, "Add an element to the left side of the deque."); static PyObject * -deque_pop(dequeobject *deque, PyObject *unused) +deque_pop(dequeobject *deque, PyObject *NOARGS_NULL) { PyObject *item; block *prevblock; @@ -202,7 +202,7 @@ PyDoc_STRVAR(pop_doc, "Remove and return the rightmost element."); static PyObject * -deque_popleft(dequeobject *deque, PyObject *unused) +deque_popleft(dequeobject *deque, PyObject *NOARGS_NULL) { PyObject *item; block *prevblock; @@ -520,7 +520,7 @@ } static PyObject * -deque_clearmethod(dequeobject *deque) +deque_clearmethod(dequeobject *deque, PyObject *NOARGS_NULL) { int rv; @@ -577,7 +577,7 @@ } static PyObject * -deque_copy(PyObject *deque) +deque_copy(PyObject *deque, PyObject *NOARGS_NULL) { return PyObject_CallFunctionObjArgs((PyObject *)(deque->ob_type), deque, NULL); @@ -586,7 +586,7 @@ PyDoc_STRVAR(copy_doc, "Return a shallow copy of a deque."); static PyObject * -deque_reduce(dequeobject *deque) +deque_reduce(dequeobject *deque, PyObject *NOARGS_NULL) { PyObject *dict, *result, *it; @@ -787,7 +787,7 @@ /* deque object ********************************************************/ static PyObject *deque_iter(dequeobject *deque); -static PyObject *deque_reviter(dequeobject *deque); +static PyObject *deque_reviter(dequeobject *deque, PyObject *NOARGS_NULL); PyDoc_STRVAR(reversed_doc, "D.__reversed__() -- return a reverse iterator over the deque"); @@ -936,7 +936,7 @@ } static PyObject * -dequeiter_len(dequeiterobject *it) +dequeiter_len(dequeiterobject *it, PyObject *NOARGS_NULL) { return PyInt_FromLong(it->counter); } @@ -987,7 +987,7 @@ PyTypeObject dequereviter_type; static PyObject * -deque_reviter(dequeobject *deque) +deque_reviter(dequeobject *deque, PyObject *NOARGS_NULL) { dequeiterobject *it; @@ -1104,7 +1104,7 @@ PyDoc_STRVAR(defdict_copy_doc, "D.copy() -> a shallow copy of D."); static PyObject * -defdict_copy(defdictobject *dd) +defdict_copy(defdictobject *dd, PyObject *NOARGS_NULL) { /* This calls the object's class. That only works for subclasses whose class constructor has the same signature. Subclasses that @@ -1115,7 +1115,7 @@ } static PyObject * -defdict_reduce(defdictobject *dd) +defdict_reduce(defdictobject *dd, PyObject *NOARGS_NULL) { /* __reduce__ must return a 5-tuple as follows: diff -u -r Python-2.5/Modules/datetimemodule.c lang/python/src/Modules/datetimemodule.c --- Python-2.5/Modules/datetimemodule.c 2006-04-28 20:09:24.000000000 +0100 +++ lang/python/src/Modules/datetimemodule.c 2007-02-16 14:13:50.317288208 +0000 @@ -2051,7 +2051,7 @@ } static PyObject * -delta_reduce(PyDateTime_Delta* self) +delta_reduce(PyDateTime_Delta* self, PyObject *NOARGS_NULL) { return Py_BuildValue("ON", self->ob_type, delta_getstate(self)); } @@ -2173,19 +2173,19 @@ /* Accessor properties. */ static PyObject * -date_year(PyDateTime_Date *self, void *unused) +date_year(PyDateTime_Date *self, void *closure) { return PyInt_FromLong(GET_YEAR(self)); } static PyObject * -date_month(PyDateTime_Date *self, void *unused) +date_month(PyDateTime_Date *self, void *closure) { return PyInt_FromLong(GET_MONTH(self)); } static PyObject * -date_day(PyDateTime_Date *self, void *unused) +date_day(PyDateTime_Date *self, void *closure) { return PyInt_FromLong(GET_DAY(self)); } @@ -2266,7 +2266,7 @@ * generally the same as calling C's time. */ static PyObject * -date_today(PyObject *cls, PyObject *dummy) +date_today(PyObject *cls, PyObject *NOARGS_NULL) { PyObject *time; PyObject *result; @@ -2422,7 +2422,7 @@ } static PyObject * -date_isoformat(PyDateTime_Date *self) +date_isoformat(PyDateTime_Date *self, PyObject *NOARGS_NULL) { char buffer[128]; @@ -2439,7 +2439,7 @@ static PyObject * -date_ctime(PyDateTime_Date *self) +date_ctime(PyDateTime_Date *self, PyObject *NOARGS_NULL) { return format_ctime(self, 0, 0, 0); } @@ -2471,7 +2471,7 @@ /* ISO methods. */ static PyObject * -date_isoweekday(PyDateTime_Date *self) +date_isoweekday(PyDateTime_Date *self, PyObject *NOARGS_NULL) { int dow = weekday(GET_YEAR(self), GET_MONTH(self), GET_DAY(self)); @@ -2479,7 +2479,7 @@ } static PyObject * -date_isocalendar(PyDateTime_Date *self) +date_isocalendar(PyDateTime_Date *self, PyObject *NOARGS_NULL) { int year = GET_YEAR(self); int week1_monday = iso_week1_monday(year); @@ -2530,7 +2530,7 @@ } static PyObject * -date_timetuple(PyDateTime_Date *self) +date_timetuple(PyDateTime_Date *self, PyObject *NOARGS_NULL) { return build_struct_time(GET_YEAR(self), GET_MONTH(self), @@ -2574,14 +2574,14 @@ } static PyObject * -date_toordinal(PyDateTime_Date *self) +date_toordinal(PyDateTime_Date *self, PyObject *NOARGS_NULL) { return PyInt_FromLong(ymd_to_ord(GET_YEAR(self), GET_MONTH(self), GET_DAY(self))); } static PyObject * -date_weekday(PyDateTime_Date *self) +date_weekday(PyDateTime_Date *self, PyObject *NOARGS_NULL) { int dow = weekday(GET_YEAR(self), GET_MONTH(self), GET_DAY(self)); @@ -2601,7 +2601,7 @@ } static PyObject * -date_reduce(PyDateTime_Date *self, PyObject *arg) +date_reduce(PyDateTime_Date *self, PyObject *NOARGS_NULL) { return Py_BuildValue("(ON)", self->ob_type, date_getstate(self)); } @@ -2858,7 +2858,7 @@ */ static PyObject * -tzinfo_reduce(PyObject *self) +tzinfo_reduce(PyObject *self, PyObject *NOARGS_NULL) { PyObject *args, *state, *tmp; PyObject *getinitargs, *getstate; @@ -2988,32 +2988,32 @@ */ static PyObject * -time_hour(PyDateTime_Time *self, void *unused) +time_hour(PyDateTime_Time *self, void *closure) { return PyInt_FromLong(TIME_GET_HOUR(self)); } static PyObject * -time_minute(PyDateTime_Time *self, void *unused) +time_minute(PyDateTime_Time *self, void *closure) { return PyInt_FromLong(TIME_GET_MINUTE(self)); } /* The name time_second conflicted with some platform header file. */ static PyObject * -py_time_second(PyDateTime_Time *self, void *unused) +py_time_second(PyDateTime_Time *self, void *closure) { return PyInt_FromLong(TIME_GET_SECOND(self)); } static PyObject * -time_microsecond(PyDateTime_Time *self, void *unused) +time_microsecond(PyDateTime_Time *self, void *closure) { return PyInt_FromLong(TIME_GET_MICROSECOND(self)); } static PyObject * -time_tzinfo(PyDateTime_Time *self, void *unused) +time_tzinfo(PyDateTime_Time *self, void *closure) { PyObject *result = HASTZINFO(self) ? self->tzinfo : Py_None; Py_INCREF(result); @@ -3113,19 +3113,19 @@ /* These are all METH_NOARGS, so don't need to check the arglist. */ static PyObject * -time_utcoffset(PyDateTime_Time *self, PyObject *unused) { +time_utcoffset(PyDateTime_Time *self, PyObject *NOARGS_NULL) { return offset_as_timedelta(HASTZINFO(self) ? self->tzinfo : Py_None, "utcoffset", Py_None); } static PyObject * -time_dst(PyDateTime_Time *self, PyObject *unused) { +time_dst(PyDateTime_Time *self, PyObject *NOARGS_NULL) { return offset_as_timedelta(HASTZINFO(self) ? self->tzinfo : Py_None, "dst", Py_None); } static PyObject * -time_tzname(PyDateTime_Time *self, PyObject *unused) { +time_tzname(PyDateTime_Time *self, PyObject *NOARGS_NULL) { return call_tzname(HASTZINFO(self) ? self->tzinfo : Py_None, Py_None); } @@ -3167,7 +3167,7 @@ } static PyObject * -time_isoformat(PyDateTime_Time *self) +time_isoformat(PyDateTime_Time *self, PyObject *NOARGS_NULL) { char buf[100]; PyObject *result; @@ -3404,14 +3404,14 @@ } static PyObject * -time_reduce(PyDateTime_Time *self, PyObject *arg) +time_reduce(PyDateTime_Time *self, PyObject *NOARGS_NULL) { return Py_BuildValue("(ON)", self->ob_type, time_getstate(self)); } static PyMethodDef time_methods[] = { - {"isoformat", (PyCFunction)time_isoformat, METH_KEYWORDS, + {"isoformat", (PyCFunction)time_isoformat, METH_NOARGS, PyDoc_STR("Return string in ISO 8601 format, HH:MM:SS[.mmmmmm]" "[+HH:MM].")}, @@ -3509,31 +3509,31 @@ */ static PyObject * -datetime_hour(PyDateTime_DateTime *self, void *unused) +datetime_hour(PyDateTime_DateTime *self, void *closure) { return PyInt_FromLong(DATE_GET_HOUR(self)); } static PyObject * -datetime_minute(PyDateTime_DateTime *self, void *unused) +datetime_minute(PyDateTime_DateTime *self, void *closure) { return PyInt_FromLong(DATE_GET_MINUTE(self)); } static PyObject * -datetime_second(PyDateTime_DateTime *self, void *unused) +datetime_second(PyDateTime_DateTime *self, void *closure) { return PyInt_FromLong(DATE_GET_SECOND(self)); } static PyObject * -datetime_microsecond(PyDateTime_DateTime *self, void *unused) +datetime_microsecond(PyDateTime_DateTime *self, void *closure) { return PyInt_FromLong(DATE_GET_MICROSECOND(self)); } static PyObject * -datetime_tzinfo(PyDateTime_DateTime *self, void *unused) +datetime_tzinfo(PyDateTime_DateTime *self, void *closure) { PyObject *result = HASTZINFO(self) ? self->tzinfo : Py_None; Py_INCREF(result); @@ -3765,7 +3765,7 @@ * precision of a timestamp. */ static PyObject * -datetime_utcnow(PyObject *cls, PyObject *dummy) +datetime_utcnow(PyObject *cls, PyObject *NOARGS_NULL) { return datetime_best_possible(cls, gmtime, Py_None); } @@ -3903,19 +3903,19 @@ /* These are all METH_NOARGS, so don't need to check the arglist. */ static PyObject * -datetime_utcoffset(PyDateTime_DateTime *self, PyObject *unused) { +datetime_utcoffset(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { return offset_as_timedelta(HASTZINFO(self) ? self->tzinfo : Py_None, "utcoffset", (PyObject *)self); } static PyObject * -datetime_dst(PyDateTime_DateTime *self, PyObject *unused) { +datetime_dst(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { return offset_as_timedelta(HASTZINFO(self) ? self->tzinfo : Py_None, "dst", (PyObject *)self); } static PyObject * -datetime_tzname(PyDateTime_DateTime *self, PyObject *unused) { +datetime_tzname(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { return call_tzname(HASTZINFO(self) ? self->tzinfo : Py_None, (PyObject *)self); } @@ -4113,7 +4113,7 @@ } static PyObject * -datetime_ctime(PyDateTime_DateTime *self) +datetime_ctime(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { return format_ctime((PyDateTime_Date *)self, DATE_GET_HOUR(self), @@ -4329,7 +4329,7 @@ } static PyObject * -datetime_timetuple(PyDateTime_DateTime *self) +datetime_timetuple(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { int dstflag = -1; @@ -4356,7 +4356,7 @@ } static PyObject * -datetime_getdate(PyDateTime_DateTime *self) +datetime_getdate(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { return new_date(GET_YEAR(self), GET_MONTH(self), @@ -4364,7 +4364,7 @@ } static PyObject * -datetime_gettime(PyDateTime_DateTime *self) +datetime_gettime(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { return new_time(DATE_GET_HOUR(self), DATE_GET_MINUTE(self), @@ -4374,7 +4374,7 @@ } static PyObject * -datetime_gettimetz(PyDateTime_DateTime *self) +datetime_gettimetz(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { return new_time(DATE_GET_HOUR(self), DATE_GET_MINUTE(self), @@ -4384,7 +4384,7 @@ } static PyObject * -datetime_utctimetuple(PyDateTime_DateTime *self) +datetime_utctimetuple(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { int y = GET_YEAR(self); int m = GET_MONTH(self); @@ -4450,7 +4450,7 @@ } static PyObject * -datetime_reduce(PyDateTime_DateTime *self, PyObject *arg) +datetime_reduce(PyDateTime_DateTime *self, PyObject *NOARGS_NULL) { return Py_BuildValue("(ON)", self->ob_type, datetime_getstate(self)); } diff -u -r Python-2.5/Modules/gcmodule.c lang/python/src/Modules/gcmodule.c --- Python-2.5/Modules/gcmodule.c 2006-05-25 20:15:31.000000000 +0100 +++ lang/python/src/Modules/gcmodule.c 2007-02-16 13:28:44.021707672 +0000 @@ -710,7 +710,7 @@ else { if ((clear = op->ob_type->tp_clear) != NULL) { Py_INCREF(op); - clear(op); + (void) clear(op); Py_DECREF(op); } } @@ -907,7 +907,7 @@ "Enable automatic garbage collection.\n"); static PyObject * -gc_enable(PyObject *self, PyObject *noargs) +gc_enable(PyObject *self, PyObject *NOARGS_NULL) { enabled = 1; Py_INCREF(Py_None); @@ -920,7 +920,7 @@ "Disable automatic garbage collection.\n"); static PyObject * -gc_disable(PyObject *self, PyObject *noargs) +gc_disable(PyObject *self, PyObject *NOARGS_NULL) { enabled = 0; Py_INCREF(Py_None); @@ -933,7 +933,7 @@ "Returns true if automatic garbage collection is enabled.\n"); static PyObject * -gc_isenabled(PyObject *self, PyObject *noargs) +gc_isenabled(PyObject *self, PyObject *NOARGS_NULL) { return PyBool_FromLong((long)enabled); } @@ -1004,7 +1004,7 @@ "Get the garbage collection debugging flags.\n"); static PyObject * -gc_get_debug(PyObject *self, PyObject *noargs) +gc_get_debug(PyObject *self, PyObject *NOARGS_NULL) { return Py_BuildValue("i", debug); } @@ -1039,7 +1039,7 @@ "Return the current collection thresholds\n"); static PyObject * -gc_get_thresh(PyObject *self, PyObject *noargs) +gc_get_thresh(PyObject *self, PyObject *NOARGS_NULL) { return Py_BuildValue("(iii)", generations[0].threshold, @@ -1053,7 +1053,7 @@ "Return the current collection counts\n"); static PyObject * -gc_get_count(PyObject *self, PyObject *noargs) +gc_get_count(PyObject *self, PyObject *NOARGS_NULL) { return Py_BuildValue("(iii)", generations[0].count, @@ -1154,7 +1154,7 @@ "returned).\n"); static PyObject * -gc_get_objects(PyObject *self, PyObject *noargs) +gc_get_objects(PyObject *self, PyObject *NOARGS_NULL) { int i; PyObject* result; diff -u -r Python-2.5/Modules/itertoolsmodule.c lang/python/src/Modules/itertoolsmodule.c --- Python-2.5/Modules/itertoolsmodule.c 2006-09-05 03:30:10.000000000 +0100 +++ lang/python/src/Modules/itertoolsmodule.c 2007-02-16 00:13:36.000000000 +0000 @@ -487,7 +487,7 @@ } static PyObject * -tee_copy(teeobject *to) +tee_copy(teeobject *to, PyObject *NOARGS_NULL) { teeobject *newto; @@ -514,7 +514,7 @@ if (it == NULL) return NULL; if (PyObject_TypeCheck(it, &tee_type)) { - to = (teeobject *)tee_copy((teeobject *)it); + to = (teeobject *)tee_copy((teeobject *)it, NULL); goto done; } @@ -2400,7 +2400,7 @@ } static PyObject * -repeat_len(repeatobject *ro) +repeat_len(repeatobject *ro, PyObject *NOARGS_NULL) { if (ro->cnt == -1) { PyErr_SetString(PyExc_TypeError, "len() of unsized object"); diff -u -r Python-2.5/Modules/pwdmodule.c lang/python/src/Modules/pwdmodule.c --- Python-2.5/Modules/pwdmodule.c 2006-04-16 19:55:50.000000000 +0100 +++ lang/python/src/Modules/pwdmodule.c 2007-02-16 15:19:48.714520360 +0000 @@ -144,7 +144,7 @@ See pwd.__doc__ for more on password database entries."); static PyObject * -pwd_getpwall(PyObject *self) +pwd_getpwall(PyObject *self, PyObject *NOARGS_NULL) { PyObject *d; struct passwd *p; diff -u -r Python-2.5/Modules/selectmodule.c lang/python/src/Modules/selectmodule.c --- Python-2.5/Modules/selectmodule.c 2006-07-10 02:18:57.000000000 +0100 +++ lang/python/src/Modules/selectmodule.c 2007-02-15 22:56:04.000000000 +0000 @@ -610,7 +610,7 @@ unregistering file descriptors, and then polling them for I/O events."); static PyObject * -select_poll(PyObject *self, PyObject *unused) +select_poll(PyObject *self, PyObject *NOARGS_NULL) { return (PyObject *)newPollObject(); } diff -u -r Python-2.5/Modules/signalmodule.c lang/python/src/Modules/signalmodule.c --- Python-2.5/Modules/signalmodule.c 2006-01-19 06:09:39.000000000 +0000 +++ lang/python/src/Modules/signalmodule.c 2007-02-15 23:41:18.000000000 +0000 @@ -160,7 +160,7 @@ #ifdef HAVE_PAUSE static PyObject * -signal_pause(PyObject *self) +signal_pause(PyObject *self, PyObject *NOARGS_NULL) { Py_BEGIN_ALLOW_THREADS (void)pause(); diff -u -r Python-2.5/Modules/timemodule.c lang/python/src/Modules/timemodule.c --- Python-2.5/Modules/timemodule.c 2006-07-21 23:44:07.000000000 +0100 +++ lang/python/src/Modules/timemodule.c 2007-02-15 23:37:03.000000000 +0000 @@ -125,7 +125,7 @@ } static PyObject * -time_time(PyObject *self, PyObject *unused) +time_time(PyObject *self, PyObject *NOARGS_NULL) { double secs; secs = floattime(); @@ -153,7 +153,7 @@ #endif static PyObject * -time_clock(PyObject *self, PyObject *unused) +time_clock(PyObject *self, PyObject *NOARGS_NULL) { return PyFloat_FromDouble(((double)clock()) / CLOCKS_PER_SEC); } @@ -621,7 +621,7 @@ void inittimezone(PyObject *module); static PyObject * -time_tzset(PyObject *self, PyObject *unused) +time_tzset(PyObject *self, PyObject *NOARGS_NULL) { PyObject* m; diff -u -r Python-2.5/Objects/classobject.c lang/python/src/Objects/classobject.c --- Python-2.5/Objects/classobject.c 2006-08-19 05:19:14.000000000 +0100 +++ lang/python/src/Objects/classobject.c 2007-02-16 11:09:26.263280080 +0000 @@ -2200,7 +2200,7 @@ should only be used for the class, not for instances */ static PyObject * -instancemethod_get_doc(PyMethodObject *im, void *context) +instancemethod_get_doc(PyMethodObject *im, void *closure) { static PyObject *docstr; if (docstr == NULL) { diff -u -r Python-2.5/Objects/complexobject.c lang/python/src/Objects/complexobject.c --- Python-2.5/Objects/complexobject.c 2006-07-16 03:22:30.000000000 +0100 +++ lang/python/src/Objects/complexobject.c 2007-02-15 22:22:52.000000000 +0000 @@ -638,7 +638,7 @@ } static PyObject * -complex_conjugate(PyObject *self) +complex_conjugate(PyObject *self, PyObject *NOARGS_NULL) { Py_complex c; c = ((PyComplexObject *)self)->cval; @@ -647,7 +647,7 @@ } static PyObject * -complex_getnewargs(PyComplexObject *v) +complex_getnewargs(PyComplexObject *v, PyObject *NOARGS_NULL) { return Py_BuildValue("(D)", &v->cval); } diff -u -r Python-2.5/Objects/descrobject.c lang/python/src/Objects/descrobject.c --- Python-2.5/Objects/descrobject.c 2006-08-04 19:03:37.000000000 +0100 +++ lang/python/src/Objects/descrobject.c 2007-02-16 11:10:26.709090920 +0000 @@ -720,42 +720,42 @@ } static PyObject * -proxy_keys(proxyobject *pp) +proxy_keys(proxyobject *pp, PyObject *NOARGS_NULL) { return PyMapping_Keys(pp->dict); } static PyObject * -proxy_values(proxyobject *pp) +proxy_values(proxyobject *pp, PyObject *NOARGS_NULL) { return PyMapping_Values(pp->dict); } static PyObject * -proxy_items(proxyobject *pp) +proxy_items(proxyobject *pp, PyObject *NOARGS_NULL) { return PyMapping_Items(pp->dict); } static PyObject * -proxy_iterkeys(proxyobject *pp) +proxy_iterkeys(proxyobject *pp, PyObject *NOARGS_NULL) { return PyObject_CallMethod(pp->dict, "iterkeys", NULL); } static PyObject * -proxy_itervalues(proxyobject *pp) +proxy_itervalues(proxyobject *pp, PyObject *NOARGS_NULL) { return PyObject_CallMethod(pp->dict, "itervalues", NULL); } static PyObject * -proxy_iteritems(proxyobject *pp) +proxy_iteritems(proxyobject *pp, PyObject *NOARGS_NULL) { return PyObject_CallMethod(pp->dict, "iteritems", NULL); } static PyObject * -proxy_copy(proxyobject *pp) +proxy_copy(proxyobject *pp, PyObject *NOARGS_NULL) { return PyObject_CallMethod(pp->dict, "copy", NULL); } @@ -940,7 +940,7 @@ }; static PyObject * -wrapper_objclass(wrapperobject *wp) +wrapper_objclass(wrapperobject *wp, void *closure) { PyObject *c = (PyObject *)wp->descr->d_type; @@ -949,7 +949,7 @@ } static PyObject * -wrapper_name(wrapperobject *wp) +wrapper_name(wrapperobject *wp, void *closure) { char *s = wp->descr->d_base->name; @@ -957,7 +957,7 @@ } static PyObject * -wrapper_doc(wrapperobject *wp) +wrapper_doc(wrapperobject *wp, void *closure) { char *s = wp->descr->d_base->doc; diff -u -r Python-2.5/Objects/dictobject.c lang/python/src/Objects/dictobject.c --- Python-2.5/Objects/dictobject.c 2006-09-05 02:54:06.000000000 +0100 +++ lang/python/src/Objects/dictobject.c 2007-02-16 00:18:10.000000000 +0000 @@ -994,7 +994,7 @@ }; static PyObject * -dict_keys(register dictobject *mp) +dict_keys(register dictobject *mp, PyObject *NOARGS_NULL) { register PyObject *v; register Py_ssize_t i, j; @@ -1028,7 +1028,7 @@ } static PyObject * -dict_values(register dictobject *mp) +dict_values(register dictobject *mp, PyObject *NOARGS_NULL) { register PyObject *v; register Py_ssize_t i, j; @@ -1062,7 +1062,7 @@ } static PyObject * -dict_items(register dictobject *mp) +dict_items(register dictobject *mp, PyObject *NOARGS_NULL) { register PyObject *v; register Py_ssize_t i, j, n; @@ -1369,7 +1369,7 @@ } static PyObject * -dict_copy(register dictobject *mp) +dict_copy(register dictobject *mp, PyObject *NOARGS_NULL) { return PyDict_Copy((PyObject*)mp); } @@ -1409,7 +1409,7 @@ PyErr_BadInternalCall(); return NULL; } - return dict_keys((dictobject *)mp); + return dict_keys((dictobject *)mp, NULL); } PyObject * @@ -1419,7 +1419,7 @@ PyErr_BadInternalCall(); return NULL; } - return dict_values((dictobject *)mp); + return dict_values((dictobject *)mp, NULL); } PyObject * @@ -1429,7 +1429,7 @@ PyErr_BadInternalCall(); return NULL; } - return dict_items((dictobject *)mp); + return dict_items((dictobject *)mp, NULL); } /* Subroutine which returns the smallest key in a for which b's value @@ -1703,7 +1703,7 @@ static PyObject * -dict_clear(register dictobject *mp) +dict_clear(register dictobject *mp, PyObject *NOARGS_NULL) { PyDict_Clear((PyObject *)mp); Py_RETURN_NONE; @@ -1756,7 +1756,7 @@ } static PyObject * -dict_popitem(dictobject *mp) +dict_popitem(dictobject *mp, PyObject *NOARGS_NULL) { long i = 0; dictentry *ep; @@ -1841,19 +1841,19 @@ static PyObject *dictiter_new(dictobject *, PyTypeObject *); static PyObject * -dict_iterkeys(dictobject *dict) +dict_iterkeys(dictobject *dict, PyObject *NOARGS_NULL) { return dictiter_new(dict, &PyDictIterKey_Type); } static PyObject * -dict_itervalues(dictobject *dict) +dict_itervalues(dictobject *dict, PyObject *NOARGS_NULL) { return dictiter_new(dict, &PyDictIterValue_Type); } static PyObject * -dict_iteritems(dictobject *dict) +dict_iteritems(dictobject *dict, PyObject *NOARGS_NULL) { return dictiter_new(dict, &PyDictIterItem_Type); } @@ -2162,7 +2162,7 @@ } static PyObject * -dictiter_len(dictiterobject *di) +dictiter_len(dictiterobject *di, PyObject *NOARGS_NULL) { Py_ssize_t len = 0; if (di->di_dict != NULL && di->di_used == di->di_dict->ma_used) diff -u -r Python-2.5/Objects/enumobject.c lang/python/src/Objects/enumobject.c --- Python-2.5/Objects/enumobject.c 2006-04-15 22:47:09.000000000 +0100 +++ lang/python/src/Objects/enumobject.c 2007-02-15 22:25:11.000000000 +0000 @@ -226,7 +226,7 @@ "Return a reverse iterator"); static PyObject * -reversed_len(reversedobject *ro) +reversed_len(reversedobject *ro, PyObject *NOARGS_NULL) { Py_ssize_t position, seqsize; diff -u -r Python-2.5/Objects/exceptions.c lang/python/src/Objects/exceptions.c --- Python-2.5/Objects/exceptions.c 2006-09-09 08:18:44.000000000 +0100 +++ lang/python/src/Objects/exceptions.c 2007-02-16 11:39:40.616456472 +0000 @@ -143,7 +143,7 @@ /* Pickling support */ static PyObject * -BaseException_reduce(PyBaseExceptionObject *self) +BaseException_reduce(PyBaseExceptionObject *self, PyObject *NOARGS_NULL) { if (self->args && self->dict) return PyTuple_Pack(3, self->ob_type, self->args, self->dict); @@ -211,7 +211,7 @@ static PyObject * -BaseException_get_dict(PyBaseExceptionObject *self) +BaseException_get_dict(PyBaseExceptionObject *self, void *closure) { if (self->dict == NULL) { self->dict = PyDict_New(); @@ -223,7 +223,7 @@ } static int -BaseException_set_dict(PyBaseExceptionObject *self, PyObject *val) +BaseException_set_dict(PyBaseExceptionObject *self, PyObject *val, void *closure) { if (val == NULL) { PyErr_SetString(PyExc_TypeError, "__dict__ may not be deleted"); @@ -240,7 +240,7 @@ } static PyObject * -BaseException_get_args(PyBaseExceptionObject *self) +BaseException_get_args(PyBaseExceptionObject *self, void *closure) { if (self->args == NULL) { Py_INCREF(Py_None); @@ -251,7 +251,7 @@ } static int -BaseException_set_args(PyBaseExceptionObject *self, PyObject *val) +BaseException_set_args(PyBaseExceptionObject *self, PyObject *val, void *closure) { PyObject *seq; if (val == NULL) { @@ -668,7 +668,7 @@ static PyObject * -EnvironmentError_reduce(PyEnvironmentErrorObject *self) +EnvironmentError_reduce(PyEnvironmentErrorObject *self, PyObject *NOARGS_NULL) { PyObject *args = self->args; PyObject *res = NULL, *tmp; diff -u -r Python-2.5/Objects/fileobject.c lang/python/src/Objects/fileobject.c --- Python-2.5/Objects/fileobject.c 2006-09-05 05:32:06.000000000 +0100 +++ lang/python/src/Objects/fileobject.c 2007-02-16 12:20:08.275396216 +0000 @@ -434,7 +434,7 @@ } static PyObject * -file_close(PyFileObject *f) +file_close(PyFileObject *f, PyObject *NOARGS_NULL) { int sts = 0; if (f->f_fp != NULL) { @@ -685,7 +685,7 @@ #endif /* HAVE_FTRUNCATE */ static PyObject * -file_tell(PyFileObject *f) +file_tell(PyFileObject *f, PyObject *NOARGS_NULL) { Py_off_t pos; @@ -716,7 +716,7 @@ } static PyObject * -file_fileno(PyFileObject *f) +file_fileno(PyFileObject *f, PyObject *NOARGS_NULL) { if (f->f_fp == NULL) return err_closed(); @@ -724,7 +724,7 @@ } static PyObject * -file_flush(PyFileObject *f) +file_flush(PyFileObject *f, PyObject *NOARGS_NULL) { int res; @@ -744,7 +744,7 @@ } static PyObject * -file_isatty(PyFileObject *f) +file_isatty(PyFileObject *f, PyObject *NOARGS_NULL) { long res; if (f->f_fp == NULL) @@ -1641,9 +1641,15 @@ } static PyObject * +file_self_noargs(PyFileObject *f, PyObject *NOARGS_NULL) +{ + return file_self(f); +} + +static PyObject * file_exit(PyFileObject *f, PyObject *args) { - PyObject *ret = file_close(f); + PyObject *ret = file_close(f, NULL); if (!ret) /* If error occurred, pass through */ return NULL; @@ -1756,12 +1762,12 @@ {"tell", (PyCFunction)file_tell, METH_NOARGS, tell_doc}, {"readinto", (PyCFunction)file_readinto, METH_VARARGS, readinto_doc}, {"readlines", (PyCFunction)file_readlines,METH_VARARGS, readlines_doc}, - {"xreadlines",(PyCFunction)file_self, METH_NOARGS, xreadlines_doc}, + {"xreadlines",(PyCFunction)file_self_noargs, METH_NOARGS, xreadlines_doc}, {"writelines",(PyCFunction)file_writelines, METH_O, writelines_doc}, {"flush", (PyCFunction)file_flush, METH_NOARGS, flush_doc}, {"close", (PyCFunction)file_close, METH_NOARGS, close_doc}, {"isatty", (PyCFunction)file_isatty, METH_NOARGS, isatty_doc}, - {"__enter__", (PyCFunction)file_self, METH_NOARGS, enter_doc}, + {"__enter__", (PyCFunction)file_self_noargs, METH_NOARGS, enter_doc}, {"__exit__", (PyCFunction)file_exit, METH_VARARGS, exit_doc}, {NULL, NULL} /* sentinel */ }; @@ -1980,7 +1986,7 @@ assert(PyFile_Check(self)); if (foself->f_fp != NULL) { /* Have to close the existing file first. */ - PyObject *closeresult = file_close(foself); + PyObject *closeresult = file_close(foself, NULL); if (closeresult == NULL) return -1; Py_DECREF(closeresult); diff -u -r Python-2.5/Objects/floatobject.c lang/python/src/Objects/floatobject.c --- Python-2.5/Objects/floatobject.c 2006-05-25 16:53:30.000000000 +0100 +++ lang/python/src/Objects/floatobject.c 2007-02-15 22:31:22.000000000 +0000 @@ -974,7 +974,7 @@ } static PyObject * -float_getnewargs(PyFloatObject *v) +float_getnewargs(PyFloatObject *v, PyObject *NOARGS_NULL) { return Py_BuildValue("(d)", v->ob_fval); } diff -u -r Python-2.5/Objects/frameobject.c lang/python/src/Objects/frameobject.c --- Python-2.5/Objects/frameobject.c 2006-07-21 06:31:02.000000000 +0100 +++ lang/python/src/Objects/frameobject.c 2007-02-16 13:34:12.107831000 +0000 @@ -475,7 +475,7 @@ return 0; } -static void +static int frame_clear(PyFrameObject *f) { PyObject **fastlocals, **p, **oldtop; @@ -505,6 +505,7 @@ for (p = f->f_valuestack; p < oldtop; p++) Py_CLEAR(*p); } + return 0; } diff -u -r Python-2.5/Objects/funcobject.c lang/python/src/Objects/funcobject.c --- Python-2.5/Objects/funcobject.c 2006-08-12 03:12:30.000000000 +0100 +++ lang/python/src/Objects/funcobject.c 2007-02-16 14:16:13.796476056 +0000 @@ -180,7 +180,7 @@ } static PyObject * -func_get_dict(PyFunctionObject *op) +func_get_dict(PyFunctionObject *op, void *closure) { if (restricted()) return NULL; @@ -194,7 +194,7 @@ } static int -func_set_dict(PyFunctionObject *op, PyObject *value) +func_set_dict(PyFunctionObject *op, PyObject *value, void *closure) { PyObject *tmp; @@ -220,7 +220,7 @@ } static PyObject * -func_get_code(PyFunctionObject *op) +func_get_code(PyFunctionObject *op, void *closure) { if (restricted()) return NULL; @@ -229,7 +229,7 @@ } static int -func_set_code(PyFunctionObject *op, PyObject *value) +func_set_code(PyFunctionObject *op, PyObject *value, void *closure) { PyObject *tmp; Py_ssize_t nfree, nclosure; @@ -262,14 +262,14 @@ } static PyObject * -func_get_name(PyFunctionObject *op) +func_get_name(PyFunctionObject *op, void *closure) { Py_INCREF(op->func_name); return op->func_name; } static int -func_set_name(PyFunctionObject *op, PyObject *value) +func_set_name(PyFunctionObject *op, PyObject *value, void *closure) { PyObject *tmp; @@ -290,7 +290,7 @@ } static PyObject * -func_get_defaults(PyFunctionObject *op) +func_get_defaults(PyFunctionObject *op, void *closure) { if (restricted()) return NULL; @@ -303,7 +303,7 @@ } static int -func_set_defaults(PyFunctionObject *op, PyObject *value) +func_set_defaults(PyFunctionObject *op, PyObject *value, void *closure) { PyObject *tmp; diff -u -r Python-2.5/Objects/genobject.c lang/python/src/Objects/genobject.c --- Python-2.5/Objects/genobject.c 2006-05-29 22:04:52.000000000 +0100 +++ lang/python/src/Objects/genobject.c 2007-02-15 22:31:28.000000000 +0000 @@ -121,7 +121,7 @@ "close(arg) -> raise GeneratorExit inside generator."); static PyObject * -gen_close(PyGenObject *gen, PyObject *args) +gen_close(PyGenObject *gen, PyObject *NOARGS_NULL) { PyObject *retval; PyErr_SetNone(PyExc_GeneratorExit); diff -u -r Python-2.5/Objects/intobject.c lang/python/src/Objects/intobject.c --- Python-2.5/Objects/intobject.c 2006-09-05 02:47:53.000000000 +0100 +++ lang/python/src/Objects/intobject.c 2007-02-15 22:31:37.000000000 +0000 @@ -1031,7 +1031,7 @@ } static PyObject * -int_getnewargs(PyIntObject *v) +int_getnewargs(PyIntObject *v, PyObject *NOARGS_NULL) { return Py_BuildValue("(l)", v->ob_ival); } diff -u -r Python-2.5/Objects/iterobject.c lang/python/src/Objects/iterobject.c --- Python-2.5/Objects/iterobject.c 2006-04-15 22:47:09.000000000 +0100 +++ lang/python/src/Objects/iterobject.c 2007-02-15 22:31:42.000000000 +0000 @@ -71,7 +71,7 @@ } static PyObject * -iter_len(seqiterobject *it) +iter_len(seqiterobject *it, PyObject *NOARGS_NULL) { Py_ssize_t seqsize, len; diff -u -r Python-2.5/Objects/listobject.c lang/python/src/Objects/listobject.c --- Python-2.5/Objects/listobject.c 2006-08-12 18:03:09.000000000 +0100 +++ lang/python/src/Objects/listobject.c 2007-02-16 00:17:10.000000000 +0000 @@ -2159,7 +2159,7 @@ } static PyObject * -listreverse(PyListObject *self) +listreverse(PyListObject *self, PyObject *NOARGS_NULL) { if (self->ob_size > 1) reverse_slice(self->ob_item, self->ob_item + self->ob_size); @@ -2702,7 +2702,7 @@ static void listiter_dealloc(listiterobject *); static int listiter_traverse(listiterobject *, visitproc, void *); static PyObject *listiter_next(listiterobject *); -static PyObject *listiter_len(listiterobject *); +static PyObject *listiter_len(listiterobject *, PyObject *); PyDoc_STRVAR(length_hint_doc, "Private method returning an estimate of len(list(it))."); @@ -2805,7 +2805,7 @@ } static PyObject * -listiter_len(listiterobject *it) +listiter_len(listiterobject *it, PyObject *NOARGS_NULL) { Py_ssize_t len; if (it->it_seq) { @@ -2868,7 +2868,7 @@ }; static PyObject * -list_reversed(PyListObject *seq, PyObject *unused) +list_reversed(PyListObject *seq, PyObject *NOARGS_NULL) { listreviterobject *it; diff -u -r Python-2.5/Objects/longobject.c lang/python/src/Objects/longobject.c --- Python-2.5/Objects/longobject.c 2006-08-12 18:03:09.000000000 +0100 +++ lang/python/src/Objects/longobject.c 2007-02-15 22:32:12.000000000 +0000 @@ -3312,7 +3312,7 @@ } static PyObject * -long_getnewargs(PyLongObject *v) +long_getnewargs(PyLongObject *v, PyObject *NOARGS_NULL) { return Py_BuildValue("(N)", _PyLong_Copy(v)); } diff -u -r Python-2.5/Objects/rangeobject.c lang/python/src/Objects/rangeobject.c --- Python-2.5/Objects/rangeobject.c 2006-04-11 10:04:12.000000000 +0100 +++ lang/python/src/Objects/rangeobject.c 2007-02-16 00:18:41.000000000 +0000 @@ -138,7 +138,7 @@ }; static PyObject * range_iter(PyObject *seq); -static PyObject * range_reverse(PyObject *seq); +static PyObject * range_reverse(PyObject *seq, PyObject *NOARGS_NULL); PyDoc_STRVAR(reverse_doc, "Returns a reverse iterator."); @@ -209,7 +209,7 @@ } static PyObject * -rangeiter_len(rangeiterobject *r) +rangeiter_len(rangeiterobject *r, PyObject *NOARGS_NULL) { return PyInt_FromLong(r->len - r->index); } @@ -275,7 +275,7 @@ } static PyObject * -range_reverse(PyObject *seq) +range_reverse(PyObject *seq, PyObject *NOARGS_NULL) { rangeiterobject *it; long start, step, len; diff -u -r Python-2.5/Objects/setobject.c lang/python/src/Objects/setobject.c --- Python-2.5/Objects/setobject.c 2006-09-08 07:02:26.000000000 +0100 +++ lang/python/src/Objects/setobject.c 2007-02-16 00:22:36.000000000 +0000 @@ -637,7 +637,7 @@ } static PyObject * -set_pop(PySetObject *so) +set_pop(PySetObject *so, PyObject *NOARGS_NULL) { register Py_ssize_t i = 0; register setentry *entry; @@ -745,7 +745,7 @@ } static PyObject * -setiter_len(setiterobject *si) +setiter_len(setiterobject *si, PyObject *NOARGS_NULL) { Py_ssize_t len = 0; if (si->si_set != NULL && si->si_used == si->si_set->used) @@ -1045,25 +1045,25 @@ } static PyObject * -set_copy(PySetObject *so) +set_copy(PySetObject *so, PyObject *NOARGS_NULL) { return make_new_set(so->ob_type, (PyObject *)so); } static PyObject * -frozenset_copy(PySetObject *so) +frozenset_copy(PySetObject *so, PyObject *NOARGS_NULL) { if (PyFrozenSet_CheckExact(so)) { Py_INCREF(so); return (PyObject *)so; } - return set_copy(so); + return set_copy(so, NULL); } PyDoc_STRVAR(copy_doc, "Return a shallow copy of a set."); static PyObject * -set_clear(PySetObject *so) +set_clear(PySetObject *so, PyObject *NOARGS_NULL) { set_clear_internal(so); Py_RETURN_NONE; @@ -1076,7 +1076,7 @@ { PySetObject *result; - result = (PySetObject *)set_copy(so); + result = (PySetObject *)set_copy(so, NULL); if (result == NULL) return NULL; if ((PyObject *)so == other) @@ -1123,7 +1123,7 @@ PyObject *key, *it, *tmp; if ((PyObject *)so == other) - return set_copy(so); + return set_copy(so, NULL); result = (PySetObject *)make_new_set(so->ob_type, NULL); if (result == NULL) @@ -1291,7 +1291,7 @@ Py_ssize_t pos = 0; if (!PyAnySet_Check(other) && !PyDict_Check(other)) { - result = set_copy(so); + result = set_copy(so, NULL); if (result == NULL) return NULL; if (set_difference_update_internal((PySetObject *)result, other) != -1) @@ -1375,7 +1375,7 @@ setentry *entry; if ((PyObject *)so == other) - return set_clear(so); + return set_clear(so, NULL); if (PyDict_Check(other)) { PyObject *value; @@ -1678,7 +1678,7 @@ If the element is not a member, do nothing."); static PyObject * -set_reduce(PySetObject *so) +set_reduce(PySetObject *so, PyObject *NOARGS_NULL) { PyObject *keys=NULL, *args=NULL, *result=NULL, *dict=NULL; @@ -2063,7 +2063,7 @@ PyErr_BadInternalCall(); return NULL; } - return set_pop((PySetObject *)set); + return set_pop((PySetObject *)set, NULL); } int @@ -2089,7 +2089,7 @@ } while(0) static PyObject * -test_c_api(PySetObject *so) +test_c_api(PySetObject *so, PyObject *NOARGS_NULL) { Py_ssize_t count; char *s; diff -u -r Python-2.5/Objects/stringobject.c lang/python/src/Objects/stringobject.c --- Python-2.5/Objects/stringobject.c 2006-09-05 03:21:38.000000000 +0100 +++ lang/python/src/Objects/stringobject.c 2007-02-15 22:35:31.000000000 +0000 @@ -2115,7 +2115,7 @@ #endif static PyObject * -string_lower(PyStringObject *self) +string_lower(PyStringObject *self, PyObject *NOARGS_NULL) { char *s; Py_ssize_t i, n = PyString_GET_SIZE(self); @@ -2148,7 +2148,7 @@ #endif static PyObject * -string_upper(PyStringObject *self) +string_upper(PyStringObject *self, PyObject *NOARGS_NULL) { char *s; Py_ssize_t i, n = PyString_GET_SIZE(self); @@ -2178,7 +2178,7 @@ characters, all remaining cased characters have lowercase."); static PyObject* -string_title(PyStringObject *self) +string_title(PyStringObject *self, PyObject *NOARGS_NULL) { char *s = PyString_AS_STRING(self), *s_new; Py_ssize_t i, n = PyString_GET_SIZE(self); @@ -2213,7 +2213,7 @@ capitalized."); static PyObject * -string_capitalize(PyStringObject *self) +string_capitalize(PyStringObject *self, PyObject *NOARGS_NULL) { char *s = PyString_AS_STRING(self), *s_new; Py_ssize_t i, n = PyString_GET_SIZE(self); @@ -2293,7 +2293,7 @@ converted to lowercase and vice versa."); static PyObject * -string_swapcase(PyStringObject *self) +string_swapcase(PyStringObject *self, PyObject *NOARGS_NULL) { char *s = PyString_AS_STRING(self), *s_new; Py_ssize_t i, n = PyString_GET_SIZE(self); @@ -3495,7 +3495,7 @@ and there is at least one character in S, False otherwise."); static PyObject* -string_isspace(PyStringObject *self) +string_isspace(PyStringObject *self, PyObject *NOARGS_NULL) { register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); @@ -3526,7 +3526,7 @@ and there is at least one character in S, False otherwise."); static PyObject* -string_isalpha(PyStringObject *self) +string_isalpha(PyStringObject *self, PyObject *NOARGS_NULL) { register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); @@ -3557,7 +3557,7 @@ and there is at least one character in S, False otherwise."); static PyObject* -string_isalnum(PyStringObject *self) +string_isalnum(PyStringObject *self, PyObject *NOARGS_NULL) { register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); @@ -3588,7 +3588,7 @@ and there is at least one character in S, False otherwise."); static PyObject* -string_isdigit(PyStringObject *self) +string_isdigit(PyStringObject *self, PyObject *NOARGS_NULL) { register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); @@ -3619,7 +3619,7 @@ at least one cased character in S, False otherwise."); static PyObject* -string_islower(PyStringObject *self) +string_islower(PyStringObject *self, PyObject *NOARGS_NULL) { register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); @@ -3653,7 +3653,7 @@ at least one cased character in S, False otherwise."); static PyObject* -string_isupper(PyStringObject *self) +string_isupper(PyStringObject *self, PyObject *NOARGS_NULL) { register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); @@ -3689,7 +3689,7 @@ otherwise."); static PyObject* -string_istitle(PyStringObject *self, PyObject *uncased) +string_istitle(PyStringObject *self, PyObject *NOARGS_NULL) { register const unsigned char *p = (unsigned char *) PyString_AS_STRING(self); @@ -3803,7 +3803,7 @@ #undef PREALLOC_SIZE static PyObject * -string_getnewargs(PyStringObject *v) +string_getnewargs(PyStringObject *v, PyObject *NOARGS_NULL) { return Py_BuildValue("(s#)", v->ob_sval, v->ob_size); } diff -u -r Python-2.5/Objects/structseq.c lang/python/src/Objects/structseq.c --- Python-2.5/Objects/structseq.c 2006-08-12 02:43:40.000000000 +0100 +++ lang/python/src/Objects/structseq.c 2007-02-15 22:35:38.000000000 +0000 @@ -246,7 +246,7 @@ } static PyObject * -structseq_reduce(PyStructSequence* self) +structseq_reduce(PyStructSequence* self, PyObject *NOARGS_NULL) { PyObject* tup; PyObject* dict; diff -u -r Python-2.5/Objects/tupleobject.c lang/python/src/Objects/tupleobject.c --- Python-2.5/Objects/tupleobject.c 2006-08-12 18:03:09.000000000 +0100 +++ lang/python/src/Objects/tupleobject.c 2007-02-15 22:36:10.000000000 +0000 @@ -627,7 +627,7 @@ } static PyObject * -tuple_getnewargs(PyTupleObject *v) +tuple_getnewargs(PyTupleObject *v, PyObject *NOARGS_NULL) { return Py_BuildValue("(N)", tupleslice(v, 0, v->ob_size)); @@ -821,7 +821,7 @@ } static PyObject * -tupleiter_len(tupleiterobject *it) +tupleiter_len(tupleiterobject *it, PyObject *NOARGS_NULL) { Py_ssize_t len = 0; if (it->it_seq) diff -u -r Python-2.5/Objects/typeobject.c lang/python/src/Objects/typeobject.c --- Python-2.5/Objects/typeobject.c 2006-08-12 19:44:06.000000000 +0100 +++ lang/python/src/Objects/typeobject.c 2007-02-16 15:19:53.099853688 +0000 @@ -19,7 +19,7 @@ }; static PyObject * -type_name(PyTypeObject *type, void *context) +type_name(PyTypeObject *type, void *closure) { const char *s; @@ -40,7 +40,7 @@ } static int -type_set_name(PyTypeObject *type, PyObject *value, void *context) +type_set_name(PyTypeObject *type, PyObject *value, void *closure) { PyHeapTypeObject* et; @@ -80,7 +80,7 @@ } static PyObject * -type_module(PyTypeObject *type, void *context) +type_module(PyTypeObject *type, void *closure) { PyObject *mod; char *s; @@ -104,7 +104,7 @@ } static int -type_set_module(PyTypeObject *type, PyObject *value, void *context) +type_set_module(PyTypeObject *type, PyObject *value, void *closure) { if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) { PyErr_Format(PyExc_TypeError, @@ -121,7 +121,7 @@ } static PyObject * -type_get_bases(PyTypeObject *type, void *context) +type_get_bases(PyTypeObject *type, void *closure) { Py_INCREF(type->tp_bases); return type->tp_bases; @@ -182,7 +182,7 @@ } static int -type_set_bases(PyTypeObject *type, PyObject *value, void *context) +type_set_bases(PyTypeObject *type, PyObject *value, void *closure) { Py_ssize_t i; int r = 0; @@ -322,7 +322,7 @@ } static PyObject * -type_dict(PyTypeObject *type, void *context) +type_dict(PyTypeObject *type, void *closure) { if (type->tp_dict == NULL) { Py_INCREF(Py_None); @@ -332,7 +332,7 @@ } static PyObject * -type_get_doc(PyTypeObject *type, void *context) +type_get_doc(PyTypeObject *type, void *closure) { PyObject *result; if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE) && type->tp_doc != NULL) @@ -1276,7 +1276,7 @@ } static PyObject * -mro_external(PyObject *self) +mro_external(PyObject *self, PyObject *NOARGS_NULL) { PyTypeObject *type = (PyTypeObject *)self; @@ -1441,7 +1441,7 @@ static void fixup_slot_dispatchers(PyTypeObject *); static PyObject * -subtype_dict(PyObject *obj, void *context) +subtype_dict(PyObject *obj, void *closure) { PyObject **dictptr = _PyObject_GetDictPtr(obj); PyObject *dict; @@ -1459,7 +1459,7 @@ } static int -subtype_setdict(PyObject *obj, PyObject *value, void *context) +subtype_setdict(PyObject *obj, PyObject *value, void *closure) { PyObject **dictptr = _PyObject_GetDictPtr(obj); PyObject *dict; @@ -1483,7 +1483,7 @@ } static PyObject * -subtype_getweakref(PyObject *obj, void *context) +subtype_getweakref(PyObject *obj, void *closure) { PyObject **weaklistptr; PyObject *result; @@ -2152,7 +2152,7 @@ } static PyObject * -type_subclasses(PyTypeObject *type, PyObject *args_ignored) +type_subclasses(PyTypeObject *type, PyObject *NOARGS_NULL) { PyObject *list, *raw, *ref; Py_ssize_t i, n; diff -u -r Python-2.5/Objects/unicodeobject.c lang/python/src/Objects/unicodeobject.c --- Python-2.5/Objects/unicodeobject.c 2006-09-05 03:21:38.000000000 +0100 +++ lang/python/src/Objects/unicodeobject.c 2007-02-15 22:38:29.000000000 +0000 @@ -3216,7 +3216,7 @@ }; static PyObject* -encoding_map_size(PyObject *obj, PyObject* args) +encoding_map_size(PyObject *obj, PyObject *NOARGS_NULL) { struct encoding_map *map = (struct encoding_map*)obj; return PyInt_FromLong(sizeof(*map) - 1 + 16*map->count2 + @@ -5196,7 +5196,7 @@ characters, all remaining cased characters have lower case."); static PyObject* -unicode_title(PyUnicodeObject *self) +unicode_title(PyUnicodeObject *self, PyObject *NOARGS_NULL) { return fixup(self, fixtitle); } @@ -5208,7 +5208,7 @@ have upper case."); static PyObject* -unicode_capitalize(PyUnicodeObject *self) +unicode_capitalize(PyUnicodeObject *self, PyObject *NOARGS_NULL) { return fixup(self, fixcapitalize); } @@ -5850,7 +5850,7 @@ at least one cased character in S, False otherwise."); static PyObject* -unicode_islower(PyUnicodeObject *self) +unicode_islower(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -5884,7 +5884,7 @@ at least one cased character in S, False otherwise."); static PyObject* -unicode_isupper(PyUnicodeObject *self) +unicode_isupper(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -5920,7 +5920,7 @@ Return False otherwise."); static PyObject* -unicode_istitle(PyUnicodeObject *self) +unicode_istitle(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -5966,7 +5966,7 @@ and there is at least one character in S, False otherwise."); static PyObject* -unicode_isspace(PyUnicodeObject *self) +unicode_isspace(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -5995,7 +5995,7 @@ and there is at least one character in S, False otherwise."); static PyObject* -unicode_isalpha(PyUnicodeObject *self) +unicode_isalpha(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -6024,7 +6024,7 @@ and there is at least one character in S, False otherwise."); static PyObject* -unicode_isalnum(PyUnicodeObject *self) +unicode_isalnum(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -6053,7 +6053,7 @@ False otherwise."); static PyObject* -unicode_isdecimal(PyUnicodeObject *self) +unicode_isdecimal(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -6082,7 +6082,7 @@ and there is at least one character in S, False otherwise."); static PyObject* -unicode_isdigit(PyUnicodeObject *self) +unicode_isdigit(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -6111,7 +6111,7 @@ False otherwise."); static PyObject* -unicode_isnumeric(PyUnicodeObject *self) +unicode_isnumeric(PyUnicodeObject *self, PyObject *NOARGS_NULL) { register const Py_UNICODE *p = PyUnicode_AS_UNICODE(self); register const Py_UNICODE *e; @@ -6180,7 +6180,7 @@ Return a copy of the string S converted to lowercase."); static PyObject* -unicode_lower(PyUnicodeObject *self) +unicode_lower(PyUnicodeObject *self, PyObject *NOARGS_NULL) { return fixup(self, fixlower); } @@ -6801,7 +6801,7 @@ and vice versa."); static PyObject* -unicode_swapcase(PyUnicodeObject *self) +unicode_swapcase(PyUnicodeObject *self, PyObject *NOARGS_NULL) { return fixup(self, fixswapcase); } @@ -6830,7 +6830,7 @@ Return a copy of S converted to uppercase."); static PyObject* -unicode_upper(PyUnicodeObject *self) +unicode_upper(PyUnicodeObject *self, PyObject *NOARGS_NULL) { return fixup(self, fixupper); } @@ -6981,7 +6981,7 @@ static PyObject * -unicode_getnewargs(PyUnicodeObject *v) +unicode_getnewargs(PyUnicodeObject *v, PyObject *NOARGS_NULL) { return Py_BuildValue("(u#)", v->str, v->length); } diff -u -r Python-2.5/Python/bltinmodule.c lang/python/src/Python/bltinmodule.c --- Python-2.5/Python/bltinmodule.c 2006-09-05 02:52:00.000000000 +0100 +++ lang/python/src/Python/bltinmodule.c 2007-02-15 22:47:52.000000000 +0000 @@ -754,7 +754,7 @@ static PyObject * -builtin_globals(PyObject *self) +builtin_globals(PyObject *self, PyObject *NOARGS_NULL) { PyObject *d; @@ -1185,7 +1185,7 @@ static PyObject * -builtin_locals(PyObject *self) +builtin_locals(PyObject *self, PyObject *NOARGS_NULL) { PyObject *d; diff -u -r Python-2.5/Python/import.c lang/python/src/Python/import.c --- Python-2.5/Python/import.c 2006-09-11 05:06:23.000000000 +0100 +++ lang/python/src/Python/import.c 2007-02-15 22:48:44.000000000 +0000 @@ -306,7 +306,7 @@ #endif static PyObject * -imp_lock_held(PyObject *self, PyObject *noargs) +imp_lock_held(PyObject *self, PyObject *NOARGS_NULL) { #ifdef WITH_THREAD return PyBool_FromLong(import_lock_thread != -1); @@ -316,7 +316,7 @@ } static PyObject * -imp_acquire_lock(PyObject *self, PyObject *noargs) +imp_acquire_lock(PyObject *self, PyObject *NOARGS_NULL) { #ifdef WITH_THREAD lock_import(); @@ -326,7 +326,7 @@ } static PyObject * -imp_release_lock(PyObject *self, PyObject *noargs) +imp_release_lock(PyObject *self, PyObject *NOARGS_NULL) { #ifdef WITH_THREAD if (unlock_import() < 0) { @@ -2553,7 +2553,7 @@ */ static PyObject * -imp_get_magic(PyObject *self, PyObject *noargs) +imp_get_magic(PyObject *self, PyObject *NOARGS_NULL) { char buf[4]; @@ -2566,7 +2566,7 @@ } static PyObject * -imp_get_suffixes(PyObject *self, PyObject *noargs) +imp_get_suffixes(PyObject *self, PyObject *NOARGS_NULL) { PyObject *list; struct filedescr *fdp; diff -u -r Python-2.5/Python/sysmodule.c lang/python/src/Python/sysmodule.c --- Python-2.5/Python/sysmodule.c 2006-07-21 06:32:28.000000000 +0100 +++ lang/python/src/Python/sysmodule.c 2007-02-16 15:15:00.954266568 +0000 @@ -146,7 +146,7 @@ ); static PyObject * -sys_exc_info(PyObject *self, PyObject *noargs) +sys_exc_info(PyObject *self, PyObject *NOARGS_NULL) { PyThreadState *tstate; tstate = PyThreadState_GET(); @@ -166,7 +166,7 @@ ); static PyObject * -sys_exc_clear(PyObject *self, PyObject *noargs) +sys_exc_clear(PyObject *self, PyObject *NOARGS_NULL) { PyThreadState *tstate = PyThreadState_GET(); PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -220,7 +220,7 @@ #ifdef Py_USING_UNICODE static PyObject * -sys_getdefaultencoding(PyObject *self) +sys_getdefaultencoding(PyObject *self, PyObject *NOARGS_NULL) { return PyString_FromString(PyUnicode_GetDefaultEncoding()); } @@ -251,7 +251,7 @@ ); static PyObject * -sys_getfilesystemencoding(PyObject *self) +sys_getfilesystemencoding(PyObject *self, PyObject *NOARGS_NULL) { if (Py_FileSystemDefaultEncoding) return PyString_FromString(Py_FileSystemDefaultEncoding); @@ -433,7 +433,7 @@ ); static PyObject * -sys_getcheckinterval(PyObject *self, PyObject *args) +sys_getcheckinterval(PyObject *self, PyObject *NOARGS_NULL) { return PyInt_FromLong(_Py_CheckInterval); } @@ -495,7 +495,7 @@ ); static PyObject * -sys_getrecursionlimit(PyObject *self) +sys_getrecursionlimit(PyObject *self, PyObject *NOARGS_NULL) { return PyInt_FromLong(Py_GetRecursionLimit()); } @@ -520,7 +520,7 @@ ); static PyObject * -sys_getwindowsversion(PyObject *self) +sys_getwindowsversion(PyObject *self, PyObject *NOARGS_NULL) { OSVERSIONINFO ver; ver.dwOSVersionInfoSize = sizeof(ver); @@ -562,7 +562,7 @@ ); static PyObject * -sys_getdlopenflags(PyObject *self, PyObject *args) +sys_getdlopenflags(PyObject *self, PyObject *NOARGS_NULL) { PyThreadState *tstate = PyThreadState_GET(); if (!tstate) @@ -602,7 +602,7 @@ #ifdef Py_REF_DEBUG static PyObject * -sys_gettotalrefcount(PyObject *self) +sys_gettotalrefcount(PyObject *self, PyObject *NOARGS_NULL) { return PyInt_FromSsize_t(_Py_GetRefTotal()); } @@ -618,7 +618,7 @@ #ifdef COUNT_ALLOCS static PyObject * -sys_getcounts(PyObject *self) +sys_getcounts(PyObject *self, PyObject *NOARGS_NULL) { extern PyObject *get_counts(void); @@ -670,7 +670,7 @@ ); static PyObject * -sys_current_frames(PyObject *self, PyObject *noargs) +sys_current_frames(PyObject *self, PyObject *NOARGS_NULL) { return _PyThread_CurrentFrames(); } @@ -733,9 +733,18 @@ } #endif +/* Wrapper function for PyEval_GetCallStats() which discards the extra NULL + * parameter passed when called via the METH_NOARGS machinery. + */ +static PyObject * +PyEval_GetCallStats_noargs(PyObject *self, PyObject *NOARGS_NULL) +{ + return PyEval_GetCallStats(self); +} + static PyMethodDef sys_methods[] = { /* Might as well keep this in alphabetic order */ - {"callstats", (PyCFunction)PyEval_GetCallStats, METH_NOARGS, + {"callstats", (PyCFunction)PyEval_GetCallStats_noargs, METH_NOARGS, callstats_doc}, {"_current_frames", sys_current_frames, METH_NOARGS, current_frames_doc}, diff -u -r Python-2.5/Python/traceback.c lang/python/src/Python/traceback.c --- Python-2.5/Python/traceback.c 2006-04-15 22:47:09.000000000 +0100 +++ lang/python/src/Python/traceback.c 2007-02-16 13:27:49.984922512 +0000 @@ -44,11 +44,12 @@ return 0; } -static void +static int tb_clear(PyTracebackObject *tb) { Py_CLEAR(tb->tb_next); Py_CLEAR(tb->tb_frame); + return 0; } PyTypeObject PyTraceBack_Type = {