Mailing List Archive

CVS: python/dist/src/Modules cryptmodule.c,2.10,2.11 md5module.c,2.28,2.29 mpzmodule.c,2.40,2.41 nismodule.c,2.22,2.23 pwdmodule.c,1.30,1.31 regexmodule.c,1.46,1.47 rgbimgmodule.c,2.24,2.25 rotormodule.c,2.32,2.33 signalmodule.c,2.65,2.66 sunaudiodev.c,1.
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv26238

Modified Files:
cryptmodule.c md5module.c mpzmodule.c nismodule.c pwdmodule.c
regexmodule.c rgbimgmodule.c rotormodule.c signalmodule.c
sunaudiodev.c threadmodule.c
Log Message:
Remove METH_OLDARGS:
Convert METH_OLDARGS -> METH_VARARGS: also PyArg_Parse -> PyArg_ParseTuple
Convert METH_OLDARGS -> METH_NOARGS: remove args parameter
Please review. All tests pass, but some modules don't have tests.
I spot checked various functions to try to make sure nothing broke.



Index: cryptmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cryptmodule.c,v
retrieving revision 2.10
retrieving revision 2.11
diff -C2 -d -r2.10 -r2.11
*** cryptmodule.c 3 Aug 2000 02:34:44 -0000 2.10
--- cryptmodule.c 31 Mar 2002 15:27:00 -0000 2.11
***************
*** 15,19 ****
extern char * crypt(const char *, const char *);

! if (!PyArg_Parse(args, "(ss)", &word, &salt)) {
return NULL;
}
--- 15,19 ----
extern char * crypt(const char *, const char *);

! if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) {
return NULL;
}
***************
*** 32,36 ****

static PyMethodDef crypt_methods[] = {
! {"crypt", crypt_crypt, METH_OLDARGS, crypt_crypt__doc__},
{NULL, NULL} /* sentinel */
};
--- 32,36 ----

static PyMethodDef crypt_methods[] = {
! {"crypt", crypt_crypt, METH_VARARGS, crypt_crypt__doc__},
{NULL, NULL} /* sentinel */
};

Index: md5module.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/md5module.c,v
retrieving revision 2.28
retrieving revision 2.29
diff -C2 -d -r2.28 -r2.29
*** md5module.c 25 Mar 2002 20:46:46 -0000 2.28
--- md5module.c 31 Mar 2002 15:27:00 -0000 2.29
***************
*** 53,57 ****
int len;

! if (!PyArg_Parse(args, "s#", &cp, &len))
return NULL;

--- 53,57 ----
int len;

! if (!PyArg_ParseTuple(args, "s#:update", &cp, &len))
return NULL;

***************
*** 143,147 ****

