mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
initparser(): Use PyErr_NewException() to create the exception.
This commit is contained in:
parent
b68b77f62d
commit
0225a38907
1 changed files with 1 additions and 1 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue