mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
bpo-46131: add fastpath for PyFloat_Check() (#30200)
This commit is contained in:
parent
aeb9ef4c72
commit
2ef06d4125
7 changed files with 23 additions and 0 deletions
|
@ -14,6 +14,8 @@ extern "C" {
|
|||
PyAPI_DATA(PyTypeObject) PyFloat_Type;
|
||||
|
||||
#define PyFloat_Check(op) PyObject_TypeCheck(op, &PyFloat_Type)
|
||||
#define PyFloat_Check(op) \
|
||||
PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_FLOAT_SUBCLASS)
|
||||
#define PyFloat_CheckExact(op) Py_IS_TYPE(op, &PyFloat_Type)
|
||||
|
||||
#ifdef Py_NAN
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue