Use PyList_CheckExact and PyTuple_CheckExact for checking whether

PySequence_Fast needs to do anything siginificant.
This commit is contained in:
Michael W. Hudson 2002-11-05 18:05:49 +00:00
parent 18c7d98bd1
commit 2801fe1c8f
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}