summaryrefslogtreecommitdiff
path: root/pidl/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-11-20 12:19:35 +0100
committerStefan Metzmacher <metze@samba.org>2009-11-20 13:48:36 +0100
commit2cd88197f80eaeb2070b248551a22a3488c89d8d (patch)
tree8e0b5c4069af6d1236a7316d133dc569b904974d /pidl/lib
parent05850d1894d83897f7699660839c1be28e28406c (diff)
downloadsamba-2cd88197f80eaeb2070b248551a22a3488c89d8d.tar.gz
samba-2cd88197f80eaeb2070b248551a22a3488c89d8d.tar.bz2
samba-2cd88197f80eaeb2070b248551a22a3488c89d8d.zip
Revert "Work around ndr_unpack failing on structures with relative pointers."
This reverts commit c2cdb4ad5c9398ef0d3310613107999f8d33c7ce. It's not needed anymore. metze
Diffstat (limited to 'pidl/lib')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm19
1 files changed, 1 insertions, 18 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index c785619adb..79c72d732f 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -275,24 +275,7 @@ sub PythonStruct($$$$$$)
$self->pidl("if (!PyArg_ParseTuple(args, \"s#:__ndr_unpack__\", &blob.data, &blob.length))");
$self->pidl("\treturn NULL;");
$self->pidl("");
-
- # This disgusting hack works around the fact that ndr_pull_struct_blob_all will always fail on structures with relative pointers.
- # So, map ndr_unpack to ndr_pull_struct_blob_all only if we don't have any relative pointers in this
- my $got_relative = 0;
- if ($#{$d->{ELEMENTS}} > -1) {
- foreach my $e (@{$d->{ELEMENTS}}) {
- my $l = $e->{LEVELS}[0];
- if ($l->{TYPE} eq "POINTER" and ($l->{POINTER_TYPE} eq "relative")) {
- $got_relative = 1;
- last;
- }
- }
- }
- if ($got_relative == 0) {
- $self->pidl("err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
- } else {
- $self->pidl("err = ndr_pull_struct_blob(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
- }
+ $self->pidl("err = ndr_pull_struct_blob_all(&blob, py_talloc_get_mem_ctx(py_obj), NULL, object, (ndr_pull_flags_fn_t)ndr_pull_$name);");
$self->pidl("if (err != NDR_ERR_SUCCESS) {");
$self->indent;
$self->pidl("PyErr_SetNdrError(err);");