summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/Header.pm4
-rw-r--r--source4/pidl/lib/Parse/Pidl/Util.pm15
2 files changed, 16 insertions, 3 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
index 40fb1d3579..75d4c235cb 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
@@ -9,7 +9,7 @@ package Parse::Pidl::Samba4::Header;
use strict;
use Parse::Pidl qw(fatal);
use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
-use Parse::Pidl::Util qw(has_property is_constant);
+use Parse::Pidl::Util qw(has_property is_constant unmake_str);
use Parse::Pidl::Samba4 qw(is_intree ElementStars ArrayBrackets);
use vars qw($VERSION);
@@ -375,7 +375,7 @@ sub HeaderQuote($)
{
my($quote) = shift;
- pidl $quote->{DATA};
+ pidl unmake_str($quote->{DATA}) . "\n";
}
#####################################################################
diff --git a/source4/pidl/lib/Parse/Pidl/Util.pm b/source4/pidl/lib/Parse/Pidl/Util.pm
index 8716094abd..006718d139 100644
--- a/source4/pidl/lib/Parse/Pidl/Util.pm
+++ b/source4/pidl/lib/Parse/Pidl/Util.pm
@@ -6,7 +6,7 @@ package Parse::Pidl::Util;
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(has_property property_matches ParseExpr ParseExprExt is_constant make_str print_uuid MyDumper);
+@EXPORT = qw(has_property property_matches ParseExpr ParseExprExt is_constant make_str unmake_str print_uuid MyDumper);
use vars qw($VERSION);
$VERSION = '0.01';
@@ -104,6 +104,19 @@ sub make_str($)
return "\"$str\"";
}
+=item B<unmake_str>
+unquote a "" quoted string
+
+=cut
+sub unmake_str($)
+{
+ my $str = shift;
+
+ $str =~ s/^\"(.*)\"$/$1/;
+
+ return $str;
+}
+
=item B<print_uuid>
Print C representation of a UUID.