diff options
author | Georg Brandl <georg@python.org> | 2007-10-23 19:24:22 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2007-10-23 19:24:22 (GMT) |
commit | e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f (patch) | |
tree | b189190df6a08b5249bef4e33385049f4ccf3d04 /Modules/cjkcodecs | |
parent | 083bea49a8b74a5f758c6641c299f0cc8c114616 (diff) | |
download | cpython-e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f.zip cpython-e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f.tar.gz cpython-e1a0d11c5cceeb71b22f3e3148f8f7d6bc0b4d8f.tar.bz2 |
#1316: remove redundant PyLong_Check calls when PyInt_Check was already called.
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index 4778efb..7ab3145 100644 --- a/Modules/cjkcodecs/multibytecodec.c +++ b/Modules/cjkcodecs/multibytecodec.c @@ -313,8 +313,7 @@ multibytecodec_encerror(MultibyteCodec *codec, if (!PyTuple_Check(retobj) || PyTuple_GET_SIZE(retobj) != 2 || !PyUnicode_Check((tobj = PyTuple_GET_ITEM(retobj, 0))) || - !(PyInt_Check(PyTuple_GET_ITEM(retobj, 1)) || - PyLong_Check(PyTuple_GET_ITEM(retobj, 1)))) { + !PyInt_Check(PyTuple_GET_ITEM(retobj, 1))) { PyErr_SetString(PyExc_TypeError, "encoding error handler must return " "(unicode, int) tuple"); @@ -433,8 +432,7 @@ multibytecodec_decerror(MultibyteCodec *codec, if (!PyTuple_Check(retobj) || PyTuple_GET_SIZE(retobj) != 2 || !PyUnicode_Check((retuni = PyTuple_GET_ITEM(retobj, 0))) || - !(PyInt_Check(PyTuple_GET_ITEM(retobj, 1)) || - PyLong_Check(PyTuple_GET_ITEM(retobj, 1)))) { + !PyInt_Check(PyTuple_GET_ITEM(retobj, 1))) { PyErr_SetString(PyExc_TypeError, "decoding error handler must return " "(unicode, int) tuple"); |