summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2016-01-04 13:03:39 +1300
committerAndrew Bartlett <abartlet@samba.org>2016-01-07 23:33:10 +0100
commit638c611796f6bb692e9a4500644d8875adc5c3c8 (patch)
treebdcc1fbed06a63ebd853e2fe1a09cc20149f851d /pidl
parent4894811dafafc57de98bf5271b3ee133622cefb6 (diff)
downloadsamba-638c611796f6bb692e9a4500644d8875adc5c3c8.tar.gz
pidl: Use PY_SSIZE_T_CLEAN
This changes the type used for # arguments to PyArg_ParseTupleAndKeywords Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 180b6b20089..82f92195742 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -282,7 +282,7 @@ sub PythonStruct($$$$$$)
$self->indent;
$self->pidl("$cname *object = ($cname *)pytalloc_get_ptr(py_obj);");
$self->pidl("DATA_BLOB blob;");
- $self->pidl("int blob_length = 0;");
+ $self->pidl("Py_ssize_t blob_length = 0;");
$self->pidl("enum ndr_err_code err;");
$self->pidl("const char * const kwnames[] = { \"data_blob\", \"allow_remaining\", NULL };");
$self->pidl("PyObject *allow_remaining_obj = NULL;");
@@ -1490,6 +1490,7 @@ sub Parse($$$$$)
$self->pidl_hdr("
/* Python wrapper functions auto-generated by pidl */
+#define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
#include <Python.h>
#include \"includes.h\"
#include <pytalloc.h>