diff options
author | Andrew Bartlett <abartlet@samba.org> | 2020-03-15 10:15:15 +1300 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2020-03-23 19:12:43 +0000 |
commit | 08a76ec0963049e0f2b8f855ab66ba5141472fce (patch) | |
tree | fcb13728741b349c2f9e2177c3dcc87545caf936 /pidl | |
parent | 79044e966cbe44d60997ecbd4b44f07305d99ac2 (diff) | |
download | samba-08a76ec0963049e0f2b8f855ab66ba5141472fce.tar.gz |
pidl: Remove reference to PyInt_Type from error string when we wanted a sensible Long
PyInt_Type is no longer a thing in Python3, we will remove the compatability
reference shortly.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/Python.pm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index 6cd85d1a36c..8eb50c8208b 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -1747,8 +1747,8 @@ sub ConvertObjectFromPythonData($$$$$$;$$) $self->pidl("}"); $self->pidl("if (test_var > uint_max) {"); $self->indent; - $self->pidl("PyErr_Format(PyExc_OverflowError, \"Expected type %s or %s within range 0 - %llu, got %llu\",\\"); - $self->pidl(" PyInt_Type.tp_name, PyLong_Type.tp_name, uint_max, test_var);"); + $self->pidl("PyErr_Format(PyExc_OverflowError, \"Expected type %s within range 0 - %llu, got %llu\",\\"); + $self->pidl(" PyLong_Type.tp_name, uint_max, test_var);"); $self->pidl($fail); $self->deindent; $self->pidl("}"); @@ -1756,8 +1756,8 @@ sub ConvertObjectFromPythonData($$$$$$;$$) $self->deindent; $self->pidl("} else {"); $self->indent; - $self->pidl("PyErr_Format(PyExc_TypeError, \"Expected type %s or %s\",\\"); - $self->pidl(" PyInt_Type.tp_name, PyLong_Type.tp_name);"); + $self->pidl("PyErr_Format(PyExc_TypeError, \"Expected type %s\",\\"); + $self->pidl(" PyLong_Type.tp_name);"); $self->pidl($fail); $self->deindent; $self->pidl("}"); @@ -1786,8 +1786,8 @@ sub ConvertObjectFromPythonData($$$$$$;$$) $self->pidl("}"); $self->pidl("if (test_var < int_min || test_var > int_max) {"); $self->indent; - $self->pidl("PyErr_Format(PyExc_OverflowError, \"Expected type %s or %s within range %lld - %lld, got %lld\",\\"); - $self->pidl(" PyInt_Type.tp_name, PyLong_Type.tp_name, int_min, int_max, test_var);"); + $self->pidl("PyErr_Format(PyExc_OverflowError, \"Expected type %s within range %lld - %lld, got %lld\",\\"); + $self->pidl(" PyLong_Type.tp_name, int_min, int_max, test_var);"); $self->pidl($fail); $self->deindent; $self->pidl("}"); @@ -1795,8 +1795,8 @@ sub ConvertObjectFromPythonData($$$$$$;$$) $self->deindent; $self->pidl("} else {"); $self->indent; - $self->pidl("PyErr_Format(PyExc_TypeError, \"Expected type %s or %s\",\\"); - $self->pidl(" PyInt_Type.tp_name, PyLong_Type.tp_name);"); + $self->pidl("PyErr_Format(PyExc_TypeError, \"Expected type %s\",\\"); + $self->pidl(" PyLong_Type.tp_name);"); $self->pidl($fail); $self->deindent; $self->pidl("}"); |