summaryrefslogtreecommitdiff
path: root/source4/scripting/swig/dcerpc.i
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-10-16 00:19:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:56 -0500
commitaddb2a9fd45ad4df21f22d1b712e37ff0a5affd4 (patch)
tree50f2596749cf91304abe0408fd40d5f38eee3d60 /source4/scripting/swig/dcerpc.i
parent04767ce90619b5936c3a1e346a74a3293bbc9472 (diff)
downloadsamba-addb2a9fd45ad4df21f22d1b712e37ff0a5affd4.tar.gz
samba-addb2a9fd45ad4df21f22d1b712e37ff0a5affd4.tar.bz2
samba-addb2a9fd45ad4df21f22d1b712e37ff0a5affd4.zip
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)
Diffstat (limited to 'source4/scripting/swig/dcerpc.i')
-rw-r--r--source4/scripting/swig/dcerpc.i6
1 files changed, 6 insertions, 0 deletions
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"