diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-27 13:09:36 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-12-27 13:09:36 (GMT) |
commit | 994f04dbf576f4ebafb9de2bc6821e15cb0de0ea (patch) | |
tree | 4967ed9c9688f7fe035c646de993c337141051b0 /Modules/dlmodule.c | |
parent | 58c2c6ebb893917e759cc1401b0d862b3f7c1a94 (diff) | |
download | cpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.zip cpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.tar.gz cpython-994f04dbf576f4ebafb9de2bc6821e15cb0de0ea.tar.bz2 |
Issue #28998: More APIs now support longs as well as ints.
Diffstat (limited to 'Modules/dlmodule.c')
-rw-r--r-- | Modules/dlmodule.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c index dfecf9d..7a6686e 100644 --- a/Modules/dlmodule.c +++ b/Modules/dlmodule.c @@ -107,8 +107,11 @@ dl_call(dlobject *xp, PyObject *args) } for (i = 1; i < n; i++) { PyObject *v = PyTuple_GetItem(args, i); - if (PyInt_Check(v)) + if (PyInt_Check(v) || PyLong_Check(v)) { alist[i-1] = PyInt_AsLong(v); + if (alist[i-1] == -1 && PyErr_Occurred()) + return NULL; + } else if (PyString_Check(v)) alist[i-1] = (long)PyString_AsString(v); else if (v == Py_None) |