diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2005-12-25 03:04:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:47:43 -0500 |
commit | 7717f180ca2f908e1b3258355520719991215050 (patch) | |
tree | cca55b2debbe63fdf39d6810ad7987af28ffc04a /source4/pidl/lib/Parse/Pidl/Samba4 | |
parent | 620d375320e143abcf6775a392f9bde3146f2baa (diff) | |
download | samba-7717f180ca2f908e1b3258355520719991215050.tar.gz samba-7717f180ca2f908e1b3258355520719991215050.tar.bz2 samba-7717f180ca2f908e1b3258355520719991215050.zip |
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)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | 15 |
1 files changed, 6 insertions, 9 deletions
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; } |