static PyMethodDef md5_methods[] = {
! {"update", (PyCFunction)md5_update, METH_OLDARGS, update_doc},
{"digest", (PyCFunction)md5_digest, METH_NOARGS, digest_doc},
{"hexdigest", (PyCFunction)md5_hexdigest, METH_NOARGS, hexdigest_doc},
--- 143,147 ----

static PyMethodDef md5_methods[] = {
! {"update", (PyCFunction)md5_update, METH_VARARGS, update_doc},
{"digest", (PyCFunction)md5_digest, METH_NOARGS, digest_doc},
{"hexdigest", (PyCFunction)md5_hexdigest, METH_NOARGS, hexdigest_doc},

Index: mpzmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/mpzmodule.c,v
retrieving revision 2.40
retrieving revision 2.41
diff -C2 -d -r2.40 -r2.41
*** mpzmodule.c 1 Mar 2002 21:30:55 -0000 2.40
--- mpzmodule.c 31 Mar 2002 15:27:00 -0000 2.41
***************
*** 1243,1263 ****


- /* MPZ methods-as-attributes */
- #ifdef MPZ_CONVERSIONS_AS_METHODS
- static PyObject *
- mpz_int(mpzobject *self, PyObject *args)
- #else /* def MPZ_CONVERSIONS_AS_METHODS */
static PyObject *
mpz_int(mpzobject *self)
- #endif /* def MPZ_CONVERSIONS_AS_METHODS else */
{
long sli;


- #ifdef MPZ_CONVERSIONS_AS_METHODS
- if (!PyArg_NoArgs(args))
- return NULL;
- #endif /* def MPZ_CONVERSIONS_AS_METHODS */
-
if (mpz_size(&self->mpz) > 1
|| (sli = (long)mpz_get_ui(&self->mpz)) < (long)0 ) {
--- 1243,1252 ----
***************
*** 1274,1282 ****

static PyObject *
- #ifdef MPZ_CONVERSIONS_AS_METHODS
- mpz_long(mpzobject *self, PyObject *args)
- #else /* def MPZ_CONVERSIONS_AS_METHODS */
mpz_long(mpzobject *self)
- #endif /* def MPZ_CONVERSIONS_AS_METHODS else */
{
int i, isnegative;
--- 1263,1267 ----
***************
*** 1288,1296 ****


- #ifdef MPZ_CONVERSIONS_AS_METHODS
- if (!PyArg_NoArgs(args))
- return NULL;
- #endif /* def MPZ_CONVERSIONS_AS_METHODS */
-
/* determine length of python-long to be allocated */
if ((longobjp = _PyLong_New(i = (int)
--- 1273,1276 ----
***************
*** 1353,1363 ****
static const double multiplier = 256.0 * 256.0 * 256.0 * 256.0;

- #ifdef MPZ_CONVERSIONS_AS_METHODS
- static PyObject *
- mpz_float(mpzobject *self, PyObject *args)
- #else /* def MPZ_CONVERSIONS_AS_METHODS */
static PyObject *
mpz_float(mpzobject *self)
- #endif /* def MPZ_CONVERSIONS_AS_METHODS else */
{
int i, isnegative;
--- 1333,1338 ----
***************
*** 1367,1375 ****


- #ifdef MPZ_CONVERSIONS_AS_METHODS
- if (!PyArg_NoArgs(args))
- return NULL;
- #endif /* def MPZ_CONVERSIONS_AS_METHODS */
-
i = (int)mpz_size(&self->mpz);

--- 1342,1345 ----
***************
*** 1407,1444 ****
} /* mpz_float() */

- #ifdef MPZ_CONVERSIONS_AS_METHODS
- static PyObject *
- mpz_hex(mpzobject *self, PyObject *args)
- #else /* def MPZ_CONVERSIONS_AS_METHODS */
static PyObject *
mpz_hex(mpzobject *self)
- #endif /* def MPZ_CONVERSIONS_AS_METHODS else */
{
- #ifdef MPZ_CONVERSIONS_AS_METHODS
- if (!PyArg_NoArgs(args))
- return NULL;
- #endif /* def MPZ_CONVERSIONS_AS_METHODS */
-
return mpz_format((PyObject *)self, 16, (unsigned char)1);
} /* mpz_hex() */

- #ifdef MPZ_CONVERSIONS_AS_METHODS
- static PyObject *
- mpz_oct(mpzobject *self, PyObject *args)
- #else /* def MPZ_CONVERSIONS_AS_METHODS */
static PyObject *
mpz_oct(mpzobject *self)
- #endif /* def MPZ_CONVERSIONS_AS_METHODS else */
{
- #ifdef MPZ_CONVERSIONS_AS_METHODS
- if (!PyArg_NoArgs(args))
- return NULL;
- #endif /* def MPZ_CONVERSIONS_AS_METHODS */
-
return mpz_format((PyObject *)self, 8, (unsigned char)1);
} /* mpz_oct() */

static PyObject *
! mpz_binary(mpzobject *self, PyObject *args)
{
int size;
--- 1377,1394 ----
} /* mpz_float() */

static PyObject *
mpz_hex(mpzobject *self)
{
return mpz_format((PyObject *)self, 16, (unsigned char)1);
} /* mpz_hex() */

static PyObject *
mpz_oct(mpzobject *self)
{
return mpz_format((PyObject *)self, 8, (unsigned char)1);
} /* mpz_oct() */

static PyObject *
! mpz_binary(mpzobject *self)
{
int size;
***************
*** 1448,1454 ****
unsigned long ldigit;

- if (!PyArg_NoArgs(args))
- return NULL;
-
if (mpz_cmp_ui(&self->mpz, (unsigned long int)0) < 0) {
PyErr_SetString(PyExc_ValueError,
--- 1398,1401 ----
***************
*** 1494,1504 ****
static PyMethodDef mpz_methods[] = {
#ifdef MPZ_CONVERSIONS_AS_METHODS
! {"int", mpz_int},
! {"long", mpz_long},
! {"float", mpz_float},
! {"hex", mpz_hex},
! {"oct", mpz_oct},
#endif /* def MPZ_CONVERSIONS_AS_METHODS */
! {"binary", (PyCFunction)mpz_binary},
{NULL, NULL} /* sentinel */
};
--- 1441,1451 ----
static PyMethodDef mpz_methods[] = {
#ifdef MPZ_CONVERSIONS_AS_METHODS
! {"int", mpz_int, METH_NOARGS},
! {"long", mpz_long, METH_NOARGS},
! {"float", mpz_float, METH_NOARGS},
! {"hex", mpz_hex, METH_NOARGS},
! {"oct", mpz_oct, METH_NOARGS},
#endif /* def MPZ_CONVERSIONS_AS_METHODS */
! {"binary", (PyCFunction)mpz_binary, METH_NOARGS},
{NULL, NULL} /* sentinel */
};

Index: nismodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/nismodule.c,v
retrieving revision 2.22
retrieving revision 2.23
diff -C2 -d -r2.22 -r2.23
*** nismodule.c 17 Jan 2002 23:15:58 -0000 2.22
--- nismodule.c 31 Mar 2002 15:27:00 -0000 2.23
***************
*** 121,125 ****
int fix;

! if (!PyArg_Parse(args, "(t#s)", &key, &keylen, &map))
return NULL;
if ((err = yp_get_default_domain(&domain)) != 0)
--- 121,125 ----
int fix;

! if (!PyArg_ParseTuple(args, "t#s:match", &key, &keylen, &map))
return NULL;
if ((err = yp_get_default_domain(&domain)) != 0)
***************
*** 150,154 ****
int err;

! if (!PyArg_Parse(args, "s", &map))
return NULL;
if ((err = yp_get_default_domain(&domain)) != 0)
--- 150,154 ----
int err;

! if (!PyArg_ParseTuple(args, "s:cat", &map))
return NULL;
if ((err = yp_get_default_domain(&domain)) != 0)
***************
*** 339,349 ****

static PyObject *
! nis_maps (PyObject *self, PyObject *args)
{
nismaplist *maps;
PyObject *list;

- if (!PyArg_NoArgs(args))
- return NULL;
if ((maps = nis_maplist ()) == NULL)
return NULL;
--- 339,347 ----

static PyObject *
! nis_maps (PyObject *self)
{
nismaplist *maps;
PyObject *list;

if ((maps = nis_maplist ()) == NULL)
return NULL;
***************
*** 365,371 ****

static PyMethodDef nis_methods[] = {
! {"match", nis_match, METH_OLDARGS},
! {"cat", nis_cat, METH_OLDARGS},
! {"maps", nis_maps, METH_OLDARGS},
{NULL, NULL} /* Sentinel */
};
--- 363,369 ----

static PyMethodDef nis_methods[] = {
! {"match", nis_match, METH_VARARGS},
! {"cat", nis_cat, METH_VARARGS},
! {"maps", (PyCFunction)nis_maps, METH_NOARGS},
{NULL, NULL} /* Sentinel */
};

Index: pwdmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** pwdmodule.c 29 Mar 2002 19:58:25 -0000 1.30
--- pwdmodule.c 31 Mar 2002 15:27:00 -0000 1.31
***************
*** 85,89 ****
int uid;
struct passwd *p;
! if (!PyArg_Parse(args, "i", &uid))
return NULL;
if ((p = getpwuid(uid)) == NULL) {
--- 85,89 ----
int uid;
struct passwd *p;
! if (!PyArg_ParseTuple(args, "i:getpwuid", &uid))
return NULL;
if ((p = getpwuid(uid)) == NULL) {
***************
*** 104,108 ****
char *name;
struct passwd *p;
! if (!PyArg_Parse(args, "s", &name))
return NULL;
if ((p = getpwnam(name)) == NULL) {
--- 104,108 ----
char *name;
struct passwd *p;
! if (!PyArg_ParseTuple(args, "s:getpwnam", &name))
return NULL;
if ((p = getpwnam(name)) == NULL) {
***************
*** 147,152 ****

static PyMethodDef pwd_methods[] = {
! {"getpwuid", pwd_getpwuid, METH_OLDARGS, pwd_getpwuid__doc__},
! {"getpwnam", pwd_getpwnam, METH_OLDARGS, pwd_getpwnam__doc__},
#ifdef HAVE_GETPWENT
{"getpwall", (PyCFunction)pwd_getpwall,
--- 147,152 ----

static PyMethodDef pwd_methods[] = {
! {"getpwuid", pwd_getpwuid, METH_VARARGS, pwd_getpwuid__doc__},
! {"getpwnam", pwd_getpwnam, METH_VARARGS, pwd_getpwnam__doc__},
#ifdef HAVE_GETPWENT
{"getpwall", (PyCFunction)pwd_getpwall,

Index: regexmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** regexmodule.c 17 Jan 2002 23:15:58 -0000 1.46
--- regexmodule.c 31 Mar 2002 15:27:00 -0000 1.47
***************
*** 584,588 ****
PyObject *tuple, *v;

! if (!PyArg_Parse(args, "(SS)", &pat, &string))
return NULL;
if (update_cache(pat) < 0)
--- 584,588 ----
PyObject *tuple, *v;

! if (!PyArg_ParseTuple(args, "SS:match", &pat, &string))
return NULL;
if (update_cache(pat) < 0)
***************
*** 602,606 ****
PyObject *tuple, *v;

! if (!PyArg_Parse(args, "(SS)", &pat, &string))
return NULL;
if (update_cache(pat) < 0)
--- 602,606 ----
PyObject *tuple, *v;

! if (!PyArg_ParseTuple(args, "SS:search", &pat, &string))
return NULL;
if (update_cache(pat) < 0)
***************
*** 618,622 ****
{
int syntax;
! if (!PyArg_Parse(args, "i", &syntax))
return NULL;
syntax = re_set_syntax(syntax);
--- 618,622 ----
{
int syntax;
! if (!PyArg_ParseTuple(args, "i:set_syntax", &syntax))
return NULL;
syntax = re_set_syntax(syntax);
***************
*** 630,637 ****

static PyObject *
! regex_get_syntax(PyObject *self, PyObject *args)
{
- if (!PyArg_Parse(args, ""))
- return NULL;
return PyInt_FromLong((long)re_syntax);
}
--- 630,635 ----

static PyObject *
! regex_get_syntax(PyObject *self)
{
return PyInt_FromLong((long)re_syntax);
}
***************
*** 641,648 ****
{"compile", regex_compile, METH_VARARGS},
{"symcomp", regex_symcomp, METH_VARARGS},
! {"match", regex_match, METH_OLDARGS},
! {"search", regex_search, METH_OLDARGS},
! {"set_syntax", regex_set_syntax, METH_OLDARGS},
! {"get_syntax", regex_get_syntax, METH_OLDARGS},
{NULL, NULL} /* sentinel */
};
--- 639,646 ----
{"compile", regex_compile, METH_VARARGS},
{"symcomp", regex_symcomp, METH_VARARGS},
! {"match", regex_match, METH_VARARGS},
! {"search", regex_search, METH_VARARGS},
! {"set_syntax", regex_set_syntax, METH_VARARGS},
! {"get_syntax", (PyCFunction)regex_get_syntax, METH_NOARGS},
{NULL, NULL} /* sentinel */
};

Index: rgbimgmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/rgbimgmodule.c,v
retrieving revision 2.24
retrieving revision 2.25
diff -C2 -d -r2.24 -r2.25
*** rgbimgmodule.c 17 Jan 2002 23:15:58 -0000 2.24
--- rgbimgmodule.c 31 Mar 2002 15:27:00 -0000 2.25
***************
*** 237,241 ****
FILE *inf;

! if (!PyArg_Parse(args, "s", &name))
return NULL;

--- 237,241 ----
FILE *inf;

! if (!PyArg_ParseTuple(args, "s:sizeofimage", &name))
return NULL;

***************
*** 276,280 ****
PyObject *rv = NULL;

! if (!PyArg_Parse(args, "s", &name))
return NULL;

--- 276,280 ----
PyObject *rv = NULL;

! if (!PyArg_ParseTuple(args, "s:longimagedata", &name))
return NULL;

***************
*** 571,576 ****
PyObject *retval = NULL;

! if (!PyArg_Parse(args, "(s#iiis)", &lptr, &len, &xsize, &ysize, &zsize,
! &name))
return NULL;

--- 571,576 ----
PyObject *retval = NULL;

! if (!PyArg_ParseTuple(args, "s#iiis:longstoimage", &lptr, &len,
! &xsize, &ysize, &zsize, &name))
return NULL;

***************
*** 735,739 ****
int order, oldorder;

! if (!PyArg_Parse(args, "i", &order))
return NULL;
oldorder = reverse_order;
--- 735,739 ----
int order, oldorder;

! if (!PyArg_ParseTuple(args, "i:ttob", &order))
return NULL;
oldorder = reverse_order;
***************
*** 744,751 ****
static PyMethodDef
rgbimg_methods[] = {
! {"sizeofimage", sizeofimage, METH_OLDARGS},
! {"longimagedata", longimagedata, METH_OLDARGS},
! {"longstoimage", longstoimage, METH_OLDARGS},
! {"ttob", ttob, METH_OLDARGS},
{NULL, NULL} /* sentinel */
};
--- 744,751 ----
static PyMethodDef
rgbimg_methods[] = {
! {"sizeofimage", sizeofimage, METH_VARARGS},
! {"longimagedata", longimagedata, METH_VARARGS},
! {"longstoimage", longstoimage, METH_VARARGS},
! {"ttob", ttob, METH_VARARGS},
{NULL, NULL} /* sentinel */
};

Index: rotormodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/rotormodule.c,v
retrieving revision 2.32
retrieving revision 2.33
diff -C2 -d -r2.32 -r2.33
*** rotormodule.c 17 Jan 2002 23:15:58 -0000 2.32
--- rotormodule.c 31 Mar 2002 15:27:00 -0000 2.33
***************
*** 464,468 ****
char *tmp;

! if (!PyArg_Parse(args, "s#", &string, &len))
return NULL;
if (!(tmp = PyMem_NEW(char, len+5))) {
--- 464,468 ----
char *tmp;

! if (!PyArg_ParseTuple(args, "s#:encrypt", &string, &len))
return NULL;
if (!(tmp = PyMem_NEW(char, len+5))) {
***************
*** 486,490 ****
char *tmp;

! if (!PyArg_Parse(args, "s#", &string, &len))
return NULL;
if (!(tmp = PyMem_NEW(char, len+5))) {
--- 486,490 ----
char *tmp;

! if (!PyArg_ParseTuple(args, "s#:encrypt_more", &string, &len))
return NULL;
if (!(tmp = PyMem_NEW(char, len+5))) {
***************
*** 508,512 ****
char *tmp;

! if (!PyArg_Parse(args, "s#", &string, &len))
return NULL;
if (!(tmp = PyMem_NEW(char, len+5))) {
--- 508,512 ----
char *tmp;

! if (!PyArg_ParseTuple(args, "s#:decrypt", &string, &len))
return NULL;
if (!(tmp = PyMem_NEW(char, len+5))) {
***************
*** 530,534 ****
char *tmp;

! if (!PyArg_Parse(args, "s#", &string, &len))
return NULL;
if (!(tmp = PyMem_NEW(char, len+5))) {
--- 530,534 ----
char *tmp;

! if (!PyArg_ParseTuple(args, "s#:decrypt_more", &string, &len))
return NULL;
if (!(tmp = PyMem_NEW(char, len+5))) {
***************
*** 559,566 ****
static struct PyMethodDef
rotorobj_methods[] = {
! {"encrypt", (PyCFunction)rotorobj_encrypt, METH_OLDARGS},
! {"encryptmore", (PyCFunction)rotorobj_encrypt_more, METH_OLDARGS},
! {"decrypt", (PyCFunction)rotorobj_decrypt, METH_OLDARGS},
! {"decryptmore", (PyCFunction)rotorobj_decrypt_more, METH_OLDARGS},
{"setkey", (PyCFunction)rotorobj_setkey, METH_VARARGS},
{NULL, NULL} /* sentinel */
--- 559,566 ----
static struct PyMethodDef
rotorobj_methods[] = {
! {"encrypt", (PyCFunction)rotorobj_encrypt, METH_VARARGS},
! {"encryptmore", (PyCFunction)rotorobj_encrypt_more, METH_VARARGS},
! {"decrypt", (PyCFunction)rotorobj_decrypt, METH_VARARGS},
! {"decryptmore", (PyCFunction)rotorobj_decrypt_more, METH_VARARGS},
{"setkey", (PyCFunction)rotorobj_setkey, METH_VARARGS},
{NULL, NULL} /* sentinel */
***************
*** 612,616 ****
static struct PyMethodDef
rotor_methods[] = {
! {"newrotor", rotor_rotor, 1},
{NULL, NULL} /* sentinel */
};
--- 612,616 ----
static struct PyMethodDef
rotor_methods[] = {
! {"newrotor", rotor_rotor, METH_VARARGS},
{NULL, NULL} /* sentinel */
};

Index: signalmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/signalmodule.c,v
retrieving revision 2.65
retrieving revision 2.66
diff -C2 -d -r2.65 -r2.66
*** signalmodule.c 28 Mar 2002 21:04:14 -0000 2.65
--- signalmodule.c 31 Mar 2002 15:27:00 -0000 2.66
***************
*** 150,154 ****
{
int t;
! if (!PyArg_Parse(args, "i", &t))
return NULL;
/* alarm() returns the number of seconds remaining */
--- 150,154 ----
{
int t;
! if (!PyArg_ParseTuple(args, "i:alarm", &t))
return NULL;
/* alarm() returns the number of seconds remaining */
***************
*** 193,197 ****
PyObject *old_handler;
void (*func)(int);
! if (!PyArg_Parse(args, "(iO)", &sig_num, &obj))
return NULL;
#ifdef WITH_THREAD
--- 193,197 ----
PyObject *old_handler;
void (*func)(int);
! if (!PyArg_ParseTuple(args, "iO:signal", &sig_num, &obj))
return NULL;
#ifdef WITH_THREAD
***************
*** 249,253 ****
int sig_num;
PyObject *old_handler;
! if (!PyArg_Parse(args, "i", &sig_num))
return NULL;
if (sig_num < 1 || sig_num >= NSIG) {
--- 249,253 ----
int sig_num;
PyObject *old_handler;
! if (!PyArg_ParseTuple(args, "i:getsignal", &sig_num))
return NULL;
if (sig_num < 1 || sig_num >= NSIG) {
***************
*** 275,282 ****
static PyMethodDef signal_methods[] = {
#ifdef HAVE_ALARM
! {"alarm", signal_alarm, METH_OLDARGS, alarm_doc},
#endif
! {"signal", signal_signal, METH_OLDARGS, signal_doc},
! {"getsignal", signal_getsignal, METH_OLDARGS, getsignal_doc},
#ifdef HAVE_PAUSE
{"pause", (PyCFunction)signal_pause,
--- 275,282 ----
static PyMethodDef signal_methods[] = {
#ifdef HAVE_ALARM
! {"alarm", signal_alarm, METH_VARARGS, alarm_doc},
#endif
! {"signal", signal_signal, METH_VARARGS, signal_doc},
! {"getsignal", signal_getsignal, METH_VARARGS, getsignal_doc},
#ifdef HAVE_PAUSE
{"pause", (PyCFunction)signal_pause,
***************
*** 284,288 ****
#endif
{"default_int_handler", signal_default_int_handler,
! METH_OLDARGS, default_int_handler_doc},
{NULL, NULL} /* sentinel */
};
--- 284,288 ----
#endif
{"default_int_handler", signal_default_int_handler,
! METH_VARARGS, default_int_handler_doc},
{NULL, NULL} /* sentinel */
};

Index: sunaudiodev.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/sunaudiodev.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** sunaudiodev.c 17 Jan 2002 23:15:58 -0000 1.28
--- sunaudiodev.c 31 Mar 2002 15:27:00 -0000 1.29
***************
*** 59,63 ****

/* Check arg for r/w/rw */
! if (!PyArg_Parse(args, "s", &mode))
return NULL;
if (strcmp(mode, "r") == 0)
--- 59,63 ----

/* Check arg for r/w/rw */
! if (!PyArg_ParseTuple(args, "s", &mode))
return NULL;
if (strcmp(mode, "r") == 0)
***************
*** 134,138 ****
PyObject *rv;

! if (!PyArg_Parse(args, "i", &size))
return NULL;
rv = PyString_FromStringAndSize(NULL, size);
--- 134,138 ----
PyObject *rv;

! if (!PyArg_ParseTuple(args, "i:read", &size))
return NULL;
rv = PyString_FromStringAndSize(NULL, size);
***************
*** 170,174 ****
int count, size;

! if (!PyArg_Parse(args, "s#", &cp, &size))
return NULL;

--- 170,174 ----
int count, size;

! if (!PyArg_ParseTuple(args, "s#:write", &cp, &size))
return NULL;

***************
*** 189,198 ****

static PyObject *
! sad_getinfo(sadobject *self, PyObject *args)
{
sadstatusobject *rv;

- if (!PyArg_Parse(args, ""))
- return NULL;
if (!(rv = sads_alloc()))
return NULL;
--- 189,196 ----

static PyObject *
! sad_getinfo(sadobject *self)
{
sadstatusobject *rv;

if (!(rv = sads_alloc()))
return NULL;
***************
*** 223,232 ****

static PyObject *
! sad_ibufcount(sadobject *self, PyObject *args)
{
audio_info_t ai;

- if (!PyArg_Parse(args, ""))
- return NULL;
if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) {
PyErr_SetFromErrno(SunAudioError);
--- 221,228 ----

static PyObject *
! sad_ibufcount(sadobject *self)
{
audio_info_t ai;

if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) {
PyErr_SetFromErrno(SunAudioError);
***************
*** 237,246 ****

static PyObject *
! sad_obufcount(sadobject *self, PyObject *args)
{
audio_info_t ai;

- if (!PyArg_Parse(args, ""))
- return NULL;
if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) {
PyErr_SetFromErrno(SunAudioError);
--- 233,240 ----

static PyObject *
! sad_obufcount(sadobject *self)
{
audio_info_t ai;

if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) {
PyErr_SetFromErrno(SunAudioError);
***************
*** 255,263 ****

static PyObject *
! sad_drain(sadobject *self, PyObject *args)
{
-
- if (!PyArg_Parse(args, ""))
- return NULL;
if (ioctl(self->x_fd, AUDIO_DRAIN, 0) < 0) {
PyErr_SetFromErrno(SunAudioError);
--- 249,254 ----

static PyObject *
! sad_drain(sadobject *self)
{
if (ioctl(self->x_fd, AUDIO_DRAIN, 0) < 0) {
PyErr_SetFromErrno(SunAudioError);
***************
*** 270,279 ****
#ifdef SOLARIS
static PyObject *
! sad_getdev(sadobject *self, PyObject *args)
{
struct audio_device ad;

- if (!PyArg_Parse(args, ""))
- return NULL;
if (ioctl(self->x_fd, AUDIO_GETDEV, &ad) < 0) {
PyErr_SetFromErrno(SunAudioError);
--- 261,268 ----
#ifdef SOLARIS
static PyObject *
! sad_getdev(sadobject *self)
{
struct audio_device ad;

if (ioctl(self->x_fd, AUDIO_GETDEV, &ad) < 0) {
PyErr_SetFromErrno(SunAudioError);
***************
*** 285,293 ****

static PyObject *
! sad_flush(sadobject *self, PyObject *args)
{
-
- if (!PyArg_Parse(args, ""))
- return NULL;
if (ioctl(self->x_fd, I_FLUSH, FLUSHW) < 0) {
PyErr_SetFromErrno(SunAudioError);
--- 274,279 ----

static PyObject *
! sad_flush(sadobject *self)
{
if (ioctl(self->x_fd, I_FLUSH, FLUSHW) < 0) {
PyErr_SetFromErrno(SunAudioError);
***************
*** 299,307 ****

static PyObject *
! sad_close(sadobject *self, PyObject *args)
{

- if (!PyArg_Parse(args, ""))
- return NULL;
if (self->x_fd >= 0) {
close(self->x_fd);
--- 285,291 ----

static PyObject *
! sad_close(sadobject *self)
{

if (self->x_fd >= 0) {
close(self->x_fd);
***************
*** 313,321 ****

static PyObject *
! sad_fileno(sadobject *self, PyObject *args)
{
- if (!PyArg_Parse(args, ""))
- return NULL;
-
return PyInt_FromLong(self->x_fd);
}
--- 297,302 ----

static PyObject *
! sad_fileno(sadobject *self)
{
return PyInt_FromLong(self->x_fd);
}
***************
*** 323,340 ****

static PyMethodDef sad_methods[] = {
! { "read", (PyCFunction)sad_read, METH_OLDARGS },
! { "write", (PyCFunction)sad_write, METH_OLDARGS },
! { "ibufcount", (PyCFunction)sad_ibufcount, METH_OLDARGS },
! { "obufcount", (PyCFunction)sad_obufcount, METH_OLDARGS },
#define CTL_METHODS 4
! { "getinfo", (PyCFunction)sad_getinfo, METH_OLDARGS },
! { "setinfo", (PyCFunction)sad_setinfo, METH_OLDARGS },
! { "drain", (PyCFunction)sad_drain, METH_OLDARGS },
! { "flush", (PyCFunction)sad_flush, METH_OLDARGS },
#ifdef SOLARIS
! { "getdev", (PyCFunction)sad_getdev, METH_OLDARGS },
#endif
! { "close", (PyCFunction)sad_close, METH_OLDARGS },
! { "fileno", (PyCFunction)sad_fileno, METH_OLDARGS },
{NULL, NULL} /* sentinel */
};
--- 304,321 ----

static PyMethodDef sad_methods[] = {
! { "read", (PyCFunction)sad_read, METH_VARARGS },
! { "write", (PyCFunction)sad_write, METH_VARARGS },
! { "ibufcount", (PyCFunction)sad_ibufcount, METH_NOARGS },
! { "obufcount", (PyCFunction)sad_obufcount, METH_NOARGS },
#define CTL_METHODS 4
! { "getinfo", (PyCFunction)sad_getinfo, METH_NOARGS },
! { "setinfo", (PyCFunction)sad_setinfo, METH_O},
! { "drain", (PyCFunction)sad_drain, METH_NOARGS },
! { "flush", (PyCFunction)sad_flush, METH_NOARGS },
#ifdef SOLARIS
! { "getdev", (PyCFunction)sad_getdev, METH_NOARGS },
#endif
! { "close", (PyCFunction)sad_close, METH_NOARGS },
! { "fileno", (PyCFunction)sad_fileno, METH_NOARGS },
{NULL, NULL} /* sentinel */
};
***************
*** 466,470 ****

static PyMethodDef sunaudiodev_methods[] = {
! { "open", sadopen, METH_OLDARGS },
{ 0, 0 },
};
--- 447,451 ----

static PyMethodDef sunaudiodev_methods[] = {
! { "open", sadopen, METH_VARARGS },
{ 0, 0 },
};

Index: threadmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/threadmodule.c,v
retrieving revision 2.47
retrieving revision 2.48
diff -C2 -d -r2.47 -r2.48
*** threadmodule.c 26 Mar 2002 14:52:00 -0000 2.47
--- threadmodule.c 31 Mar 2002 15:27:00 -0000 2.48
***************
*** 55,66 ****
lock_PyThread_acquire_lock(lockobject *self, PyObject *args)
{
! int i;

! if (args != NULL) {
! if (!PyArg_Parse(args, "i", &i))
! return NULL;
! }
! else
! i = 1;

Py_BEGIN_ALLOW_THREADS
--- 55,62 ----
lock_PyThread_acquire_lock(lockobject *self, PyObject *args)
{
! int i = 1;

! if (!PyArg_ParseTuple(args, "|i:acquire", &i))
! return NULL;

Py_BEGIN_ALLOW_THREADS
***************
*** 128,134 ****
static PyMethodDef lock_methods[] = {
{"acquire_lock", (PyCFunction)lock_PyThread_acquire_lock,
! METH_OLDARGS, acquire_doc},
{"acquire", (PyCFunction)lock_PyThread_acquire_lock,
! METH_OLDARGS, acquire_doc},
{"release_lock", (PyCFunction)lock_PyThread_release_lock,
METH_NOARGS, release_doc},
--- 124,130 ----
static PyMethodDef lock_methods[] = {
{"acquire_lock", (PyCFunction)lock_PyThread_acquire_lock,
! METH_VARARGS, acquire_doc},
{"acquire", (PyCFunction)lock_PyThread_acquire_lock,
! METH_VARARGS, acquire_doc},
{"release_lock", (PyCFunction)lock_PyThread_release_lock,
METH_NOARGS, release_doc},
***************
*** 280,284 ****
{
int sts;
! if (!PyArg_Parse(args, "i", &sts))
return NULL;
Py_Exit(sts); /* Calls PyThread_exit_prog(sts) or _PyThread_exit_prog(sts) */
--- 276,280 ----
{
int sts;
! if (!PyArg_ParseTuple(args, "i:exit_prog", &sts))
return NULL;
Py_Exit(sts); /* Calls PyThread_exit_prog(sts) or _PyThread_exit_prog(sts) */
***************
*** 340,344 ****
METH_NOARGS, get_ident_doc},
#ifndef NO_EXIT_PROG
! {"exit_prog", (PyCFunction)thread_PyThread_exit_prog},
#endif
{NULL, NULL} /* sentinel */
--- 336,341 ----
METH_NOARGS, get_ident_doc},
#ifndef NO_EXIT_PROG
! {"exit_prog", (PyCFunction)thread_PyThread_exit_prog,
! METH_VARARGS},
#endif
{NULL, NULL} /* sentinel */