diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-09-10 21:28:20 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-09-10 21:28:20 +0000 |
commit | 3f4bf033fb91a41c0b6f3332f0ed27aa40cfbdeb (patch) | |
tree | a7496759e046edb8b57447549a377f80a13fb0bb /Include/floatobject.h | |
parent | e8a326582f09650bfcffb3ce69c9a6b797e104d7 (diff) | |
download | cpython-3f4bf033fb91a41c0b6f3332f0ed27aa40cfbdeb.tar.gz |
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.
Diffstat (limited to 'Include/floatobject.h')
-rw-r--r-- | Include/floatobject.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Include/floatobject.h b/Include/floatobject.h index 9f67bc107d..bd4a782846 100644 --- a/Include/floatobject.h +++ b/Include/floatobject.h @@ -19,6 +19,7 @@ typedef struct { 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 |