Skip to content

Commit a10f52e

Browse files
committed
Remove PyArg_NoArgs() and PyArg_GetInt()
1 parent e7086d4 commit a10f52e

File tree

3 files changed

+2
-11
lines changed

3 files changed

+2
-11
lines changed

Include/Python.h

-7
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,6 @@
131131
/* _Py_Mangle is defined in compile.c */
132132
PyAPI_FUNC(PyObject*) _Py_Mangle(PyObject *p, PyObject *name);
133133

134-
/* PyArg_GetInt is deprecated and should not be used, use PyArg_Parse(). */
135-
#define PyArg_GetInt(v, a) PyArg_Parse((v), "i", (a))
136-
137-
/* PyArg_NoArgs should not be necessary.
138-
Set ml_flags in the PyMethodDef to METH_NOARGS. */
139-
#define PyArg_NoArgs(v) PyArg_Parse(v, "")
140-
141134
/* Convert a possibly signed character to a nonnegative int */
142135
/* XXX This assumes characters are 8 bits wide */
143136
#ifdef __CHAR_UNSIGNED__

Modules/cstubs

-2
Original file line numberDiff line numberDiff line change
@@ -472,8 +472,6 @@ endpick_select(args, func)
472472
{
473473
PyObject *v, *w;
474474
int i, nhits, n;
475-
if (!PyArg_NoArgs(args))
476-
return NULL;
477475
if (pickbuffer == NULL) {
478476
PyErr_SetString(PyExc_RuntimeError,
479477
"endpick/endselect: not in pick/select mode");

RISCOS/Modules/riscosmodule.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ static PyObject *canon(char *path)
7979
}
8080

8181
static PyObject *riscos_getcwd(PyObject *self,PyObject *args)
82-
{ if(!PyArg_NoArgs(args)) return NULL;
82+
{
8383
return canon("@");
8484
}
8585

@@ -354,7 +354,7 @@ static PyMethodDef riscos_methods[] = {
354354
{"system", riscos_system},
355355
{"rmdir", riscos_remove},
356356
{"chdir", riscos_chdir},
357-
{"getcwd", riscos_getcwd},
357+
{"getcwd", riscos_getcwd, METH_NOARGS},
358358
{"expand", riscos_expand},
359359
{"mkdir", riscos_mkdir,1},
360360
{"listdir", riscos_listdir},

0 commit comments

Comments
 (0)