[Python-checkins] CVS: python/dist/src/Include floatobject.h,2.19,2.20
Tim Peters
tim_one@users.sourceforge.net
Mon, 10 Sep 2001 14:28:22 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv1287/python/Include
Modified Files:
floatobject.h
Log Message:
More for SF bug [#460020] bug or feature: unicode() and subclasses
Repair float constructor to return a true float when passed a subclass
instance. New PyFloat_CheckExact macro.
Index: floatobject.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/floatobject.h,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -d -r2.19 -r2.20
*** floatobject.h 2001/08/29 15:45:32 2.19
--- floatobject.h 2001/09/10 21:28:20 2.20
***************
*** 20,23 ****
--- 20,24 ----
#define PyFloat_Check(op) PyObject_TypeCheck(op, &PyFloat_Type)
+ #define PyFloat_CheckExact(op) ((op)->ob_type == &PyFloat_Type)
/* Return Python float from string PyObject. Second argument ignored on