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

Thomas Wouters twouters@users.sourceforge.net
2001年7月09日 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 */

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