[PATCH] pidl: actually allow "include" directive usage

Michael Tokarev mjt at tls.msk.ru
Sat Jan 28 21:00:31 UTC 2023


pidl used to have non-standard helper() and depends()
attributes. Commit d8ecabe452f36302105c6412ae5ab93cabfe5cf2
(in Nov 2006) implemented the standard include and import
directives, but it had a tiny omission: the "include" has
never been actually pushed to the list to be processed
later.  This commit adds implementation of type-IMPORT
typle and type-INCLUDE typle into a few places, and it
adds type-IMPORT typle to the list to process, but it
does not add the type-INCLUDE tuple to that list to be
processed later by the type-INCLUDE implementations.

This one-line omission lasted for 18+ years together with
the ton of warnings telling that helpe() is deprecated
and include should be used instead.

This tiny fix finally allows to convert helper() to the
standard include and get rid of this warning finally.

Signed-off-by: Michael Tokarev <mjt at tls.msk.ru>
---
 pidl/lib/Parse/Pidl/NDR.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
index d17d0b404ed..52c0383f169 100644
--- a/pidl/lib/Parse/Pidl/NDR.pm
+++ b/pidl/lib/Parse/Pidl/NDR.pm
@@ -939,6 +939,7 @@ sub Parse($)
 		($_->{TYPE} eq "CPP_QUOTE") && push(@ndr, $_);
 		($_->{TYPE} eq "INTERFACE") && push(@ndr, ParseInterface($_));
 		($_->{TYPE} eq "IMPORT") && push(@ndr, $_);
+		($_->{TYPE} eq "INCLUDE") && push(@ndr, $_);
 	}
 
 	return \@ndr;
-- 
2.30.2




More information about the samba-technical mailing list