diff options
author | Fred Drake <fdrake@acm.org> | 2000-07-12 04:42:23 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-07-12 04:42:23 (GMT) |
commit | cc1be2401e49dc278347002761e32582eb140bed (patch) | |
tree | 0f9683c4db080ef848c86b9fbb7dbae63d2874b5 | |
parent | bdcf91fda0a68e65f67dff7f1e223990d0498250 (diff) | |
download | cpython-cc1be2401e49dc278347002761e32582eb140bed.zip cpython-cc1be2401e49dc278347002761e32582eb140bed.tar.gz cpython-cc1be2401e49dc278347002761e32582eb140bed.tar.bz2 |
Always use the :funcname part of the format specifier for PyArg_ParseTuple()
so we get better error messages.
-rw-r--r-- | Modules/gcmodule.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index eb63e19..4d55a08 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -531,7 +531,7 @@ Py_collect(PyObject *self, PyObject *args) { long n; - if(!PyArg_ParseTuple(args, "")) /* check no args */ + if (!PyArg_ParseTuple(args, ":collect")) /* check no args */ return NULL; generation = 2; @@ -561,7 +561,7 @@ static char set_debug__doc__[] = static PyObject * Py_set_debug(PyObject *self, PyObject *args) { - if (!PyArg_ParseTuple(args, "l", &debug)) + if (!PyArg_ParseTuple(args, "l:get_debug", &debug)) return NULL; Py_INCREF(Py_None); @@ -577,7 +577,7 @@ static char get_debug__doc__[] = static PyObject * Py_get_debug(PyObject *self, PyObject *args) { - if(!PyArg_ParseTuple(args, "")) /* no args */ + if (!PyArg_ParseTuple(args, ":get_debug")) /* no args */ return NULL; return Py_BuildValue("i", debug); @@ -593,7 +593,7 @@ static char set_thresh__doc__[] = static PyObject * Py_set_thresh(PyObject *self, PyObject *args) { - if (!PyArg_ParseTuple(args, "i|ii", &threshold0, + if (!PyArg_ParseTuple(args, "i|ii:set_threshold", &threshold0, &threshold1, &threshold2)) return NULL; @@ -610,7 +610,7 @@ static char get_thresh__doc__[] = static PyObject * Py_get_thresh(PyObject *self, PyObject *args) { - if(!PyArg_ParseTuple(args, "")) /* no args */ + if (!PyArg_ParseTuple(args, ":get_threshold")) /* no args */ return NULL; return Py_BuildValue("(iii)", threshold0, threshold1, threshold2); |