summaryrefslogtreecommitdiff
path: root/source4/build/pidl/Parse/Pidl/Samba/Header.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-08-21 01:59:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:15 -0500
commitdf3248f1087549d0fd11e003b3f1ac61b97aa7f7 (patch)
tree0ea7e64645ccfe21a1df15127aea8fa5ec48c783 /source4/build/pidl/Parse/Pidl/Samba/Header.pm
parent997da16d6c7bd85ac9e3042fe874f8a5f79208b3 (diff)
downloadsamba-df3248f1087549d0fd11e003b3f1ac61b97aa7f7.tar.gz
samba-df3248f1087549d0fd11e003b3f1ac61b97aa7f7.tar.bz2
samba-df3248f1087549d0fd11e003b3f1ac61b97aa7f7.zip
r9441: Use "const char *" for fixed-size arrays with charset() because
these can require more elements in the local charset (usually UTF8) then in the wire one. (This used to be commit a0e63c2691f596cdacbc2e15404829ebca075429)
Diffstat (limited to 'source4/build/pidl/Parse/Pidl/Samba/Header.pm')
-rw-r--r--source4/build/pidl/Parse/Pidl/Samba/Header.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/source4/build/pidl/Parse/Pidl/Samba/Header.pm b/source4/build/pidl/Parse/Pidl/Samba/Header.pm
index ca67b7c09f..d88b37e229 100644
--- a/source4/build/pidl/Parse/Pidl/Samba/Header.pm
+++ b/source4/build/pidl/Parse/Pidl/Samba/Header.pm
@@ -59,14 +59,16 @@ sub HeaderElement($)
my $numstar = $element->{POINTERS};
foreach (@{$element->{ARRAY_LEN}})
{
- next if is_constant($_);
+ next if is_constant($_) and
+ not has_property($element, "charset");
$numstar++;
}
$numstar-- if Parse::Pidl::Typelist::scalar_is_reference($element->{TYPE});
pidl "*" foreach (1..$numstar);
pidl $element->{NAME};
foreach (@{$element->{ARRAY_LEN}}) {
- next unless is_constant($_);
+ next unless (is_constant($_) and
+ not has_property($element, "charset"));
pidl "[$_]";
}
@@ -199,11 +201,7 @@ sub HeaderType($$$)
}
if (has_property($e, "charset")) {
- if ($e->{POINTERS} > 0) {
- pidl "const char";
- } else {
- pidl "char";
- }
+ pidl "const char";
} else {
pidl mapType($e->{TYPE});
}