Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0225a38

Browse files
committed
initparser(): Use PyErr_NewException() to create the exception.
1 parent b68b77f commit 0225a38

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/parsermodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2632,7 +2632,7 @@ initparser()
26322632
module = Py_InitModule("parser", parser_functions);
26332633
dict = PyModule_GetDict(module);
26342634

2635-
parser_error = PyString_FromString("parser.ParserError");
2635+
parser_error = PyErr_NewException("parser.ParserError", NULL, NULL);
26362636

26372637
if ((parser_error == 0)
26382638
|| (PyDict_SetItemString(dict, "ParserError", parser_error) != 0)) {

0 commit comments

Comments
 (0)