summaryrefslogtreecommitdiffstats
path: root/Modules/resource.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-02-29 13:59:29 (GMT)
committerGuido van Rossum <guido@python.org>2000-02-29 13:59:29 (GMT)
commit43713e5a2899930a8698e244b0d0fef59a676d17 (patch)
tree3d9740aff47f70cea403a2c924a37b468d1eded6 /Modules/resource.c
parenta9b2b4be26df7c3da8a20d1a5f4d2b796e455b4b (diff)
downloadcpython-43713e5a2899930a8698e244b0d0fef59a676d17.zip
cpython-43713e5a2899930a8698e244b0d0fef59a676d17.tar.gz
cpython-43713e5a2899930a8698e244b0d0fef59a676d17.tar.bz2
Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.
Diffstat (limited to 'Modules/resource.c')
-rw-r--r--Modules/resource.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/resource.c b/Modules/resource.c
index 4e1c2b1..2c825c7 100644
--- a/Modules/resource.c
+++ b/Modules/resource.c
@@ -60,7 +60,7 @@ resource_getrusage(self, args)
int who;
struct rusage ru;
- if (!PyArg_ParseTuple(args, "i", &who))
+ if (!PyArg_ParseTuple(args, "i:getrusage", &who))
return NULL;
if (getrusage(who, &ru) == -1) {
@@ -107,7 +107,7 @@ resource_getrlimit(self, args)
struct rlimit rl;
int resource;
- if (!PyArg_ParseTuple(args, "i", &resource))
+ if (!PyArg_ParseTuple(args, "i:getrlimit", &resource))
return NULL;
if (resource < 0 || resource >= RLIM_NLIMITS) {
@@ -140,7 +140,7 @@ resource_setrlimit(self, args)
int resource;
PyObject *curobj, *maxobj;
- if (!PyArg_ParseTuple(args, "i(OO)", &resource, &curobj, &maxobj))
+ if (!PyArg_ParseTuple(args, "i(OO):setrlimit", &resource, &curobj, &maxobj))
return NULL;
if (resource < 0 || resource >= RLIM_NLIMITS) {
@@ -182,7 +182,7 @@ resource_getpagesize(self, args)
PyObject *self;
PyObject *args;
{
- if (!PyArg_ParseTuple(args, ""))
+ if (!PyArg_ParseTuple(args, ":getpagesize"))
return NULL;
return Py_BuildValue("i", getpagesize());
}