diff Include/floatobject.h @ 19839:10f5927dbf05 legacy-trunk

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.
author Tim Peters <tim.peters@gmail.com>
date Mon, 10 Sep 2001 21:28:20 +0000
parents 19d271f297dc
children c1eb668525e1
line wrap: on
line diff
--- a/Include/floatobject.h	Mon Sep 10 21:03:06 2001 +0000
+++ b/Include/floatobject.h	Mon Sep 10 21:28:20 2001 +0000
@@ -19,6 +19,7 @@
 extern DL_IMPORT(PyTypeObject) PyFloat_Type;
 
 #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
    input, and, if non-NULL, NULL is stored into *junk (this tried to serve a