svn commit: samba r4843 - in branches/SAMBA_4_0/source/build/pidl: .

tridge at samba.org tridge at samba.org
Wed Jan 19 11:58:40 GMT 2005


Author: tridge
Date: 2005-01-19 11:58:40 +0000 (Wed, 19 Jan 2005)
New Revision: 4843

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4843

Log:
fixed the alignment handling of enumerated types



Modified:
   branches/SAMBA_4_0/source/build/pidl/parser.pm
   branches/SAMBA_4_0/source/build/pidl/util.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/parser.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/parser.pm	2005-01-19 11:24:29 UTC (rev 4842)
+++ branches/SAMBA_4_0/source/build/pidl/parser.pm	2005-01-19 11:58:40 UTC (rev 4843)
@@ -192,6 +192,8 @@
 				if (defined $structs{$e->{TYPE}}->{DATA}) {
 					$a = union_alignment($structs{$e->{TYPE}}->{DATA});
 				}
+			} elsif ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "ENUM") {
+				$a = util::type_align($e);
 			}
 		} else {
 			$a = util::type_align($e);

Modified: branches/SAMBA_4_0/source/build/pidl/util.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/util.pm	2005-01-19 11:24:29 UTC (rev 4842)
+++ branches/SAMBA_4_0/source/build/pidl/util.pm	2005-01-19 11:58:40 UTC (rev 4843)
@@ -335,6 +335,11 @@
 	    return $ret;
     }
 
+    if (is_enum($type)) {
+	    my $ret = type_align(get_enum($type));
+	    return $ret;
+    }
+
     # it must be an external type - all we can do is guess 
     return 4;
 }



More information about the samba-cvs mailing list