diff options
author | Jörg Mayer <jmayer@loplof.de> | 2007-03-07 07:55:00 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2007-03-07 07:55:00 +0000 |
commit | d4ead590a1a398f2df3814ad863a62e682bcdae8 (patch) | |
tree | 73e004960163e872ca161612ceed955ba67b950f /tools/pidl/lib/Parse/Pidl/Samba4/Header.pm | |
parent | 83ee2dbcfa8c3b635dadcb9d7d903e4001f532a9 (diff) |
Update from samba tree revision 21565 to 21739
============================ Samba log start ============
------------------------------------------------------------------------
r21567 | jelmer | 2007-02-27 21:35:56 +0100 (Tue, 27 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
M /branches/SAMBA_4_0/source/pidl/tests/wireshark-ndr.pl
Add some more wireshark tests.
------------------------------------------------------------------------
r21568 | jelmer | 2007-02-27 22:37:31 +0100 (Tue, 27 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
M /branches/SAMBA_4_0/source/pidl/tests/wireshark-ndr.pl
More tests.
------------------------------------------------------------------------
r21572 | jelmer | 2007-02-28 00:47:07 +0100 (Wed, 28 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
M /branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl
M /branches/SAMBA_4_0/source/pidl/tests/typelist.pl
More work towards supporting tagged types.
------------------------------------------------------------------------
r21573 | jelmer | 2007-02-28 01:19:57 +0100 (Wed, 28 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
M /branches/SAMBA_4_0/source/pidl/tests/typelist.pl
Remove more code that assumed all types are typedefs.
------------------------------------------------------------------------
r21574 | jelmer | 2007-02-28 01:28:14 +0100 (Wed, 28 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
Fix handling of DECLARE.
------------------------------------------------------------------------
r21575 | jelmer | 2007-02-28 01:35:21 +0100 (Wed, 28 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Typelist.pm
M /branches/SAMBA_4_0/source/pidl/tests/typelist.pl
Fix handling of is_scalar() for declares.
------------------------------------------------------------------------
r21578 | jelmer | 2007-02-28 02:51:37 +0100 (Wed, 28 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/README
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/ndr_tagtype.pl
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Use utility function for naming pull/push/print functions.
------------------------------------------------------------------------
r21579 | jelmer | 2007-02-28 03:01:58 +0100 (Wed, 28 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ejs.pl
Use utility function to determine function names in ejs code.
------------------------------------------------------------------------
r21584 | jelmer | 2007-02-28 14:25:53 +0100 (Wed, 28 Feb 2007) | 6 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/librpc/idl/echo.idl
M /branches/SAMBA_4_0/source/pidl/README
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/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/ndr.pl
M /branches/SAMBA_4_0/source/pidl/tests/typelist.pl
Support for tagged types has landed!
It's now possible to use "struct foo" without a typedef in IDL files.
echo_info4 is the first type that's been converted.
------------------------------------------------------------------------
r21586 | jelmer | 2007-02-28 15:56:46 +0100 (Wed, 28 Feb 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/MANIFEST
update manifest
------------------------------------------------------------------------
r21654 | jelmer | 2007-03-02 15:05:52 +0100 (Fri, 02 Mar 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
M /branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl
Add simple test for print functions.
------------------------------------------------------------------------
r21656 | jelmer | 2007-03-02 15:53:09 +0100 (Fri, 02 Mar 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
A /branches/SAMBA_4_0/source/lib/registry/tests
A /branches/SAMBA_4_0/source/lib/registry/tests/generic.c (from /branches/SAMBA_4_0/source/torture/local/registry.c:21654)
A /branches/SAMBA_4_0/source/lib/socket/testsuite.c (from /branches/SAMBA_4_0/source/torture/local/socket.c:21654)
A /branches/SAMBA_4_0/source/lib/tdr/testsuite.c (from /branches/SAMBA_4_0/source/torture/local/tdr.c:21654)
A /branches/SAMBA_4_0/source/lib/util/tests
A /branches/SAMBA_4_0/source/lib/util/tests/file.c (from /branches/SAMBA_4_0/source/torture/local/util_file.c:21654)
A /branches/SAMBA_4_0/source/lib/util/tests/idtree.c (from /branches/SAMBA_4_0/source/torture/local/idtree.c:21654)
A /branches/SAMBA_4_0/source/lib/util/tests/strlist.c (from /branches/SAMBA_4_0/source/torture/local/util_strlist.c:21654)
A /branches/SAMBA_4_0/source/librpc/tests
A /branches/SAMBA_4_0/source/librpc/tests/binding_string.c (from /branches/SAMBA_4_0/source/torture/local/binding_string.c:21654)
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
D /branches/SAMBA_4_0/source/torture/local/binding_string.c
M /branches/SAMBA_4_0/source/torture/local/config.mk
D /branches/SAMBA_4_0/source/torture/local/idtree.c
D /branches/SAMBA_4_0/source/torture/local/registry.c
D /branches/SAMBA_4_0/source/torture/local/socket.c
D /branches/SAMBA_4_0/source/torture/local/tdr.c
D /branches/SAMBA_4_0/source/torture/local/util_file.c
D /branches/SAMBA_4_0/source/torture/local/util_strlist.c
Move tests a bit closer to the things they test, should make syncing with samba3 easier.
------------------------------------------------------------------------
r21681 | jelmer | 2007-03-04 15:16:52 +0100 (Sun, 04 Mar 2007) | 5 lines
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/TODO
M /branches/SAMBA_4_0/source/pidl/idl.yp
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/IDL.pm
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/parse_idl.pl
Fix bug in the parsing code that parsed "struct foo;" the same as
"struct foo {};".
Reported by one of the OpenChange folks, thanks!
------------------------------------------------------------------------
r21682 | jelmer | 2007-03-04 15:31:18 +0100 (Sun, 04 Mar 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
Remove accidently committed debug command.
------------------------------------------------------------------------
r21690 | jelmer | 2007-03-05 01:03:44 +0100 (Mon, 05 Mar 2007) | 1 line
Changed paths:
M /branches/SAMBA_4_0
M /branches/SAMBA_4_0/source/pidl/tests/header.pl
M /branches/SAMBA_4_0/source/pidl/tests/parse_idl.pl
Test use of typedef /and/ struct name
------------------------------------------------------------------------
------------------------------------------------------------------------
============================ Samba log end ==============
svn path=/trunk/; revision=20992
Diffstat (limited to 'tools/pidl/lib/Parse/Pidl/Samba4/Header.pm')
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/Samba4/Header.pm | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/Samba4/Header.pm b/tools/pidl/lib/Parse/Pidl/Samba4/Header.pm index 11ecc17001..2eddf22b05 100644 --- a/tools/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/tools/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -57,7 +57,11 @@ sub HeaderElement($) if (has_property($element, "represent_as")) { pidl mapTypeName($element->{PROPERTIES}->{represent_as})." "; } else { - HeaderType($element, $element->{TYPE}, ""); + if (ref($element->{TYPE}) eq "HASH") { + HeaderType($element, $element->{TYPE}, $element->{TYPE}->{NAME}); + } else { + HeaderType($element, $element->{TYPE}, ""); + } pidl " "; my $numstar = $element->{POINTERS}; if ($numstar >= 1) { @@ -90,14 +94,14 @@ sub HeaderElement($) sub HeaderStruct($$) { my($struct,$name) = @_; - pidl "struct $name {\n"; + pidl "struct $name"; + return if (not defined($struct->{ELEMENTS})); + pidl " {\n"; $tab_depth++; my $el_count=0; - if (defined $struct->{ELEMENTS}) { - foreach (@{$struct->{ELEMENTS}}) { - HeaderElement($_); - $el_count++; - } + foreach (@{$struct->{ELEMENTS}}) { + HeaderElement($_); + $el_count++; } if ($el_count == 0) { # some compilers can't handle empty structures @@ -174,7 +178,9 @@ sub HeaderUnion($$) my($union,$name) = @_; my %done = (); - pidl "union $name {\n"; + pidl "union $name"; + return if (not defined($union->{ELEMENTS})); + pidl " {\n"; $tab_depth++; foreach my $e (@{$union->{ELEMENTS}}) { if ($e->{TYPE} ne "EMPTY") { |