diff options
author | Jörg Mayer <jmayer@loplof.de> | 2006-11-17 09:29:36 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2006-11-17 09:29:36 +0000 |
commit | 6c69e04adb5ed2da5eee5511729a2abd6626c47c (patch) | |
tree | 9c038eb4e5589af2f010d78f15dab5e59b6e253e /tools | |
parent | 8868b231bdaea752ea8ccfc5a8f9f6603bfb5780 (diff) |
Update from samba tree revision 19744 to 19759
============================ Samba log start ============
------------------------------------------------------------------------
r19751 | jelmer | 2006-11-16 23:11:32 +0100 (Thu, 16 Nov 2006) | 2 lines
Changed paths:
M /branches/SAMBA_4_0/source/pidl/tests/parse_idl.pl
Add some tests for parsing the "include", "import" and "importlib" statements.
------------------------------------------------------------------------
r19752 | jelmer | 2006-11-16 23:13:44 +0100 (Thu, 16 Nov 2006) | 2 lines
Changed paths:
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
Remove support for the `depends' attribute (use "import") instead.
------------------------------------------------------------------------
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=19920
Diffstat (limited to 'tools')
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/NDR.pm | 5 | ||||
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/Samba4/EJS.pm | 4 | ||||
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/Samba4/Header.pm | 4 | ||||
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 4 | ||||
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 3 | ||||
-rwxr-xr-x | tools/pidl/tests/parse_idl.pl | 10 |
6 files changed, 9 insertions, 21 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/NDR.pm b/tools/pidl/lib/Parse/Pidl/NDR.pm index 86bd62044b..a80bb954c1 100644 --- a/tools/pidl/lib/Parse/Pidl/NDR.pm +++ b/tools/pidl/lib/Parse/Pidl/NDR.pm @@ -766,7 +766,6 @@ my %property_list = ( "endpoint" => ["INTERFACE"], "pointer_default" => ["INTERFACE"], "pointer_default_top" => ["INTERFACE"], - "depends" => ["INTERFACE"], "helper" => ["INTERFACE"], "authservice" => ["INTERFACE"], @@ -1045,10 +1044,6 @@ sub ValidInterface($) my($interface) = shift; my($data) = $interface->{DATA}; - if (has_property($interface, "depends")) { - nonfatal $interface, "depends() is pidl-specific and deprecated. Use `import' instead"; - } - if (has_property($interface, "helper")) { nonfatal $interface, "helper() is pidl-specific and deprecated. Use `include' instead"; } diff --git a/tools/pidl/lib/Parse/Pidl/Samba4/EJS.pm b/tools/pidl/lib/Parse/Pidl/Samba4/EJS.pm index bb3b36dca4..960f610cd9 100644 --- a/tools/pidl/lib/Parse/Pidl/Samba4/EJS.pm +++ b/tools/pidl/lib/Parse/Pidl/Samba4/EJS.pm @@ -753,10 +753,6 @@ sub EjsInterface($$) pidl_hdr "#ifndef _HEADER_EJS_$interface->{NAME}\n"; pidl_hdr "#define _HEADER_EJS_$interface->{NAME}\n\n"; - if (has_property($interface, "depends")) { - EjsImport(split / /, $interface->{PROPERTIES}->{depends}); - } - pidl_hdr "\n"; foreach my $d (@{$interface->{TYPES}}) { diff --git a/tools/pidl/lib/Parse/Pidl/Samba4/Header.pm b/tools/pidl/lib/Parse/Pidl/Samba4/Header.pm index 6a999d4147..da7d39a238 100644 --- a/tools/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/tools/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -334,10 +334,6 @@ sub HeaderInterface($) pidl "#ifndef _HEADER_$interface->{NAME}\n"; pidl "#define _HEADER_$interface->{NAME}\n\n"; - if (defined $interface->{PROPERTIES}->{depends}) { - HeaderImport(split / /, $interface->{PROPERTIES}->{depends}); - } - foreach my $d (@{$interface->{DATA}}) { next if ($d->{TYPE} ne "CONST"); HeaderConst($d); diff --git a/tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 80d02cb533..d871ed38bb 100644 --- a/tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -2258,10 +2258,6 @@ sub HeaderInterface($) pidl choose_header("librpc/gen_ndr/ndr_orpc.h", "ndr/orpc.h"); } - if (defined $interface->{PROPERTIES}->{depends}) { - HeaderImport(split / /, $interface->{PROPERTIES}->{depends}); - } - if (defined $interface->{PROPERTIES}->{helper}) { HeaderInclude(split / /, $interface->{PROPERTIES}->{helper}); } diff --git a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 7b8691e044..14b922353a 100644 --- a/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -747,9 +747,6 @@ sub ProcessInterface($) pidl_hdr "#define $define"; pidl_hdr ""; - ProcessImport(split / /, $x->{PROPERTIES}->{depends}) if - (defined $x->{PROPERTIES}->{depends}); - pidl_def "static gint proto_dcerpc_$x->{NAME} = -1;"; register_ett("ett_dcerpc_$x->{NAME}"); register_hf_field("hf_$x->{NAME}_opnum", "Operation", "$x->{NAME}.opnum", "FT_UINT16", "BASE_DEC", "NULL", 0, ""); diff --git a/tools/pidl/tests/parse_idl.pl b/tools/pidl/tests/parse_idl.pl index 8114cd9992..ebdb8ae58a 100755 --- a/tools/pidl/tests/parse_idl.pl +++ b/tools/pidl/tests/parse_idl.pl @@ -4,7 +4,7 @@ # Published under the GNU General Public License use strict; -use Test::More tests => 51; +use Test::More tests => 59; use FindBin qw($RealBin); use lib "$RealBin/../lib"; use Parse::Pidl::IDL; @@ -80,3 +80,11 @@ testok "bitmapqual", "interface test { struct x { bitmap y z; }; };"; testok "emptystructdecl", "interface test { struct x; };"; testok "emptyenumdecl", "interface test { enum x; };"; testok "emptytdstructdecl", "interface test { typedef struct x y; };"; +testok "import", "import \"foo.idl\";"; +testok "include", "include \"foo.h\";"; +testfail "import-noquotes", "import foo.idl;"; +testfail "include-noquotes", "include foo.idl;"; +testok "importlib", "importlib \"foo.idl\";"; +testfail "import-nosemicolon", "import \"foo.idl\""; +testok "import-multiple", "import \"foo.idl\", \"bar.idl\";"; +testok "include-multiple", "include \"foo.idl\", \"bar.idl\";"; |