mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Python 2.0 is not supposed to use string exceptions in the standard library
& extensions, so create exceptions in extension modules using the PyErr_NewException() API.
This commit is contained in:
parent
28067821e2
commit
589c35bcc7
3 changed files with 3 additions and 3 deletions
|
@ -2195,7 +2195,7 @@ inital()
|
|||
|
||||
/* Add some symbolic constants to the module */
|
||||
d = PyModule_GetDict(m);
|
||||
ErrorObject = PyString_FromString("al.error");
|
||||
ErrorObject = PyErr_NewException("al.error", NULL, NULL);
|
||||
PyDict_SetItemString(d, "error", ErrorObject);
|
||||
|
||||
/* XXXX Add constants here */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue