summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael W. Hudson <mwh@python.net>2002-11-05 18:05:49 (GMT)
committerMichael W. Hudson <mwh@python.net>2002-11-05 18:05:49 (GMT)
commit2801fe1c8f7d629e396ed514c4df25b43547970a (patch)
tree04a2d2e97ad200620866a5dfb3fa1ed12bd5afb8
parent18c7d98bd1d6611018bb2417d4207eed0482e6e9 (diff)
downloadcpython-2801fe1c8f7d629e396ed514c4df25b43547970a.zip
cpython-2801fe1c8f7d629e396ed514c4df25b43547970a.tar.gz
cpython-2801fe1c8f7d629e396ed514c4df25b43547970a.tar.bz2
Use PyList_CheckExact and PyTuple_CheckExact for checking whether
PySequence_Fast needs to do anything siginificant.
-rw-r--r--Objects/abstract.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 9940fd3..4f8dd3e 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;
}