summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-05 00:09:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:18 -0500
commitb90c0850fc01574b89e1cd0da0af43879e7ba6d7 (patch)
tree33f3eb64e50c27ef85410c68990f89d2ea737b3c /source4
parent7588a01cb6d387440d778e3bd77225b287cf48bc (diff)
downloadsamba-b90c0850fc01574b89e1cd0da0af43879e7ba6d7.tar.gz
samba-b90c0850fc01574b89e1cd0da0af43879e7ba6d7.tar.bz2
samba-b90c0850fc01574b89e1cd0da0af43879e7ba6d7.zip
r4521: fixed up the handling of PROPERTIES elements after the change to support enum
(This used to be commit dee8eff2590be58c59b0db089fcca4af3e011c42)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/pidl/eparser.pm6
-rw-r--r--source4/build/pidl/header.pm6
-rw-r--r--source4/build/pidl/needed.pm4
-rw-r--r--source4/build/pidl/parser.pm20
-rw-r--r--source4/build/pidl/swig.pm4
5 files changed, 20 insertions, 20 deletions
diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm
index 0038f53123..83dc90408e 100644
--- a/source4/build/pidl/eparser.pm
+++ b/source4/build/pidl/eparser.pm
@@ -27,7 +27,7 @@ sub fn_prefix($)
{
my $fn = shift;
if ($fn->{TYPE} eq "TYPEDEF") {
- if (util::has_property($fn->{DATA}, "public")) {
+ if (util::has_property($fn, "public")) {
return "";
}
}
@@ -166,7 +166,7 @@ sub NeededFunction($)
sub NeededTypedef($)
{
my $t = shift;
- if (util::has_property($t->{DATA}, "public")) {
+ if (util::has_property($t, "public")) {
$needed{"pull_$t->{NAME}"} = 1;
}
@@ -277,7 +277,7 @@ sub ParseHeader($$)
# unions.
if ($d->{TYPE} eq "TYPEDEF" and
- util::has_property($d->{DATA}, "public")) {
+ util::has_property($d, "public")) {
if ($d->{DATA}{TYPE} eq "STRUCT") {
pidl "void ndr_pull_$d->{NAME}(struct ndr_pull *ndr, int ndr_flags, proto_tree *tree, struct $d->{NAME} *r);\n\n";
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm
index ccb302be89..d90ee0e679 100644
--- a/source4/build/pidl/header.pm
+++ b/source4/build/pidl/header.pm
@@ -188,14 +188,14 @@ sub HeaderTypedef($)
sub HeaderTypedefProto($)
{
my($d) = shift;
- if (!util::has_property($d->{DATA}, "public")) {
+ if (!util::has_property($d, "public")) {
return;
}
if ($d->{DATA}{TYPE} eq "STRUCT") {
$res .= "NTSTATUS ndr_push_$d->{NAME}(struct ndr_push *ndr, int ndr_flags, struct $d->{NAME} *r);\n";
$res .= "NTSTATUS ndr_pull_$d->{NAME}(struct ndr_pull *ndr, int ndr_flags, struct $d->{NAME} *r);\n";
- if (!util::has_property($d->{DATA}, "noprint")) {
+ if (!util::has_property($d, "noprint")) {
$res .= "void ndr_print_$d->{NAME}(struct ndr_print *ndr, const char *name, struct $d->{NAME} *r);\n";
}
@@ -206,7 +206,7 @@ sub HeaderTypedefProto($)
if ($d->{DATA}{TYPE} eq "UNION") {
$res .= "NTSTATUS ndr_push_$d->{NAME}(struct ndr_push *ndr, int ndr_flags, int level, union $d->{NAME} *r);\n";
$res .= "NTSTATUS ndr_pull_$d->{NAME}(struct ndr_pull *ndr, int ndr_flags, int level, union $d->{NAME} *r);\n";
- if (!util::has_property($d->{DATA}, "noprint")) {
+ if (!util::has_property($d, "noprint")) {
$res .= "void ndr_print_$d->{NAME}(struct ndr_print *ndr, const char *name, int level, union $d->{NAME} *r);\n";
}
}
diff --git a/source4/build/pidl/needed.pm b/source4/build/pidl/needed.pm
index 301b85e51c..f58d897cb3 100644
--- a/source4/build/pidl/needed.pm
+++ b/source4/build/pidl/needed.pm
@@ -26,13 +26,13 @@ sub NeededFunction($)
sub NeededTypedef($)
{
my $t = shift;
- if (util::has_property($t->{DATA}, "public")) {
+ if (util::has_property($t, "public")) {
$needed{"pull_$t->{NAME}"} = 1;
$needed{"push_$t->{NAME}"} = 1;
}
if ($t->{DATA}->{TYPE} eq "STRUCT") {
- if (util::has_property($t->{DATA}, "gensize")) {
+ if (util::has_property($t, "gensize")) {
$needed{"ndr_size_$t->{NAME}"} = 1;
}
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm
index fb4cc8af5e..88d6cee0db 100644
--- a/source4/build/pidl/parser.pm
+++ b/source4/build/pidl/parser.pm
@@ -136,7 +136,7 @@ sub fn_prefix($)
{
my $fn = shift;
if ($fn->{TYPE} eq "TYPEDEF") {
- if (util::has_property($fn->{DATA}, "public")) {
+ if (util::has_property($fn, "public")) {
return "";
}
}
@@ -466,7 +466,7 @@ sub ParseElementPullSwitch($$$$)
check_null_pointer($switch_var);
if (!defined $utype ||
- !util::has_property($utype->{DATA}, "nodiscriminant")) {
+ !util::has_property($utype, "nodiscriminant")) {
my $e2 = find_sibling($e, $switch);
pidl "\tif (($ndr_flags) & NDR_SCALARS) {\n";
if (util::is_enum($e2->{TYPE})) {
@@ -515,7 +515,7 @@ sub ParseElementPushSwitch($$$$)
my $utype = $structs{$e->{TYPE}};
if (!defined $utype ||
- !util::has_property($utype->{DATA}, "nodiscriminant")) {
+ !util::has_property($utype, "nodiscriminant")) {
my $e2 = find_sibling($e, $switch);
pidl "\tif (($ndr_flags) & NDR_SCALARS) {\n";
pidl "\t\tNDR_CHECK(ndr_push_$e2->{TYPE}(ndr, $switch_var));\n";
@@ -964,8 +964,8 @@ sub ParseStructNdrSize($)
pidl $static . "size_t ndr_size_$t->{NAME}(int ret, const struct $t->{NAME} *r, int flags)\n";
pidl "{\n";
- if (util::has_property($t->{DATA}, "flag")) {
- pidl "\tflags = flags | " . $t->{DATA}->{PROPERTIES}->{flag} . ";\n";
+ if (util::has_property($t, "flag")) {
+ pidl "\tflags = flags | " . $t->{PROPERTIES}->{flag} . ";\n";
}
pidl "\tif(!r) return 0;\n";
@@ -1172,8 +1172,8 @@ sub ParseUnionNdrSize($)
pidl $static . "size_t ndr_size_$t->{NAME}(int ret, const union $t->{NAME} *data, uint16 level, int flags)\n";
pidl "{\n";
- if (util::has_property($t->{DATA}, "flag")) {
- pidl "\tflags = flags | " . $t->{DATA}->{PROPERTIES}->{flag} . ";\n";
+ if (util::has_property($t, "flag")) {
+ pidl "\tflags = flags | " . $t->{PROPERTIES}->{flag} . ";\n";
}
pidl "\tif(!data) return 0;\n\n";
@@ -1260,7 +1260,7 @@ sub ParseTypedefPush($)
}
if ($e->{DATA}->{TYPE} eq "STRUCT") {
- pidl $static . "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, const struct $e->{NAME} *r)";
+ pidl $static . "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, struct $e->{NAME} *r)";
pidl "\n{\n";
ParseTypePush($e->{DATA});
pidl "\treturn NT_STATUS_OK;\n";
@@ -1268,7 +1268,7 @@ sub ParseTypedefPush($)
}
if ($e->{DATA}->{TYPE} eq "UNION") {
- pidl $static . "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, int level, const union $e->{NAME} *r)";
+ pidl $static . "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, int level, union $e->{NAME} *r)";
pidl "\n{\n";
ParseTypePush($e->{DATA});
pidl "\treturn NT_STATUS_OK;\n";
@@ -1713,7 +1713,7 @@ sub ParseInterface($)
}
foreach my $d (@{$data}) {
if ($d->{TYPE} eq "TYPEDEF" &&
- !util::has_property($d->{DATA}, "noprint")) {
+ !util::has_property($d, "noprint")) {
ParseTypedefPrint($d);
}
if ($d->{TYPE} eq "FUNCTION" &&
diff --git a/source4/build/pidl/swig.pm b/source4/build/pidl/swig.pm
index 55ded24f21..ad21880ad0 100644
--- a/source4/build/pidl/swig.pm
+++ b/source4/build/pidl/swig.pm
@@ -586,7 +586,7 @@ sub ParseUnion($)
$result .= "}\n\n";
- if (util::has_property($u->{DATA}, "public")) {
+ if (util::has_property($u, "public")) {
# Generate function to unmarshall an array of structures.
# Used exclusively (?) in the spoolss pipe.
@@ -613,7 +613,7 @@ sub ParseUnion($)
$result .= "%}\n\n";
- if (util::has_property($u->{DATA}, "public")) {
+ if (util::has_property($u, "public")) {
$result .= "%typemap(in, numinputs=0) union $u->{NAME} **EMPTY (union $u->{NAME} *temp_$u->{NAME}) {\n";
$result .= "\t\$1 = &temp_$u->{NAME};\n";