diff options
author | Andrew Bartlett <abartlet@samba.org> | 2020-03-15 10:36:59 +1300 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2020-03-23 19:12:43 +0000 |
commit | 5c1867ba459c2eff0dfc99c92200aecc2d44df59 (patch) | |
tree | b4d32c7bdfe1b79a715f66fd4eec328c5c7f5404 /pidl | |
parent | 4764e8b4c7e459f6aa5861d26ffaec3a3026d77f (diff) | |
download | samba-5c1867ba459c2eff0dfc99c92200aecc2d44df59.tar.gz |
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 <abartlet@samba.org>
Reviewed-by: Noel Power
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 6 |
1 files changed, 3 insertions, 3 deletions
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") { |