diff Python/sysmodule.c @ 12136:9b9abde032b3 legacy-trunk

Use modern PyArg_ParseTuple style, with function names. (Mostly.)
author Guido van Rossum <guido@python.org>
date Fri, 31 Mar 2000 00:38:29 +0000
parents dc65c5f6ad7c
children 60dd95c75999
line wrap: on
line diff
--- a/Python/sysmodule.c	Fri Mar 31 00:37:41 2000 +0000
+++ b/Python/sysmodule.c	Fri Mar 31 00:38:29 2000 +0000
@@ -106,7 +106,7 @@
 	PyObject *args;
 {
 	PyThreadState *tstate;
-	if (!PyArg_Parse(args, ""))
+	if (!PyArg_ParseTuple(args, ":exc_info"))
 		return NULL;
 	tstate = PyThreadState_Get();
 	return Py_BuildValue(
@@ -214,7 +214,7 @@
 	PyObject *args;
 {
 	int flag;
-	if (!PyArg_Parse(args, "i", &flag))
+	if (!PyArg_ParseTuple(args, "i:mdebug", &flag))
 		return NULL;
 	mallopt(M_DEBUG, flag);
 	Py_INCREF(Py_None);
@@ -228,7 +228,7 @@
 	PyObject *args;
 {
 	PyObject *arg;
-	if (!PyArg_Parse(args, "O", &arg))
+	if (!PyArg_ParseTuple(args, "O:getrefcount", &arg))
 		return NULL;
 	return PyInt_FromLong((long) arg->ob_refcnt);
 }
@@ -246,7 +246,7 @@
 {
 	extern PyObject *get_counts Py_PROTO((void));
 
-	if (!PyArg_Parse(args, ""))
+	if (!PyArg_ParseTuple(args, ":getcounts"))
 		return NULL;
 	return get_counts();
 }
@@ -264,10 +264,10 @@
 
 static PyMethodDef sys_methods[] = {
 	/* Might as well keep this in alphabetic order */
-	{"exc_info",	sys_exc_info, 0, exc_info_doc},
+	{"exc_info",	sys_exc_info, 1, exc_info_doc},
 	{"exit",	sys_exit, 0, exit_doc},
 #ifdef COUNT_ALLOCS
-	{"getcounts",	sys_getcounts, 0},
+	{"getcounts",	sys_getcounts, 1},
 #endif
 #ifdef DYNAMIC_EXECUTION_PROFILE
 	{"getdxp",	_Py_GetDXProfile, 1},
@@ -275,9 +275,9 @@
 #ifdef Py_TRACE_REFS
 	{"getobjects",	_Py_GetObjects, 1},
 #endif
-	{"getrefcount",	sys_getrefcount, 0, getrefcount_doc},
+	{"getrefcount",	sys_getrefcount, 1, getrefcount_doc},
 #ifdef USE_MALLOPT
-	{"mdebug",	sys_mdebug, 0},
+	{"mdebug",	sys_mdebug, 1},
 #endif
 	{"setcheckinterval",	sys_setcheckinterval, 1, setcheckinterval_doc},
 	{"setprofile",	sys_setprofile, 0, setprofile_doc},