summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-07-05 12:09:33 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:16 -0500
commit4a993c5241c26bbd86f3aba830cb5a5a7a2a6ae7 (patch)
treeb59616dd0d34796d8ac23e06b3346481bda3033b /source4/build
parentf1031746e51268d64559b9eb3ab1affbc436af00 (diff)
downloadsamba-4a993c5241c26bbd86f3aba830cb5a5a7a2a6ae7.tar.gz
samba-4a993c5241c26bbd86f3aba830cb5a5a7a2a6ae7.tar.bz2
samba-4a993c5241c26bbd86f3aba830cb5a5a7a2a6ae7.zip
r8167: - use the same algorithm than w2k3 for 'unique' pointer values
- add a new 'sptr' (simple-full) pointer type to simulate what we need to support pipes like epmapper and mgmt that uses 'ptr' full pointer in their spec - I runned make test and test_w2k3.sh with this, all fine does we have any other pipe using 'unique' pointer where we need 'ptr'? btw: jelmer, what does 'ignore' pointers do? they are allowed in pidl but not implemented! metze (This used to be commit d19068bfb2e3ff5d88bc3b76d5cef93417c7f218)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/pidl/ndr.pm1
-rw-r--r--source4/build/pidl/ndr_parser.pm10
-rw-r--r--source4/build/pidl/validator.pm10
3 files changed, 15 insertions, 6 deletions
diff --git a/source4/build/pidl/ndr.pm b/source4/build/pidl/ndr.pm
index 2bf673b5e3..c167e78309 100644
--- a/source4/build/pidl/ndr.pm
+++ b/source4/build/pidl/ndr.pm
@@ -232,6 +232,7 @@ sub pointer_type($)
return "ref" if (util::has_property($e, "ref"));
return "ptr" if (util::has_property($e, "ptr"));
+ return "sptr" if (util::has_property($e, "sptr"));
return "unique" if (util::has_property($e, "unique"));
return "relative" if (util::has_property($e, "relative"));
return "ignore" if (util::has_property($e, "ignore"));
diff --git a/source4/build/pidl/ndr_parser.pm b/source4/build/pidl/ndr_parser.pm
index ba6b9d58da..7a95babf90 100644
--- a/source4/build/pidl/ndr_parser.pm
+++ b/source4/build/pidl/ndr_parser.pm
@@ -627,6 +627,8 @@ sub ParsePtrPush($$$)
pidl "NDR_CHECK(ndr_push_relative_ptr1(ndr, $var_name));";
} elsif ($l->{POINTER_TYPE} eq "unique") {
pidl "NDR_CHECK(ndr_push_unique_ptr(ndr, $var_name));";
+ } elsif ($l->{POINTER_TYPE} eq "sptr") {
+ pidl "NDR_CHECK(ndr_push_sptr_ptr(ndr, $var_name));";
} else {
die("Unhandled pointer type $l->{POINTER_TYPE}");
}
@@ -947,10 +949,14 @@ sub ParsePtrPull($$$$)
}
return;
- } else {
- pidl "NDR_CHECK(ndr_pull_unique_ptr($ndr, &_ptr_$e->{NAME}));";
+ } elsif (($l->{POINTER_TYPE} eq "unique") or
+ ($l->{POINTER_TYPE} eq "relative") or
+ ($l->{POINTER_TYPE} eq "sptr")) {
+ pidl "NDR_CHECK(ndr_pull_generic_ptr($ndr, &_ptr_$e->{NAME}));";
pidl "if (_ptr_$e->{NAME}) {";
indent;
+ } else {
+ die("Unhandled pointer type $l->{POINTER_TYPE}");
}
# Don't do this for arrays, they're allocated at the actual level
diff --git a/source4/build/pidl/validator.pm b/source4/build/pidl/validator.pm
index fbf7993b20..fe4dc03c4d 100644
--- a/source4/build/pidl/validator.pm
+++ b/source4/build/pidl/validator.pm
@@ -83,8 +83,9 @@ my %property_list = (
# pointer
"ref" => ["ELEMENT"],
"ptr" => ["ELEMENT"],
+ "sptr" => ["ELEMENT"],
"unique" => ["ELEMENT"],
- "ignore" => ["ELEMENT"],
+ "ignore" => ["ELEMENT"],
"relative" => ["ELEMENT"],
"relative_base" => ["TYPEDEF"],
@@ -125,9 +126,9 @@ my %property_list = (
# array
"range" => ["ELEMENT"],
"size_is" => ["ELEMENT"],
- "string" => ["ELEMENT"],
- "noheader" => ["ELEMENT"],
- "charset" => ["ELEMENT"],
+ "string" => ["ELEMENT"],
+ "noheader" => ["ELEMENT"],
+ "charset" => ["ELEMENT"],
"length_is" => ["ELEMENT"],
);
@@ -222,6 +223,7 @@ sub ValidElement($)
if (!$e->{POINTERS} && (
util::has_property($e, "ptr") or
+ util::has_property($e, "sptr") or
util::has_property($e, "unique") or
util::has_property($e, "relative") or
util::has_property($e, "ref"))) {