[Python-checkins] CVS: python/dist/src/Modules _cursesmodule.c,2.29,2.30 almodule.c,1.26,1.27 pcremodule.c,2.20,2.21

Fred L. Drake python-dev@python.org
Thu, 6 Jul 2000 12:38:54 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory slayer.i.sourceforge.net:/tmp/cvs-serv14639

Modified Files:
	_cursesmodule.c almodule.c pcremodule.c 
Log Message:

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.


Index: _cursesmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/_cursesmodule.c,v
retrieving revision 2.29
retrieving revision 2.30
diff -C2 -r2.29 -r2.30
*** _cursesmodule.c	2000/07/06 18:14:03	2.29
--- _cursesmodule.c	2000/07/06 19:38:49	2.30
***************
*** 2330,2334 ****
  
  	/* For exception curses.error */
! 	PyCursesError = PyString_FromString("_curses.error");
  	PyDict_SetItemString(d, "error", PyCursesError);
  
--- 2330,2334 ----
  
  	/* For exception curses.error */
! 	PyCursesError = PyErr_NewException("_curses.error", NULL, NULL);
  	PyDict_SetItemString(d, "error", PyCursesError);
  

Index: almodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/almodule.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** almodule.c	2000/06/30 23:58:05	1.26
--- almodule.c	2000/07/06 19:38:49	1.27
***************
*** 2196,2200 ****
  	/* Add some symbolic constants to the module */
  	d = PyModule_GetDict(m);
! 	ErrorObject = PyString_FromString("al.error");
  	PyDict_SetItemString(d, "error", ErrorObject);
  
--- 2196,2200 ----
  	/* Add some symbolic constants to the module */
  	d = PyModule_GetDict(m);
! 	ErrorObject = PyErr_NewException("al.error", NULL, NULL);
  	PyDict_SetItemString(d, "error", ErrorObject);
  

Index: pcremodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pcremodule.c,v
retrieving revision 2.20
retrieving revision 2.21
diff -C2 -r2.20 -r2.21
*** pcremodule.c	2000/06/30 23:50:38	2.20
--- pcremodule.c	2000/07/06 19:38:49	2.21
***************
*** 655,659 ****
  	/* Add some symbolic constants to the module */
  	d = PyModule_GetDict(m);
! 	ErrorObject = PyString_FromString("pcre.error");
  	PyDict_SetItemString(d, "error", ErrorObject);
  
--- 655,659 ----
  	/* Add some symbolic constants to the module */
  	d = PyModule_GetDict(m);
! 	ErrorObject = PyErr_NewException("pcre.error", NULL, NULL);
  	PyDict_SetItemString(d, "error", ErrorObject);