@@ -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)
282282static PyMethodDef
283283Exception_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
398398PyMethodDef 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
577577static
578578PyMethodDef 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
728728PyMethodDef 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