[Python-checkins] CVS: python/dist/src/Modules regexmodule.c,1.42,1.43

Thomas Wouters twouters@users.sourceforge.net
Mon, 09 Jul 2001 03:45:33 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv11772/Modules

Modified Files:
	regexmodule.c 
Log Message:

initregex(): Check return value of PyErr_Warn() and propagate the exception
(if any.)



Index: regexmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/regexmodule.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -r1.42 -r1.43
*** regexmodule.c	2001/01/22 15:29:14	1.42
--- regexmodule.c	2001/07/09 10:45:31	1.43
***************
*** 661,666 ****
  	d = PyModule_GetDict(m);
  
! 	PyErr_Warn(PyExc_DeprecationWarning,
! 		"the regex module is deprecated; please use the re module");
  	
  	/* Initialize regex.error exception */
--- 661,668 ----
  	d = PyModule_GetDict(m);
  
! 	if (PyErr_Warn(PyExc_DeprecationWarning,
! 		       "the regex module is deprecated; "
! 		       "please use the re module") < 0)
! 		return NULL;
  	
  	/* Initialize regex.error exception */