From 0a15f3edffb9e2534039f923225a8683fab2b433 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 23 Jan 2005 11:03:20 +0000 Subject: r4940: Add a variable to hold a list of typedefs for which we shouldn't generate a dissector for. A hand written dissector needs to be added to eparser.c for the plugin to link. (This used to be commit d4f7f6b0b41cb572320a5aeaf771c5af2b7bf13d) --- source4/build/pidl/eparser.pm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'source4/build') diff --git a/source4/build/pidl/eparser.pm b/source4/build/pidl/eparser.pm index 71819b47d2..aa80e4d50c 100644 --- a/source4/build/pidl/eparser.pm +++ b/source4/build/pidl/eparser.pm @@ -21,6 +21,13 @@ sub pidl($) print OUT shift; } +##################################################################### +# a list of annotations + +my $nopull_typedefs = { +# "policy_handle" => "1", +}; + ##################################################################### # work out is a parse function should be declared static or not sub fn_prefix($) @@ -462,7 +469,7 @@ sub RewriteC($$$) # Read through file - my $cur_fn; + my $cur_fn = ""; while() { @@ -505,6 +512,18 @@ sub RewriteC($$$) $cur_fn = $1, if /NTSTATUS ndr_pull_(.*?)\(struct/; + # Skip functions we have marked as nopull + + my $skip_fn = 0; + + foreach my $f (keys(%{$nopull_typedefs})) { + $skip_fn = 1, if $cur_fn eq $f; + } + + $cur_fn = "", if /^}/; + + next, if $skip_fn; + # # OK start wrapping the ndr_pull functions that actually # implement the NDR decoding routines. This mainly consists -- cgit