From 441d30fac7f4037e4a79e4ada873de3b6f6e5a26 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sat, 19 Jan 2013 12:26:26 +0200 Subject: Issue #15989: Fix several occurrences of integer overflow when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277. --- Include/longobject.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Include') diff --git a/Include/longobject.h b/Include/longobject.h index c09565a117..5f8b178dd9 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -26,6 +26,9 @@ PyAPI_FUNC(Py_ssize_t) PyLong_AsSsize_t(PyObject *); PyAPI_FUNC(size_t) PyLong_AsSize_t(PyObject *); PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *); PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *); +#ifndef Py_LIMITED_API +PyAPI_FUNC(int) _PyLong_AsInt(PyObject *); +#endif PyAPI_FUNC(PyObject *) PyLong_GetInfo(void); /* It may be useful in the future. I've added it in the PyInt -> PyLong -- cgit v1.2.1