[Python-checkins] python/dist/src/Python import.c,2.218,2.219

nnorwitz@users.sourceforge.net nnorwitz@users.sourceforge.net
Mon, 17 Feb 2003 10:18:05 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv22629a/Python

Modified Files:
	import.c 
Log Message:
Remove PyArg_ParseTuple() for methods which take no args,
use METH_NOARGS instead


Index: import.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/import.c,v
retrieving revision 2.218
retrieving revision 2.219
diff -C2 -d -r2.218 -r2.219
*** import.c	12 Feb 2003 23:02:19 -0000	2.218
--- import.c	17 Feb 2003 18:18:00 -0000	2.219
***************
*** 287,294 ****
  
  static PyObject *
! imp_lock_held(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":lock_held"))
- 		return NULL;
  #ifdef WITH_THREAD
  	return PyBool_FromLong(import_lock_thread != -1);
--- 287,292 ----
  
  static PyObject *
! imp_lock_held(PyObject *self, PyObject *noargs)
  {
  #ifdef WITH_THREAD
  	return PyBool_FromLong(import_lock_thread != -1);
***************
*** 299,306 ****
  
  static PyObject *
! imp_acquire_lock(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":acquire_lock"))
- 		return NULL;
  #ifdef WITH_THREAD
  	lock_import();
--- 297,302 ----
  
  static PyObject *
! imp_acquire_lock(PyObject *self, PyObject *noargs)
  {
  #ifdef WITH_THREAD
  	lock_import();
***************
*** 311,318 ****
  
  static PyObject *
! imp_release_lock(PyObject *self, PyObject *args)
  {
- 	if (!PyArg_ParseTuple(args, ":release_lock"))
- 		return NULL;
  #ifdef WITH_THREAD
  	if (unlock_import() < 0) {
--- 307,312 ----
  
  static PyObject *
! imp_release_lock(PyObject *self, PyObject *noargs)
  {
  #ifdef WITH_THREAD
  	if (unlock_import() < 0) {
***************
*** 2429,2438 ****
  
  static PyObject *
! imp_get_magic(PyObject *self, PyObject *args)
  {
  	char buf[4];
  
- 	if (!PyArg_ParseTuple(args, ":get_magic"))
- 		return NULL;
  	buf[0] = (char) ((pyc_magic >>  0) & 0xff);
  	buf[1] = (char) ((pyc_magic >>  8) & 0xff);
--- 2423,2430 ----
  
  static PyObject *
! imp_get_magic(PyObject *self, PyObject *noargs)
  {
  	char buf[4];
  
  	buf[0] = (char) ((pyc_magic >>  0) & 0xff);
  	buf[1] = (char) ((pyc_magic >>  8) & 0xff);
***************
*** 2444,2454 ****
  
  static PyObject *
! imp_get_suffixes(PyObject *self, PyObject *args)
  {
  	PyObject *list;
  	struct filedescr *fdp;
  
- 	if (!PyArg_ParseTuple(args, ":get_suffixes"))
- 		return NULL;
  	list = PyList_New(0);
  	if (list == NULL)
--- 2436,2444 ----
  
  static PyObject *
! imp_get_suffixes(PyObject *self, PyObject *noargs)
  {
  	PyObject *list;
  	struct filedescr *fdp;
  
  	list = PyList_New(0);
  	if (list == NULL)
***************
*** 2792,2803 ****
  
  static PyMethodDef imp_methods[] = {
! 	{"find_module",		imp_find_module, METH_VARARGS, doc_find_module},
! 	{"get_magic",		imp_get_magic,	 METH_VARARGS, doc_get_magic},
! 	{"get_suffixes",	imp_get_suffixes, METH_VARARGS, doc_get_suffixes},
! 	{"load_module",		imp_load_module, METH_VARARGS, doc_load_module},
! 	{"new_module",		imp_new_module,	 METH_VARARGS, doc_new_module},
! 	{"lock_held",		imp_lock_held,	 METH_VARARGS, doc_lock_held},
! 	{"acquire_lock",    imp_acquire_lock, METH_VARARGS, doc_acquire_lock},
! 	{"release_lock",    imp_release_lock, METH_VARARGS, doc_release_lock},
  	/* The rest are obsolete */
  	{"get_frozen_object",	imp_get_frozen_object,	METH_VARARGS},
--- 2782,2793 ----
  
  static PyMethodDef imp_methods[] = {
! 	{"find_module",	 imp_find_module,  METH_VARARGS, doc_find_module},
! 	{"get_magic",	 imp_get_magic,	   METH_NOARGS,  doc_get_magic},
! 	{"get_suffixes", imp_get_suffixes, METH_NOARGS,  doc_get_suffixes},
! 	{"load_module",	 imp_load_module,  METH_VARARGS, doc_load_module},
! 	{"new_module",	 imp_new_module,   METH_VARARGS, doc_new_module},
! 	{"lock_held",	 imp_lock_held,	   METH_NOARGS,  doc_lock_held},
! 	{"acquire_lock", imp_acquire_lock, METH_NOARGS,  doc_acquire_lock},
! 	{"release_lock", imp_release_lock, METH_NOARGS,  doc_release_lock},
  	/* The rest are obsolete */
  	{"get_frozen_object",	imp_get_frozen_object,	METH_VARARGS},