]> granicus.if.org Git - python/commitdiff
initparser(): Use PyErr_NewException() to create the exception.
authorFred Drake <fdrake@acm.org>
Tue, 7 Oct 1997 19:32:00 +0000 (19:32 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 7 Oct 1997 19:32:00 +0000 (19:32 +0000)
Modules/parsermodule.c

index d1f11548dc9a98b9a8d274c9ffd924b7218f6b6c..6c885dfbe54cfb8fba6ef33578386a6b68bee997 100644 (file)
@@ -2632,7 +2632,7 @@ initparser()
     module = Py_InitModule("parser", parser_functions);
     dict = PyModule_GetDict(module);
 
-    parser_error = PyString_FromString("parser.ParserError");
+    parser_error = PyErr_NewException("parser.ParserError", NULL, NULL);
 
     if ((parser_error == 0)
        || (PyDict_SetItemString(dict, "ParserError", parser_error) != 0)) {