From 5c1867ba459c2eff0dfc99c92200aecc2d44df59 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 15 Mar 2020 10:36:59 +1300 Subject: py3: Remove #define PyInt_FromLong PyLong_FromLong This allows us to end the use of Python 2/3 compatability macros. Signed-off-by: Andrew Bartlett Reviewed-by: Noel Power --- pidl/lib/Parse/Pidl/Samba4/Python.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pidl') diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 93ab67f5f3c..12ddd046062 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -538,7 +538,7 @@ sub PythonFunctionStruct($$$$) $self->indent; $self->pidl(""); $self->pidl(""); - $self->pidl("return PyInt_FromLong($fn->{OPNUM});"); + $self->pidl("return PyLong_FromLong($fn->{OPNUM});"); $self->deindent; $self->pidl("}"); $self->pidl(""); @@ -2039,7 +2039,7 @@ sub ConvertScalarToPython($$$$) } if ($ctypename =~ /^(char|int|int8|int16|int32|time_t)$/) { - return "PyInt_FromLong($cvar)"; + return "PyLong_FromLong($cvar)"; } # Needed to ensure unsigned values in a 32 or 16 bit enum is @@ -2051,7 +2051,7 @@ sub ConvertScalarToPython($$$$) } if ($ctypename =~ /^(uint|uint8|uint16|uint1632)$/) { - return "PyInt_FromLong((uint16_t)$cvar)"; + return "PyLong_FromLong((uint16_t)$cvar)"; } if ($ctypename eq "DATA_BLOB") { -- cgit v1.2.1