diff Python/exceptions.c @ 13182:1e302d996d58 legacy-trunk

replace constant 1 with symbolic constant METH_VARARGS another typo caught by Rob Hooft
author Jeremy Hylton <jeremy@alum.mit.edu>
date Fri, 30 Jun 2000 04:59:59 +0000
parents f31ffb37d72c
children 3e07a7315af5
line wrap: on
line diff
--- a/Python/exceptions.c	Fri Jun 30 04:59:17 2000 +0000
+++ b/Python/exceptions.c	Fri Jun 30 04:59:59 2000 +0000
@@ -189,7 +189,7 @@
  *
  * First thing we create is the base class for all exceptions, called
  * appropriately enough: Exception.  Creation of this class makes no
- * assumptions about the existance of any other exception class -- except
+ * assumptions about the existence of any other exception class -- except
  * for TypeError, which can conditionally exist.
  *
  * Next, StandardError is created (which is quite simple) followed by
@@ -282,9 +282,9 @@
 static PyMethodDef
 Exception_methods[] = {
     /* methods for the Exception class */
-    { "__getitem__", Exception__getitem__, 1},
-    { "__str__",     Exception__str__, 1},
-    { "__init__",    Exception__init__, 1},
+    { "__getitem__", Exception__getitem__, METH_VARARGS},
+    { "__str__",     Exception__str__, METH_VARARGS},
+    { "__init__",    Exception__init__, METH_VARARGS},
     { NULL, NULL }
 };
 
@@ -396,7 +396,7 @@
 
 
 PyMethodDef SystemExit_methods[] = {
-    { "__init__", SystemExit__init__, 1},
+    { "__init__", SystemExit__init__, METH_VARARGS},
     {NULL, NULL}
 };
 
@@ -576,8 +576,8 @@
 
 static
 PyMethodDef EnvironmentError_methods[] = {
-    {"__init__", EnvironmentError__init__, 1},
-    {"__str__",  EnvironmentError__str__, 1},
+    {"__init__", EnvironmentError__init__, METH_VARARGS},
+    {"__str__",  EnvironmentError__str__, METH_VARARGS},
     {NULL, NULL}
 };
 
@@ -726,8 +726,8 @@
 
 
 PyMethodDef SyntaxError_methods[] = {
-    {"__init__", SyntaxError__init__, 1},
-    {"__str__",  SyntaxError__str__, 1},
+    {"__init__", SyntaxError__init__, METH_VARARGS},
+    {"__str__",  SyntaxError__str__, METH_VARARGS},
     {NULL, NULL}
 };