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

Fred L. Drake fdrake@users.sourceforge.net
2001年10月05日 14:50:10 -0700


Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv24355/Python
Modified Files:
	exceptions.c 
Log Message:
weakref.ReferenceError becomes a built-in exception now that weak ref objects
are moving into the core; with these changes, it will be possible for the
exception to be raised without the weakref module ever being imported.
Index: exceptions.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/exceptions.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** exceptions.c	2001年08月23日 02:55:39	1.26
--- exceptions.c	2001年10月05日 21:50:08	1.27
***************
*** 98,101 ****
--- 98,102 ----
 | | +-- UnicodeError\n\
 | |\n\
+ | +-- ReferenceError\n\
 | +-- SystemError\n\
 | +-- MemoryError\n\
***************
*** 890,893 ****
--- 891,897 ----
 
 static char
+ ReferenceError__doc__[] = "Weak ref proxy used after referent went away.";
+ 
+ static char
 MemoryError__doc__[] = "Out of memory.";
 
***************
*** 957,960 ****
--- 961,965 ----
 PyObject *PyExc_IndentationError;
 PyObject *PyExc_TabError;
+ PyObject *PyExc_ReferenceError;
 PyObject *PyExc_SystemError;
 PyObject *PyExc_SystemExit;
***************
*** 1045,1048 ****
--- 1050,1054 ----
 {"ValueError", &PyExc_ValueError, 0, ValueError__doc__},
 {"UnicodeError", &PyExc_UnicodeError, &PyExc_ValueError, UnicodeError__doc__},
+ {"ReferenceError", &PyExc_ReferenceError, 0, ReferenceError__doc__},
 {"SystemError", &PyExc_SystemError, 0, SystemError__doc__},
 {"MemoryError", &PyExc_MemoryError, 0, MemoryError__doc__},

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