diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_cursesmodule.c | 2 | ||||
-rw-r--r-- | Modules/almodule.c | 2 | ||||
-rw-r--r-- | Modules/pcremodule.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_cursesmodule.c b/Modules/_cursesmodule.c index f98f12e..330f6a2 100644 --- a/Modules/_cursesmodule.c +++ b/Modules/_cursesmodule.c @@ -2329,7 +2329,7 @@ init_curses() ModDict = d; /* For PyCurses_InitScr */ /* For exception curses.error */ - PyCursesError = PyString_FromString("_curses.error"); + PyCursesError = PyErr_NewException("_curses.error", NULL, NULL); PyDict_SetItemString(d, "error", PyCursesError); /* Make the version available */ diff --git a/Modules/almodule.c b/Modules/almodule.c index 13c9ebc..453a416 100644 --- a/Modules/almodule.c +++ b/Modules/almodule.c @@ -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 */ diff --git a/Modules/pcremodule.c b/Modules/pcremodule.c index 901f674..6fb2d07 100644 --- a/Modules/pcremodule.c +++ b/Modules/pcremodule.c @@ -654,7 +654,7 @@ initpcre() /* Add some symbolic constants to the module */ d = PyModule_GetDict(m); - ErrorObject = PyString_FromString("pcre.error"); + ErrorObject = PyErr_NewException("pcre.error", NULL, NULL); PyDict_SetItemString(d, "error", ErrorObject); /* Insert the flags */ |