summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-09-11 16:13:52 (GMT)
committerGuido van Rossum <guido@python.org>2001-09-11 16:13:52 (GMT)
commitdea6ef9bfd6f04d216e46bb9537d6991f2be6348 (patch)
treef90fbcd135632d62f9f84856e810a21ca5a7c31f /Objects/floatobject.c
parentae01046f7bf846dd984e89cf84e83d6ad0f45afd (diff)
downloadcpython-dea6ef9bfd6f04d216e46bb9537d6991f2be6348.zip
cpython-dea6ef9bfd6f04d216e46bb9537d6991f2be6348.tar.gz
cpython-dea6ef9bfd6f04d216e46bb9537d6991f2be6348.tar.bz2
Replace a few places where X->ob_type was compared to &PyXXX_Type with
calls to PyXXX_CheckExact(X).
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index beb35e9..d606547 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -775,7 +775,7 @@ PyFloat_Fini(void)
for (i = 0, p = &list->objects[0];
i < N_FLOATOBJECTS;
i++, p++) {
- if (p->ob_type == &PyFloat_Type && p->ob_refcnt != 0)
+ if (PyFloat_CheckExact(p) && p->ob_refcnt != 0)
frem++;
}
next = list->next;
@@ -785,7 +785,7 @@ PyFloat_Fini(void)
for (i = 0, p = &list->objects[0];
i < N_FLOATOBJECTS;
i++, p++) {
- if (p->ob_type != &PyFloat_Type ||
+ if (!PyFloat_CheckExact(p) ||
p->ob_refcnt == 0) {
p->ob_type = (struct _typeobject *)
free_list;
@@ -818,7 +818,7 @@ PyFloat_Fini(void)
for (i = 0, p = &list->objects[0];
i < N_FLOATOBJECTS;
i++, p++) {
- if (p->ob_type == &PyFloat_Type &&
+ if (PyFloat_CheckExact(p) &&
p->ob_refcnt != 0) {
char buf[100];
PyFloat_AsString(buf, p);