Revert "bpo-46131: add fastpath for PyFloat_Check() (GH-30200)" (GH-30208)

This reverts commit 2ef06d4125.
This commit is contained in:
Raymond Hettinger 2021-12-19 15:05:46 -06:00 committed by GitHub
parent 2ef06d4125
commit 29ea68bd1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 0 additions and 23 deletions

View file

@ -85,7 +85,6 @@ _is_pep393 = None
Py_TPFLAGS_MANAGED_DICT = (1 << 4)
Py_TPFLAGS_HEAPTYPE = (1 << 9)
Py_TPFLAGS_FLOAT_SUBCLASS = (1 << 23)
Py_TPFLAGS_LONG_SUBCLASS = (1 << 24)
Py_TPFLAGS_LIST_SUBCLASS = (1 << 25)
Py_TPFLAGS_TUPLE_SUBCLASS = (1 << 26)
@ -380,8 +379,6 @@ class PyObjectPtr(object):
if tp_flags & Py_TPFLAGS_HEAPTYPE:
return HeapTypeObjectPtr
if tp_flags & Py_TPFLAGS_FLOAT_SUBCLASS:
return PyFloatObjectPtr
if tp_flags & Py_TPFLAGS_LONG_SUBCLASS:
return PyLongObjectPtr
if tp_flags & Py_TPFLAGS_LIST_SUBCLASS:
@ -913,16 +910,6 @@ class PyNoneStructPtr(PyObjectPtr):
def proxyval(self, visited):
return None
class PyFloatObjectPtr(PyObjectPtr):
_typename = 'PyFloatObject'
def proxyval(self, visited):
return self.field('ob_fval')
def write_repr(self, out, visited):
proxy = self.proxyval(visited)
out.write("%s" % proxy)
class PyFrameObjectPtr(PyObjectPtr):
_typename = 'PyFrameObject'