{
my ($type,$fn,$decl) = @_;
- if (has_property($fn, "no$type") or has_property($fn, "public")) {
+ if (has_property($fn, "no$type")) {
pidl_hdr "$decl;";
- pidl "_PUBLIC_ $decl" unless (has_property($fn, "no$type"));
+ return 0;
+ }
+
+ if (has_property($fn, "public")) {
+ pidl_hdr "$decl;";
+ pidl "_PUBLIC_ $decl";
} else {
pidl "static $decl";
}
+
+ return 1;
}
###################################################################
my($e) = shift;
my $args = $typefamily{$e->{DATA}->{TYPE}}->{DECL}->($e,"push");
- fn_declare("push", $e, "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, $args)");
+ fn_declare("push", $e, "NTSTATUS ndr_push_$e->{NAME}(struct ndr_push *ndr, int ndr_flags, $args)") or return;
pidl "{";
indent;
my $args = $typefamily{$e->{DATA}->{TYPE}}->{DECL}->($e,"pull");
- fn_declare("pull", $e, "NTSTATUS ndr_pull_$e->{NAME}(struct ndr_pull *ndr, int ndr_flags, $args)");
+ fn_declare("pull", $e, "NTSTATUS ndr_pull_$e->{NAME}(struct ndr_pull *ndr, int ndr_flags, $args)") or return;
pidl "{";
indent;
my $args = $typefamily{$e->{DATA}->{TYPE}}->{DECL}->($e,"print");
- pidl "_PUBLIC_ void ndr_print_$e->{NAME}(struct ndr_print *ndr, const char *name, $args)";
pidl_hdr "void ndr_print_$e->{NAME}(struct ndr_print *ndr, const char *name, $args);";
+
+ return if (has_property($e, "noprint"));
+
+ pidl "_PUBLIC_ void ndr_print_$e->{NAME}(struct ndr_print *ndr, const char *name, $args)";
pidl "{";
indent;
$typefamily{$e->{DATA}->{TYPE}}->{PRINT_FN_BODY}->($e->{DATA}, $e->{NAME});
my $tf = $typefamily{$t->{DATA}->{TYPE}};
my $args = $tf->{SIZE_FN_ARGS}->($t);
- fn_declare("size", $t, "size_t ndr_size_$t->{NAME}($args)");
+ fn_declare("size", $t, "size_t ndr_size_$t->{NAME}($args)") or return;
pidl "{";
indent;
{
my($fn) = shift;
+ pidl_hdr "void ndr_print_$fn->{NAME}(struct ndr_print *ndr, const char *name, int flags, const struct $fn->{NAME} *r);";
+
return if has_property($fn, "noprint");
pidl "_PUBLIC_ void ndr_print_$fn->{NAME}(struct ndr_print *ndr, const char *name, int flags, const struct $fn->{NAME} *r)";
- pidl_hdr "void ndr_print_$fn->{NAME}(struct ndr_print *ndr, const char *name, int flags, const struct $fn->{NAME} *r);";
pidl "{";
indent;
{
my($fn) = shift;
- fn_declare("push", $fn, "NTSTATUS ndr_push_$fn->{NAME}(struct ndr_push *ndr, int flags, const struct $fn->{NAME} *r)");
+ fn_declare("push", $fn, "NTSTATUS ndr_push_$fn->{NAME}(struct ndr_push *ndr, int flags, const struct $fn->{NAME} *r)") or return;
return if has_property($fn, "nopush");
my($fn) = shift;
# pull function args
- fn_declare("pull", $fn, "NTSTATUS ndr_pull_$fn->{NAME}(struct ndr_pull *ndr, int flags, struct $fn->{NAME} *r)");
-
- return if has_property($fn, "nopull");
+ fn_declare("pull", $fn, "NTSTATUS ndr_pull_$fn->{NAME}(struct ndr_pull *ndr, int flags, struct $fn->{NAME} *r)") or return;
pidl "{";
indent;
{
my ($t,$needed) = @_;
if (has_property($t, "public")) {
- $needed->{"pull_$t->{NAME}"} = not has_property($t, "nopull");
- $needed->{"push_$t->{NAME}"} = not has_property($t, "nopush");
- $needed->{"print_$t->{NAME}"} = not has_property($t, "noprint");
+ $needed->{"pull_$t->{NAME}"} = 1;
+ $needed->{"push_$t->{NAME}"} = 1;
+ $needed->{"print_$t->{NAME}"} = 1;
}
if ($t->{DATA}->{TYPE} eq "STRUCT" or $t->{DATA}->{TYPE} eq "UNION") {