[Python-checkins] CVS: python/dist/src/Python exceptions.c,1.25,1.26

Guido van Rossum gvanrossum@users.sourceforge.net
Wed, 22 Aug 2001 19:55:41 -0700


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

Modified Files:
	exceptions.c 
Log Message:
Introduce OverflowWarning -- to be issued when short int operations
are overflowing and a long int operation is substituted.


Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** exceptions.c	2001/08/02 04:15:00	1.25
--- exceptions.c	2001/08/23 02:55:39	1.26
***************
*** 106,109 ****
--- 106,110 ----
        +-- DeprecationWarning\n\
        +-- SyntaxWarning\n\
+       +-- OverflowWarning\n\
        +-- RuntimeWarning";
  
***************
*** 913,916 ****
--- 914,920 ----
  
  static char
+ OverflowWarning__doc__[] = "Base class for warnings about numeric overflow.";
+ 
+ static char
  RuntimeWarning__doc__[] =
  "Base class for warnings about dubious runtime behavior.";
***************
*** 974,977 ****
--- 978,982 ----
  PyObject *PyExc_DeprecationWarning;
  PyObject *PyExc_SyntaxWarning;
+ PyObject *PyExc_OverflowWarning;
  PyObject *PyExc_RuntimeWarning;
  
***************
*** 1048,1051 ****
--- 1053,1058 ----
    DeprecationWarning__doc__},
   {"SyntaxWarning", &PyExc_SyntaxWarning, &PyExc_Warning, SyntaxWarning__doc__},
+  {"OverflowWarning", &PyExc_OverflowWarning, &PyExc_Warning,
+   OverflowWarning__doc__},
   {"RuntimeWarning", &PyExc_RuntimeWarning, &PyExc_Warning,
    RuntimeWarning__doc__},