summaryrefslogtreecommitdiff
path: root/source4/build/pidl/util.pm
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-27 04:43:01 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:49 -0500
commit1a7a5c66f5dd3d28d57cb53e8d5089452b49b0aa (patch)
tree722499a79c043184ce4f03a78ccf042c592e1c4a /source4/build/pidl/util.pm
parentba450de07c08c7a5a803e59b7133c06e2f0b9682 (diff)
downloadsamba-1a7a5c66f5dd3d28d57cb53e8d5089452b49b0aa.tar.gz
samba-1a7a5c66f5dd3d28d57cb53e8d5089452b49b0aa.tar.bz2
samba-1a7a5c66f5dd3d28d57cb53e8d5089452b49b0aa.zip
r3282: some C pre-processors don't like expressions like
uuid(1ff70682-0a51-30e8-076d-740be8cee98b) so we now accept uuid("1ff70682-0a51-30e8-076d-740be8cee98b") in pidl, and automagically add quotes only if needed (This used to be commit 4aab2cb210eb9678bb72aebb33dcf6fd499206c1)
Diffstat (limited to 'source4/build/pidl/util.pm')
-rw-r--r--source4/build/pidl/util.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm
index 5934f8a7e1..5fbca25220 100644
--- a/source4/build/pidl/util.pm
+++ b/source4/build/pidl/util.pm
@@ -390,5 +390,15 @@ sub is_inline_array($)
return 0;
}
+# return a "" quoted string, unless already quoted
+sub make_str($)
+{
+ my $str = shift;
+ if (substr($str, 0, 1) eq "\"") {
+ return $str;
+ }
+ return "\"" . $str . "\"";
+}
+
1;