[Python-checkins] CVS: python/dist/src/Python bltinmodule.c,2.148,2.149 import.c,2.128,2.129 sysmodule.c,2.57,2.58

Guido van Rossum guido@cnri.reston.va.us
Tue, 29 Feb 2000 08:59:32 -0500 (EST)


Update of /projects/cvsroot/python/dist/src/Python
In directory eric:/projects/python/develop/guido/src/Python

Modified Files:
	bltinmodule.c import.c sysmodule.c 
Log Message:
Massive patch by Skip Montanaro to add ":name" to as many
PyArg_ParseTuple() format string arguments as possible.


Index: bltinmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/bltinmodule.c,v
retrieving revision 2.148
retrieving revision 2.149
diff -C2 -r2.148 -r2.149
*** bltinmodule.c	2000/02/17 15:18:10	2.148
--- bltinmodule.c	2000/02/29 13:59:29	2.149
***************
*** 847,851 ****
  	PyObject *d;
  
! 	if (!PyArg_ParseTuple(args, ""))
  		return NULL;
  	d = PyEval_GetGlobals();
--- 847,851 ----
  	PyObject *d;
  
! 	if (!PyArg_ParseTuple(args, ":globals"))
  		return NULL;
  	d = PyEval_GetGlobals();
***************
*** 1213,1217 ****
  {
  	PyObject *s;
! 	if (!PyArg_ParseTuple(args, "S", &s))
  		return NULL;
  	Py_INCREF(s);
--- 1213,1217 ----
  {
  	PyObject *s;
! 	if (!PyArg_ParseTuple(args, "S:intern", &s))
  		return NULL;
  	Py_INCREF(s);
***************
*** 1384,1388 ****
  	PyObject *d;
  
! 	if (!PyArg_ParseTuple(args, ""))
  		return NULL;
  	d = PyEval_GetLocals();
--- 1384,1388 ----
  	PyObject *d;
  
! 	if (!PyArg_ParseTuple(args, ":locals"))
  		return NULL;
  	d = PyEval_GetLocals();
***************
*** 2092,2096 ****
  	int retval = 0;
  
! 	if (!PyArg_ParseTuple(args, "OO", &inst, &cls))
  		return NULL;
  
--- 2092,2096 ----
  	int retval = 0;
  
! 	if (!PyArg_ParseTuple(args, "OO:isinstance", &inst, &cls))
  		return NULL;
  
***************
*** 2151,2155 ****
  	int retval;
  
! 	if (!PyArg_ParseTuple(args, "OO", &derived, &cls))
  		return NULL;
  
--- 2151,2155 ----
  	int retval;
  
! 	if (!PyArg_ParseTuple(args, "OO:issubclass", &derived, &cls))
  		return NULL;
  

Index: import.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/import.c,v
retrieving revision 2.128
retrieving revision 2.129
diff -C2 -r2.128 -r2.129
*** import.c	1999/12/22 14:09:35	2.128
--- import.c	2000/02/29 13:59:29	2.129
***************
*** 1952,1956 ****
  	char buf[4];
  
! 	if (!PyArg_ParseTuple(args, ""))
  		return NULL;
  	buf[0] = (char) ((MAGIC >>  0) & 0xff);
--- 1952,1956 ----
  	char buf[4];
  
! 	if (!PyArg_ParseTuple(args, ":get_magic"))
  		return NULL;
  	buf[0] = (char) ((MAGIC >>  0) & 0xff);
***************
*** 1970,1974 ****
  	struct filedescr *fdp;
  
! 	if (!PyArg_ParseTuple(args, ""))
  		return NULL;
  	list = PyList_New(0);
--- 1970,1974 ----
  	struct filedescr *fdp;
  
! 	if (!PyArg_ParseTuple(args, ":get_suffixes"))
  		return NULL;
  	list = PyList_New(0);
***************
*** 2033,2037 ****
  	char *name;
  	PyObject *path = NULL;
! 	if (!PyArg_ParseTuple(args, "s|O", &name, &path))
  		return NULL;
  	return call_find_module(name, path);
--- 2033,2037 ----
  	char *name;
  	PyObject *path = NULL;
! 	if (!PyArg_ParseTuple(args, "s|O:find_module", &name, &path))
  		return NULL;
  	return call_find_module(name, path);
***************
*** 2046,2050 ****
  	int ret;
  	PyObject *m;
! 	if (!PyArg_ParseTuple(args, "s", &name))
  		return NULL;
  	ret = init_builtin(name);
--- 2046,2050 ----
  	int ret;
  	PyObject *m;
! 	if (!PyArg_ParseTuple(args, "s:init_builtin", &name))
  		return NULL;
  	ret = init_builtin(name);
***************
*** 2068,2072 ****
  	int ret;
  	PyObject *m;
! 	if (!PyArg_ParseTuple(args, "s", &name))
  		return NULL;
  	ret = PyImport_ImportFrozenModule(name);
--- 2068,2072 ----
  	int ret;
  	PyObject *m;
! 	if (!PyArg_ParseTuple(args, "s:init_frozen", &name))
  		return NULL;
  	ret = PyImport_ImportFrozenModule(name);
***************
*** 2089,2093 ****
  	char *name;
  
! 	if (!PyArg_ParseTuple(args, "s", &name))
  		return NULL;
  	return get_frozen_object(name);
--- 2089,2093 ----
  	char *name;
  
! 	if (!PyArg_ParseTuple(args, "s:get_frozen_object", &name))
  		return NULL;
  	return get_frozen_object(name);
***************
*** 2100,2104 ****
  {
  	char *name;
! 	if (!PyArg_ParseTuple(args, "s", &name))
  		return NULL;
  	return PyInt_FromLong(is_builtin(name));
--- 2100,2104 ----
  {
  	char *name;
! 	if (!PyArg_ParseTuple(args, "s:is_builtin", &name))
  		return NULL;
  	return PyInt_FromLong(is_builtin(name));
***************
*** 2112,2116 ****
  	char *name;
  	struct _frozen *p;
! 	if (!PyArg_ParseTuple(args, "s", &name))
  		return NULL;
  	p = find_frozen(name);
--- 2112,2116 ----
  	char *name;
  	struct _frozen *p;
! 	if (!PyArg_ParseTuple(args, "s:is_frozen", &name))
  		return NULL;
  	p = find_frozen(name);
***************
*** 2149,2153 ****
  	PyObject *m;
  	FILE *fp;
! 	if (!PyArg_ParseTuple(args, "ss|O!", &name, &pathname,
  			      &PyFile_Type, &fob))
  		return NULL;
--- 2149,2153 ----
  	PyObject *m;
  	FILE *fp;
! 	if (!PyArg_ParseTuple(args, "ss|O!:load_compiled", &name, &pathname,
  			      &PyFile_Type, &fob))
  		return NULL;
***************
*** 2173,2177 ****
  	PyObject *m;
  	FILE *fp = NULL;
! 	if (!PyArg_ParseTuple(args, "ss|O!", &name, &pathname,
  			      &PyFile_Type, &fob))
  		return NULL;
--- 2173,2177 ----
  	PyObject *m;
  	FILE *fp = NULL;
! 	if (!PyArg_ParseTuple(args, "ss|O!:load_dynamic", &name, &pathname,
  			      &PyFile_Type, &fob))
  		return NULL;
***************
*** 2197,2201 ****
  	PyObject *m;
  	FILE *fp;
! 	if (!PyArg_ParseTuple(args, "ss|O!", &name, &pathname,
  			      &PyFile_Type, &fob))
  		return NULL;
--- 2197,2201 ----
  	PyObject *m;
  	FILE *fp;
! 	if (!PyArg_ParseTuple(args, "ss|O!:load_source", &name, &pathname,
  			      &PyFile_Type, &fob))
  		return NULL;
***************
*** 2219,2223 ****
  	PyObject *m;
  
! 	if (!PyArg_ParseTuple(args, "ss", &name, &pathname))
  		return NULL;
  	m = PyMac_LoadResourceModule(name, pathname);
--- 2219,2223 ----
  	PyObject *m;
  
! 	if (!PyArg_ParseTuple(args, "ss:load_resource", &name, &pathname))
  		return NULL;
  	m = PyMac_LoadResourceModule(name, pathname);
***************
*** 2239,2243 ****
  	FILE *fp;
  
! 	if (!PyArg_ParseTuple(args, "sOs(ssi)",
  			      &name, &fob, &pathname,
  			      &suffix, &mode, &type))
--- 2239,2243 ----
  	FILE *fp;
  
! 	if (!PyArg_ParseTuple(args, "sOs(ssi):load_module",
  			      &name, &fob, &pathname,
  			      &suffix, &mode, &type))
***************
*** 2270,2274 ****
  	char *name;
  	char *pathname;
! 	if (!PyArg_ParseTuple(args, "ss", &name, &pathname))
  		return NULL;
  	return load_package(name, pathname);
--- 2270,2274 ----
  	char *name;
  	char *pathname;
! 	if (!PyArg_ParseTuple(args, "ss:load_package", &name, &pathname))
  		return NULL;
  	return load_package(name, pathname);
***************
*** 2281,2285 ****
  {
  	char *name;
! 	if (!PyArg_ParseTuple(args, "s", &name))
  		return NULL;
  	return PyModule_New(name);
--- 2281,2285 ----
  {
  	char *name;
! 	if (!PyArg_ParseTuple(args, "s:new_module", &name))
  		return NULL;
  	return PyModule_New(name);

Index: sysmodule.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Python/sysmodule.c,v
retrieving revision 2.57
retrieving revision 2.58
diff -C2 -r2.57 -r2.58
*** sysmodule.c	1999/10/05 22:17:41	2.57
--- sysmodule.c	2000/02/29 13:59:29	2.58
***************
*** 193,197 ****
  {
  	PyThreadState *tstate = PyThreadState_Get();
! 	if (!PyArg_ParseTuple(args, "i", &tstate->interp->checkinterval))
  		return NULL;
  	Py_INCREF(Py_None);
--- 193,197 ----
  {
  	PyThreadState *tstate = PyThreadState_Get();
! 	if (!PyArg_ParseTuple(args, "i:setcheckinterval", &tstate->interp->checkinterval))
  		return NULL;
  	Py_INCREF(Py_None);