pidl: Always call PyLong_FromUnsignedLongLong() in ndr_PyLong_FromUnsignedLongLong()
authorAndrew Bartlett <abartlet@samba.org>
Sun, 5 May 2019 23:22:55 +0000 (11:22 +1200)
committerGary Lockyer <gary@samba.org>
Mon, 6 May 2019 05:46:11 +0000 (05:46 +0000)
The C type is "unsigned 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>
pidl/lib/Parse/Pidl/Samba4/Python.pm

index 4530b113bf6b13ab708ea86dc489ae26767c999d..d01bce28b50a52003091c00a2454532024835c04 100644 (file)
@@ -2323,11 +2323,7 @@ static inline PyObject *ndr_PyLong_FromLongLong(long long v)
 
 static inline PyObject *ndr_PyLong_FromUnsignedLongLong(unsigned long long v)
 {
-       if (v > LONG_MAX) {
-               return PyLong_FromUnsignedLongLong(v);
-       } else {
-               return PyLong_FromLong(v);
-       }
+       return PyLong_FromUnsignedLongLong(v);
 }
 
 ");