From 7717f180ca2f908e1b3258355520719991215050 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 25 Dec 2005 03:04:13 +0000 Subject: r12470: Add helper module for pidl tests Convert other pidl tests to use Test::More and run them from 'make test' (This used to be commit 3a57d29a62112ab654e290ccc985fba7f67664c5) --- source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/Header.pm') diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm index a1c568cdc7..46caba731a 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -17,10 +17,7 @@ $VERSION = '0.01'; my($res); my($tab_depth); -sub pidl ($) -{ - $res .= shift; -} +sub pidl($) { $res .= shift; } sub tabs() { @@ -261,7 +258,7 @@ sub HeaderFunctionInOut_needed($$) return undef; } -my %headerstructs = (); +my %headerstructs; ##################################################################### # parse a function @@ -313,8 +310,6 @@ sub HeaderInterface($) { my($interface) = shift; - my $count = 0; - pidl "#ifndef _HEADER_$interface->{NAME}\n"; pidl "#define _HEADER_$interface->{NAME}\n\n"; @@ -337,6 +332,7 @@ sub HeaderInterface($) foreach my $d (@{$interface->{DATA}}) { next if ($d->{TYPE} ne "FUNCTION"); + HeaderFunction($d); } @@ -351,9 +347,10 @@ sub Parse($) $tab_depth = 0; $res = ""; + %headerstructs = (); pidl "/* header auto-generated by pidl */\n\n"; - foreach my $x (@{$idl}) { - ($x->{TYPE} eq "INTERFACE") && HeaderInterface($x); + foreach (@{$idl}) { + ($_->{TYPE} eq "INTERFACE") && HeaderInterface($_); } return $res; } -- cgit