mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Use PyList_CheckExact and PyTuple_CheckExact for checking whether
PySequence_Fast needs to do anything siginificant.
This commit is contained in:
parent
18c7d98bd1
commit
2801fe1c8f
1 changed files with 1 additions and 1 deletions
|
@ -1436,7 +1436,7 @@ PySequence_Fast(PyObject *v, const char *m)
|
|||
if (v == NULL)
|
||||
return null_error();
|
||||
|
||||
if (PyList_Check(v) || PyTuple_Check(v)) {
|
||||
if (PyList_CheckExact(v) || PyTuple_CheckExact(v)) {
|
||||
Py_INCREF(v);
|
||||
return v;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue