diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2002-03-25 20:46:46 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2002-03-25 20:46:46 (GMT) |
commit | 3a6f97850b2a4071f3015033fa3d68ce6fa576f4 (patch) | |
tree | 46311b5e874d4c733748e5a20de70336bf282323 /Modules/_localemodule.c | |
parent | 57f8e06e4f797abe4d2cbb41a298c5541f69b7f6 (diff) | |
download | cpython-3a6f97850b2a4071f3015033fa3d68ce6fa576f4.zip cpython-3a6f97850b2a4071f3015033fa3d68ce6fa576f4.tar.gz cpython-3a6f97850b2a4071f3015033fa3d68ce6fa576f4.tar.bz2 |
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 c617bfb..cfbef9f 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, |