summaryrefslogtreecommitdiffstats
path: root/Modules/_randommodule.c
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-08-31 04:32:55 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2007-08-31 04:32:55 (GMT)
commit1fe5f388529dcdf674d53f7d67abc16c9c6ca5e5 (patch)
treeb35d6a88c4ded09687f9916e4d4c0b03bafde580 /Modules/_randommodule.c
parent538d17aa233e99a0652d0c6d482845e8e909b6e0 (diff)
downloadcpython-1fe5f388529dcdf674d53f7d67abc16c9c6ca5e5.zip
cpython-1fe5f388529dcdf674d53f7d67abc16c9c6ca5e5.tar.gz
cpython-1fe5f388529dcdf674d53f7d67abc16c9c6ca5e5.tar.bz2
Remove checking redundantly for checks of PyInt and PyLong.
Diffstat (limited to 'Modules/_randommodule.c')
-rw-r--r--Modules/_randommodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c
index 95b7ade..bd4d17e 100644
--- a/Modules/_randommodule.c
+++ b/Modules/_randommodule.c
@@ -231,7 +231,7 @@ random_seed(RandomObject *self, PyObject *args)
/* If the arg is an int or long, use its absolute value; else use
* the absolute value of its hash code.
*/
- if (PyInt_Check(arg) || PyLong_Check(arg))
+ if (PyLong_Check(arg))
n = PyNumber_Absolute(arg);
else {
long hash = PyObject_Hash(arg);
@@ -401,7 +401,7 @@ random_jumpahead(RandomObject *self, PyObject *n)
PyObject *remobj;
unsigned long *mt, tmp;
- if (!PyInt_Check(n) && !PyLong_Check(n)) {
+ if (!PyLong_Check(n)) {
PyErr_Format(PyExc_TypeError, "jumpahead requires an "
"integer, not '%s'",
Py_Type(n)->tp_name);