mirror of https://github.com/python/cpython
initparser(): Use PyErr_NewException() to create the exception.
This commit is contained in:
parent
b68b77f62d
commit
0225a38907
|
@ -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)) {
|
||||||
|
|
Loading…
Reference in New Issue