initparser(): Use PyErr_NewException() to create the exception.

This commit is contained in:
Fred Drake 1997-10-07 19:32:00 +00:00
parent b68b77f62d
commit 0225a38907
1 changed files with 1 additions and 1 deletions

View File

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