[Python-checkins] python/dist/src/Objects complexobject.c,2.53.4.4,2.53.4.5

anthonybaxter@sourceforge.net anthonybaxter@sourceforge.net
Wed, 17 Apr 2002 22:39:57 -0700


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

Modified Files:
      Tag: release22-maint
	complexobject.c 
Log Message:
backport gvanrossum's patch:

Deprecate % as well.  The message for deprecation of //, % and divmod
is the same in all three cases (mostly because // calls divmod :-).

Original patches were:
python/dist/src/Objects/complexobject.c:2.59


Index: complexobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v
retrieving revision 2.53.4.4
retrieving revision 2.53.4.5
diff -C2 -d -r2.53.4.4 -r2.53.4.5
*** complexobject.c	18 Apr 2002 05:37:51 -0000	2.53.4.4
--- complexobject.c	18 Apr 2002 05:39:54 -0000	2.53.4.5
***************
*** 400,403 ****
--- 400,408 ----
  {
          Py_complex div, mod;
+ 
+ 	if (PyErr_Warn(PyExc_DeprecationWarning,
+ 		       "complex divmod(), // and % are deprecated") < 0)
+ 		return NULL;
+ 
  	errno = 0;
  	div = c_quot(v->cval,w->cval); /* The raw divisor value. */
***************
*** 421,425 ****
  
  	if (PyErr_Warn(PyExc_DeprecationWarning,
! 		       "complex divmod() and // are deprecated") < 0)
  		return NULL;
  
--- 426,430 ----
  
  	if (PyErr_Warn(PyExc_DeprecationWarning,
! 		       "complex divmod(), // and % are deprecated") < 0)
  		return NULL;