diff options
| author | Mark Dickinson <dickinsm@gmail.com> | 2013-04-13 17:46:04 +0100 |
|---|---|---|
| committer | Mark Dickinson <dickinsm@gmail.com> | 2013-04-13 17:46:04 +0100 |
| commit | 93196eb44f935de8132fd79e8be215657ea6b600 (patch) | |
| tree | 973f08b65f19f2d48d33bde4734080caf16798f5 /Objects | |
| parent | 171bb26b32a30d782fdb63d1f1bcb4aa72460944 (diff) | |
| parent | c9734484ca774afad49e361f72cad60d937acf1b (diff) | |
| download | cpython-git-93196eb44f935de8132fd79e8be215657ea6b600.tar.gz | |
Issue #17715: Merge fix from 3.3.
Diffstat (limited to 'Objects')
| -rw-r--r-- | Objects/abstract.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 4326cfabd7..bfd53c9bfb 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -1314,6 +1314,8 @@ PyNumber_Long(PyObject *o) PyObject *truncated = PyEval_CallObject(trunc_func, NULL); PyObject *int_instance; Py_DECREF(trunc_func); + if (truncated == NULL) + return NULL; /* __trunc__ is specified to return an Integral type, but int() needs to return a int. */ int_instance = convert_integral_to_int(truncated, |
