From addb2a9fd45ad4df21f22d1b712e37ff0a5affd4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 16 Oct 2004 00:19:33 +0000 Subject: r3001: Expose unmarshalling functions for structures marked "public" in the idl. This allows us to pass a buffer of bytes returned from a spoolss call and convert it to a Python dictionary. Works for enumprinters level 1! (This used to be commit 4bc497a2994b12845a46b2d19f60bb81c9869fc9) --- source4/scripting/swig/dcerpc.i | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/scripting/swig/dcerpc.i') diff --git a/source4/scripting/swig/dcerpc.i b/source4/scripting/swig/dcerpc.i index ab53a1dc51..1222d54766 100644 --- a/source4/scripting/swig/dcerpc.i +++ b/source4/scripting/swig/dcerpc.i @@ -346,6 +346,12 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **OUT, const char *username, const char *password); +%typemap(in) DATA_BLOB * (DATA_BLOB temp_data_blob) { + temp_data_blob.data = PyString_AsString($input); + temp_data_blob.length = PyString_Size($input); + $1 = &temp_data_blob; +} + %include "librpc/gen_ndr/misc.i" %include "librpc/gen_ndr/lsa.i" %include "librpc/gen_ndr/samr.i" -- cgit