Skip to content

Commit 4e542a3

Browse files
committed
replace constant 1 with symbolic constant METH_VARARGS
another typo caught by Rob Hooft
1 parent 9262b8a commit 4e542a3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Python/exceptions.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static PyObject* get_self(PyObject* args)
189189
*
190190
* First thing we create is the base class for all exceptions, called
191191
* appropriately enough: Exception. Creation of this class makes no
192-
* assumptions about the existance of any other exception class -- except
192+
* assumptions about the existence of any other exception class -- except
193193
* for TypeError, which can conditionally exist.
194194
*
195195
* Next, StandardError is created (which is quite simple) followed by
@@ -282,9 +282,9 @@ Exception__getitem__(PyObject* self, PyObject* args)
282282
static PyMethodDef
283283
Exception_methods[] = {
284284
/* methods for the Exception class */
285-
{ "__getitem__", Exception__getitem__, 1},
286-
{ "__str__", Exception__str__, 1},
287-
{ "__init__", Exception__init__, 1},
285+
{ "__getitem__", Exception__getitem__, METH_VARARGS},
286+
{ "__str__", Exception__str__, METH_VARARGS},
287+
{ "__init__", Exception__init__, METH_VARARGS},
288288
{ NULL, NULL }
289289
};
290290

@@ -396,7 +396,7 @@ SystemExit__init__(PyObject* self, PyObject* args)
396396

397397

398398
PyMethodDef SystemExit_methods[] = {
399-
{ "__init__", SystemExit__init__, 1},
399+
{ "__init__", SystemExit__init__, METH_VARARGS},
400400
{NULL, NULL}
401401
};
402402

@@ -576,8 +576,8 @@ EnvironmentError__str__(PyObject* self, PyObject* args)
576576

577577
static
578578
PyMethodDef EnvironmentError_methods[] = {
579-
{"__init__", EnvironmentError__init__, 1},
580-
{"__str__", EnvironmentError__str__, 1},
579+
{"__init__", EnvironmentError__init__, METH_VARARGS},
580+
{"__str__", EnvironmentError__str__, METH_VARARGS},
581581
{NULL, NULL}
582582
};
583583

@@ -726,8 +726,8 @@ SyntaxError__str__(PyObject* self, PyObject* args)
726726

727727

728728
PyMethodDef SyntaxError_methods[] = {
729-
{"__init__", SyntaxError__init__, 1},
730-
{"__str__", SyntaxError__str__, 1},
729+
{"__init__", SyntaxError__init__, METH_VARARGS},
730+
{"__str__", SyntaxError__str__, METH_VARARGS},
731731
{NULL, NULL}
732732
};
733733

0 commit comments

Comments
 (0)