From: Michael W. Hudson Date: Tue, 5 Nov 2002 18:05:49 +0000 (+0000) Subject: Use PyList_CheckExact and PyTuple_CheckExact for checking whether X-Git-Tag: v2.3c1~3576 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2801fe1c8f7d629e396ed514c4df25b43547970a;p=python Use PyList_CheckExact and PyTuple_CheckExact for checking whether PySequence_Fast needs to do anything siginificant. --- diff --git a/Objects/abstract.c b/Objects/abstract.c index 9940fd3c95..4f8dd3e533 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -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; }