mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Issue #27006: Do not use PyDec_CheckExact() on a type.
This commit is contained in:
parent
6817c59cf0
commit
947f099d99
1 changed files with 1 additions and 1 deletions
|
|
@ -2637,7 +2637,7 @@ dec_from_float(PyObject *type, PyObject *pyfloat)
|
|||
|
||||
CURRENT_CONTEXT(context);
|
||||
result = PyDecType_FromFloatExact(&PyDec_Type, pyfloat, context);
|
||||
if (!PyDec_CheckExact(type) && result != NULL) {
|
||||
if (type != (PyObject *)&PyDec_Type && result != NULL) {
|
||||
Py_SETREF(result, PyObject_CallFunctionObjArgs(type, result, NULL));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue