File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2329,7 +2329,7 @@ init_curses()
23292329 ModDict = d ; /* For PyCurses_InitScr */
23302330
23312331 /* For exception curses.error */
2332- PyCursesError = PyString_FromString ("_curses.error" );
2332+ PyCursesError = PyErr_NewException ("_curses.error" , NULL , NULL );
23332333 PyDict_SetItemString (d , "error" , PyCursesError );
23342334
23352335 /* Make the version available */
Original file line number Diff line number Diff line change @@ -2195,7 +2195,7 @@ inital()
21952195
21962196 /* Add some symbolic constants to the module */
21972197 d = PyModule_GetDict (m );
2198- ErrorObject = PyString_FromString ("al.error" );
2198+ ErrorObject = PyErr_NewException ("al.error" , NULL , NULL );
21992199 PyDict_SetItemString (d , "error" , ErrorObject );
22002200
22012201 /* XXXX Add constants here */
Original file line number Diff line number Diff line change @@ -654,7 +654,7 @@ initpcre()
654654
655655 /* Add some symbolic constants to the module */
656656 d = PyModule_GetDict (m );
657- ErrorObject = PyString_FromString ("pcre.error" );
657+ ErrorObject = PyErr_NewException ("pcre.error" , NULL , NULL );
658658 PyDict_SetItemString (d , "error" , ErrorObject );
659659
660660 /* Insert the flags */
You can’t perform that action at this time.
0 commit comments