From: Andrew Bartlett Date: Sun, 5 May 2019 23:22:09 +0000 (+1200) Subject: pidl: Always call PyLong_FromLongLong() in ndr_PyLong_FromLongLong() X-Git-Tag: tdb-1.4.1~205 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26d8d68ca3c659d4957a9bf001e8efa5dc9fefb5;p=thirdparty%2Fsamba.git pidl: Always call PyLong_FromLongLong() in ndr_PyLong_FromLongLong() The C type is "long long" so use that always, as the Python type is now always the same. Signed-off-by: Andrew Bartlett Reviewed-by: Gary Lockyer --- diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 10ea3e6ad1b..4530b113bf6 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -2318,11 +2318,7 @@ static inline long long ndr_sizeof2intmax(size_t var_size) static inline PyObject *ndr_PyLong_FromLongLong(long long v) { - if (v > LONG_MAX || v < LONG_MIN) { - return PyLong_FromLongLong(v); - } else { - return PyLong_FromLong(v); - } + return PyLong_FromLongLong(v); } static inline PyObject *ndr_PyLong_FromUnsignedLongLong(unsigned long long v)