bpo-36957: Add _PyLong_Rshift() and _PyLong_Lshift(). (GH-13416)

This commit is contained in:
Serhiy Storchaka 2019-05-19 14:14:38 +03:00 committed by GitHub
parent 1d5bdef550
commit a5119e7d75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 87 additions and 53 deletions

View file

@ -463,13 +463,13 @@ float_richcompare(PyObject *v, PyObject *w, int op)
*/
PyObject *temp;
temp = PyNumber_Lshift(ww, _PyLong_One);
temp = _PyLong_Lshift(ww, 1);
if (temp == NULL)
goto Error;
Py_DECREF(ww);
ww = temp;
temp = PyNumber_Lshift(vv, _PyLong_One);
temp = _PyLong_Lshift(vv, 1);
if (temp == NULL)
goto Error;
Py_DECREF(vv);