]> granicus.if.org Git - python/commitdiff
Use PyList_CheckExact and PyTuple_CheckExact for checking whether
authorMichael W. Hudson <mwh@python.net>
Tue, 5 Nov 2002 18:05:49 +0000 (18:05 +0000)
committerMichael W. Hudson <mwh@python.net>
Tue, 5 Nov 2002 18:05:49 +0000 (18:05 +0000)
PySequence_Fast needs to do anything siginificant.

Objects/abstract.c

index 9940fd3c95bdb39f592e71fb315f194e8f8f64e5..4f8dd3e533e49549e05d310490ab5feb3e401f96 100644 (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;
        }