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

Anthony Baxter anthonybaxter@users.sourceforge.net
2001年11月01日 06:55:05 -0800


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv14062
Modified Files:
 Tag: release21-maint
	regexmodule.c 
Log Message:
backport of (merged) 1.43 and 1.44
 initregex(): this function is declared void, so the recent change to
 return NULL in an error case was itself an error.
 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.42.4.1
diff -C2 -d -r1.42 -r1.42.4.1
*** regexmodule.c	2001年01月22日 15:29:14	1.42
--- regexmodule.c	2001年11月01日 14:55:03	1.42.4.1
***************
*** 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;
 	
 	/* Initialize regex.error exception */

AltStyle によって変換されたページ (->オリジナル) /