mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
r10006: Insert correct header file.
(This used to be commit dfa45ec1b329ad01daf81beeb31985811ce4f5af)
This commit is contained in:
parent
1da463cb48
commit
0eea337a6f
@ -60,7 +60,7 @@ sub ParserElement($$$)
|
||||
if (has_property($e, "charset")) {
|
||||
fatal($e,"charset() on non-array element") unless (defined($e->{ARRAY_LEN}) and scalar(@{$e->{ARRAY_LEN}}) > 0);
|
||||
|
||||
my $len = @{$e->{ARRAY_LEN}}[0];
|
||||
my $len = ParseExpr(@{$e->{ARRAY_LEN}}[0], $env);
|
||||
if ($len eq "*") { $len = "-1"; }
|
||||
pidl "TDR_CHECK(tdr_$t\_charset(tdr$name, &v->$e->{NAME}, $len, sizeof($e->{TYPE}_t), CH_$e->{PROPERTIES}->{charset}));";
|
||||
return;
|
||||
@ -112,6 +112,7 @@ sub ParserStruct($$$$)
|
||||
}
|
||||
|
||||
my %env = map { $_->{NAME} => "v->$_->{NAME}" } @{$e->{ELEMENTS}};
|
||||
$env{"this"} = "v";
|
||||
ParserElement($_, $t, \%env) foreach (@{$e->{ELEMENTS}});
|
||||
|
||||
if ($t eq "print") {
|
||||
@ -215,6 +216,7 @@ sub Parser($$)
|
||||
pidl "/* autogenerated by pidl */";
|
||||
pidl "#include \"includes.h\"";
|
||||
pidl "#include \"$hdrname\"";
|
||||
pidl "";
|
||||
foreach (@$idl) { ParserInterface($_) if ($_->{TYPE} eq "INTERFACE"); }
|
||||
return $ret;
|
||||
}
|
||||
@ -226,8 +228,6 @@ sub HeaderInterface($$)
|
||||
pidl "#ifndef __TDR_$x->{NAME}_HEADER__";
|
||||
pidl "#define __TDR_$x->{NAME}_HEADER__";
|
||||
|
||||
pidl "#include \"$outputdir/$x->{NAME}.h\"";
|
||||
|
||||
foreach my $e (@{$x->{DATA}}) {
|
||||
next unless ($e->{TYPE} eq "TYPEDEF");
|
||||
next unless has_property($e, "public");
|
||||
@ -251,11 +251,14 @@ sub HeaderInterface($$)
|
||||
pidl "#endif /* __TDR_$x->{NAME}_HEADER__ */";
|
||||
}
|
||||
|
||||
sub Header($$)
|
||||
sub Header($$$)
|
||||
{
|
||||
my ($idl,$outputdir) = @_;
|
||||
my ($idl,$outputdir,$basename) = @_;
|
||||
$ret = "";
|
||||
pidl "/* Generated by pidl */";
|
||||
|
||||
pidl "#include \"$outputdir/$basename.h\"";
|
||||
pidl "";
|
||||
|
||||
foreach (@$idl) {
|
||||
HeaderInterface($_, $outputdir) if ($_->{TYPE} eq "INTERFACE");
|
||||
|
@ -339,7 +339,7 @@ $dcom
|
||||
|
||||
if (defined($opt_tdr_header)) {
|
||||
require Parse::Pidl::Samba::TDR;
|
||||
FileSave($tdr_header, Parse::Pidl::Samba::TDR::Header($pidl, $outputdir));
|
||||
FileSave($tdr_header, Parse::Pidl::Samba::TDR::Header($pidl, $outputdir,$basename));
|
||||
}
|
||||
|
||||
if ($opt_template) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user