diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-05-06 11:22:09 +1200 |
---|---|---|
committer | Gary Lockyer <gary@samba.org> | 2019-05-06 05:46:11 +0000 |
commit | 26d8d68ca3c659d4957a9bf001e8efa5dc9fefb5 (patch) | |
tree | daf876d917bb88c551236e8ee5b698a14b339b9b /pidl | |
parent | e9874a097dd6ce104082a341f0ccdaffbf553bcb (diff) | |
download | samba-26d8d68ca3c659d4957a9bf001e8efa5dc9fefb5.tar.gz |
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 <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 6 |
1 files changed, 1 insertions, 5 deletions
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) |