diff options
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 1e01bf074b..8f7d9e4f84 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -2134,6 +2134,11 @@ long_coerce(PyObject **pv, PyObject **pw) Py_INCREF(*pv); return 0; } + else if (PyLong_Check(*pw)) { + Py_INCREF(*pv); + Py_INCREF(*pw); + return 0; + } return 1; /* Can't do it */ } |