diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-03-25 20:46:46 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-03-25 20:46:46 +0000 |
commit | 994a1a42194d0ccd9a51ccf419cced75280b5889 (patch) | |
tree | 3d7842524ae61172e5df713929922b7ee6b684e2 /Modules/_localemodule.c | |
parent | cdad8726aadc977d2b76d1eb818e79d1486a2cf0 (diff) | |
download | cpython-994a1a42194d0ccd9a51ccf419cced75280b5889.tar.gz |
Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.
Diffstat (limited to 'Modules/_localemodule.c')
-rw-r--r-- | Modules/_localemodule.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c index c617bfb47f..cfbef9f432 100644 --- a/Modules/_localemodule.c +++ b/Modules/_localemodule.c @@ -245,15 +245,12 @@ static char localeconv__doc__[] = ; static PyObject* -PyLocale_localeconv(PyObject* self, PyObject* args) +PyLocale_localeconv(PyObject* self) { PyObject* result; struct lconv *l; PyObject *x; - if (!PyArg_NoArgs(args)) - return NULL; - result = PyDict_New(); if (!result) return NULL; @@ -368,14 +365,11 @@ PyLocale_strxfrm(PyObject* self, PyObject* args) #if defined(MS_WIN32) static PyObject* -PyLocale_getdefaultlocale(PyObject* self, PyObject* args) +PyLocale_getdefaultlocale(PyObject* self) { char encoding[100]; char locale[100]; - if (!PyArg_NoArgs(args)) - return NULL; - PyOS_snprintf(encoding, sizeof(encoding), "cp%d", GetACP()); if (GetLocaleInfo(LOCALE_USER_DEFAULT, @@ -408,7 +402,7 @@ PyLocale_getdefaultlocale(PyObject* self, PyObject* args) #if defined(macintosh) static PyObject* -PyLocale_getdefaultlocale(PyObject* self, PyObject* args) +PyLocale_getdefaultlocale(PyObject* self) { return Py_BuildValue("Os", Py_None, PyMac_getscript()); } @@ -530,13 +524,13 @@ static struct PyMethodDef PyLocale_Methods[] = { {"setlocale", (PyCFunction) PyLocale_setlocale, METH_VARARGS, setlocale__doc__}, {"localeconv", (PyCFunction) PyLocale_localeconv, - 0, localeconv__doc__}, + METH_NOARGS, localeconv__doc__}, {"strcoll", (PyCFunction) PyLocale_strcoll, METH_VARARGS, strcoll__doc__}, {"strxfrm", (PyCFunction) PyLocale_strxfrm, METH_VARARGS, strxfrm__doc__}, #if defined(MS_WIN32) || defined(macintosh) - {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, 0}, + {"_getdefaultlocale", (PyCFunction) PyLocale_getdefaultlocale, METH_NOARGS}, #endif #ifdef HAVE_LANGINFO_H {"nl_langinfo", (PyCFunction) PyLocale_nl_langinfo, |