summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/NDR.pm
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-07-27 15:52:16 +0200
committerKarolin Seeger <kseeger@samba.org>2012-04-10 20:35:23 +0200
commit779380df6a9c79bd64045e7c5d0725b5953dc96f (patch)
tree6b214e912e983bb163e5b1d562b95033dc81a90e /pidl/lib/Parse/Pidl/NDR.pm
parent1cb51ea4230c655057c157eba10462a2443727b6 (diff)
downloadsamba-779380df6a9c79bd64045e7c5d0725b5953dc96f.tar.gz
pidl: add support for [string] on fixed size arrays.
midl also supports this: struct { long l1; [string] wchar_t str[16]; long l2; }; Where the wire size of str is encoded like a length_is() header: 4-byte offset == 0; 4-byte array length; The strings are zero terminated. metze (cherry picked from commit 7ccc9a6ef563cc855752b4e74152420b9be5af43) (cherry picked from commit 75aeb61c38efe28503991834fb5181537cdffc68)
Diffstat (limited to 'pidl/lib/Parse/Pidl/NDR.pm')
-rw-r--r--pidl/lib/Parse/Pidl/NDR.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm
index 5ee26d16b68..6e072a19cc9 100644
--- a/pidl/lib/Parse/Pidl/NDR.pm
+++ b/pidl/lib/Parse/Pidl/NDR.pm
@@ -141,6 +141,13 @@ sub GetElementLevelTable($$)
$is_fixed = 1 if (not $is_conformant and Parse::Pidl::Util::is_constant($size));
$is_inline = 1 if (not $is_conformant and not Parse::Pidl::Util::is_constant($size));
+ if ($i == 0 and $is_fixed and has_property($e, "string")) {
+ $is_fixed = 0;
+ $is_varying = 1;
+ $is_string = 1;
+ delete($e->{PROPERTIES}->{string});
+ }
+
push (@$order, {
TYPE => "ARRAY",
SIZE_IS => $size,