mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
pidl: Generate compatability wrappers for ndr_print functions
This creates wrappers that are compatible with the functions called by ndrdump which have an extra "int flags" parameter for NDR_IN and NDR_OUT. This will make ndrdump of public structures work again. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14191 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-progammed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
parent
1bd1ae0593
commit
78521577eb
@ -2768,7 +2768,7 @@ sub StructEntry($$)
|
||||
$self->pidl("\t\t.struct_size = sizeof($type_decl),");
|
||||
$self->pidl("\t\t.ndr_push = (ndr_push_flags_fn_t) ndr_push_$d->{NAME},");
|
||||
$self->pidl("\t\t.ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_$d->{NAME},");
|
||||
$self->pidl("\t\t.ndr_print = (ndr_print_function_t) ndr_print_$d->{NAME},");
|
||||
$self->pidl("\t\t.ndr_print = (ndr_print_function_t) ndr_print_flags_$d->{NAME},");
|
||||
$self->pidl("\t},");
|
||||
return 1;
|
||||
}
|
||||
@ -3023,6 +3023,18 @@ sub ParseTypePrintFunction($$$)
|
||||
|
||||
$self->pidl_hdr("void ".TypeFunctionName("ndr_print", $e)."(struct ndr_print *ndr, const char *name, $args);");
|
||||
|
||||
if (has_property($e, "public")) {
|
||||
$self->pidl("static void ".TypeFunctionName("ndr_print_flags", $e).
|
||||
"(struct ndr_print *$ndr, const char *name, int unused, $args)"
|
||||
);
|
||||
$self->pidl("{");
|
||||
$self->indent;
|
||||
$self->pidl(TypeFunctionName("ndr_print", $e)."($ndr, name, $varname);");
|
||||
$self->deindent;
|
||||
$self->pidl("}");
|
||||
$self->pidl("");
|
||||
}
|
||||
|
||||
return if (has_property($e, "noprint"));
|
||||
|
||||
$self->pidl("_PUBLIC_ void ".TypeFunctionName("ndr_print", $e)."(struct ndr_print *$ndr, const char *name, $args)");
|
||||
|
Loading…
Reference in New Issue
Block a user