diff options
author | Guido van Rossum <guido@python.org> | 2001-08-28 16:37:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-28 16:37:51 (GMT) |
commit | cbfc855f57ab6ad7920857bba3a8e2475ef0fb33 (patch) | |
tree | 033be7a0a2b8e08608af914926c56061878fdbf2 /Python/getargs.c | |
parent | 63db7b9ca13cf319aeef9bab4aa107502d3f5907 (diff) | |
download | cpython-cbfc855f57ab6ad7920857bba3a8e2475ef0fb33.zip cpython-cbfc855f57ab6ad7920857bba3a8e2475ef0fb33.tar.gz cpython-cbfc855f57ab6ad7920857bba3a8e2475ef0fb33.tar.bz2 |
The "O!" format code should implement an isinstance() test
rather than a type equality test.
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index 9f76ac0..a4dc57a 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -875,7 +875,7 @@ convertsimple(PyObject *arg, char **p_format, va_list *p_va, char *msgbuf) type = va_arg(*p_va, PyTypeObject*); p = va_arg(*p_va, PyObject **); format++; - if (arg->ob_type == type) + if (PyType_IsSubtype(arg->ob_type, type)) *p = arg; else return converterr(type->tp_name, arg, msgbuf); |