svn commit: samba r4521 - in branches/SAMBA_4_0/source/build/pidl: .
tridge at samba.org
tridge at samba.org
Wed Jan 5 00:09:29 GMT 2005
Author: tridge
Date: 2005-01-05 00:09:29 +0000 (Wed, 05 Jan 2005)
New Revision: 4521
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4521
Log:
fixed up the handling of PROPERTIES elements after the change to support enum
Modified:
branches/SAMBA_4_0/source/build/pidl/eparser.pm
branches/SAMBA_4_0/source/build/pidl/header.pm
branches/SAMBA_4_0/source/build/pidl/needed.pm
branches/SAMBA_4_0/source/build/pidl/parser.pm
branches/SAMBA_4_0/source/build/pidl/swig.pm
Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/eparser.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/eparser.pm 2005-01-04 23:27:12 UTC (rev 4520)
+++ branches/SAMBA_4_0/source/build/pidl/eparser.pm 2005-01-05 00:09:29 UTC (rev 4521)
@@ -27,7 +27,7 @@
{
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 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 @@
# 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";
Modified: branches/SAMBA_4_0/source/build/pidl/header.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/header.pm 2005-01-04 23:27:12 UTC (rev 4520)
+++ branches/SAMBA_4_0/source/build/pidl/header.pm 2005-01-05 00:09:29 UTC (rev 4521)
@@ -188,14 +188,14 @@
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 @@
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";
}
}
Modified: branches/SAMBA_4_0/source/build/pidl/needed.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/needed.pm 2005-01-04 23:27:12 UTC (rev 4520)
+++ branches/SAMBA_4_0/source/build/pidl/needed.pm 2005-01-05 00:09:29 UTC (rev 4521)
@@ -26,13 +26,13 @@
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;
}
Modified: branches/SAMBA_4_0/source/build/pidl/parser.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/parser.pm 2005-01-04 23:27:12 UTC (rev 4520)
+++ branches/SAMBA_4_0/source/build/pidl/parser.pm 2005-01-05 00:09:29 UTC (rev 4521)
@@ -136,7 +136,7 @@
{
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 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
}
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 @@
}
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" &&
Modified: branches/SAMBA_4_0/source/build/pidl/swig.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/swig.pm 2005-01-04 23:27:12 UTC (rev 4520)
+++ branches/SAMBA_4_0/source/build/pidl/swig.pm 2005-01-05 00:09:29 UTC (rev 4521)
@@ -586,7 +586,7 @@
$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 @@
$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";
More information about the samba-cvs
mailing list