Mercurial > cpython-lru_cache-weakref
diff Modules/parsermodule.c @ 6440:42bc792ac69f legacy-trunk
initparser(): Use PyErr_NewException() to create the exception.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Tue, 07 Oct 1997 19:32:00 +0000 |
| parents | 0e7e20049637 |
| children | c142eb533fb9 |
line wrap: on
line diff
--- a/Modules/parsermodule.c Tue Oct 07 19:12:50 1997 +0000 +++ b/Modules/parsermodule.c Tue Oct 07 19:32:00 1997 +0000 @@ -2632,7 +2632,7 @@ 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)) {
