summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-05 20:41:38 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-05 20:41:38 (GMT)
commitb1c469843ff56e1704108324bce3ebb87aa753a6 (patch)
tree860387955d4ba06ef9ff5064ea78ea20aa00f4ba /Python
parente138f369e65cef61740341cbf73d5f2c29d14a5b (diff)
downloadcpython-b1c469843ff56e1704108324bce3ebb87aa753a6.zip
cpython-b1c469843ff56e1704108324bce3ebb87aa753a6.tar.gz
cpython-b1c469843ff56e1704108324bce3ebb87aa753a6.tar.bz2
Introduced the oddly-missing PyList_CheckExact(), and used it to replace
a hard-coded type check.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index b3e35c2..25ba4a0 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -989,7 +989,7 @@ eval_frame(PyFrameObject *f)
case BINARY_SUBSCR:
w = POP();
v = POP();
- if (v->ob_type == &PyList_Type && PyInt_CheckExact(w)) {
+ if (PyList_CheckExact(v) && PyInt_CheckExact(w)) {
/* INLINE: list[int] */
long i = PyInt_AsLong(w);
if (i < 0)