pidl: Call PyLong_FromLongLong() directly rather than via inline helper
authorAndrew Bartlett <abartlet@samba.org>
Sun, 5 May 2019 23:24:39 +0000 (11:24 +1200)
committerGary Lockyer <gary@samba.org>
Mon, 6 May 2019 05:46:11 +0000 (05:46 +0000)
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
pidl/lib/Parse/Pidl/Samba4/Python.pm

index d01bce28b50a52003091c00a2454532024835c04..6bf71d86b38744d12214f759ee3c36836bd8788d 100644 (file)
@@ -2025,7 +2025,7 @@ sub ConvertScalarToPython($$$$)
        $ctypename = expandAlias($ctypename);
 
        if ($ctypename =~ /^(int64|dlong)$/) {
        $ctypename = expandAlias($ctypename);
 
        if ($ctypename =~ /^(int64|dlong)$/) {
-               return "ndr_PyLong_FromLongLong($cvar)";
+               return "PyLong_FromLongLong($cvar)";
        }
 
        if ($ctypename =~ /^(uint64|hyper|NTTIME_hyper|NTTIME|NTTIME_1sec|udlong|udlongr|uid_t|gid_t)$/) {
        }
 
        if ($ctypename =~ /^(uint64|hyper|NTTIME_hyper|NTTIME|NTTIME_1sec|udlong|udlongr|uid_t|gid_t)$/) {
@@ -2316,11 +2316,6 @@ static inline long long ndr_sizeof2intmax(size_t var_size)
        return 0;
 }
 
        return 0;
 }
 
-static inline PyObject *ndr_PyLong_FromLongLong(long long v)
-{
-       return PyLong_FromLongLong(v);
-}
-
 static inline PyObject *ndr_PyLong_FromUnsignedLongLong(unsigned long long v)
 {
        return PyLong_FromUnsignedLongLong(v);
 static inline PyObject *ndr_PyLong_FromUnsignedLongLong(unsigned long long v)
 {
        return PyLong_FromUnsignedLongLong(v);