[glib] glib-mkenums: unescape \n etc. in command line arguments
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glib-mkenums: unescape \n etc. in command line arguments
- Date: Sat, 15 Jul 2017 17:02:53 +0000 (UTC)
commit 8451f0b8173cf726d0c6d5275aff465960383276
Author: Tim-Philipp Müller <tim centricular com>
Date: Sat Jul 15 10:17:48 2017 +0100
glib-mkenums: unescape \n etc. in command line arguments
Fixes generation of GStreamer enumtype files with autotools build.
https://bugzilla.gnome.org/show_bug.cgi?id=779332
gobject/glib-mkenums.in | 19 ++++++++++++-------
1 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index 99476c0..73f03d1 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -268,16 +268,21 @@ if options.version:
if options.template != '':
read_template_file(options.template)
+def unescape_cmdline_args(arg):
+ arg = arg.replace('\\n', '\n')
+ arg = arg.replace('\\r', '\r')
+ return arg.replace('\\t', '\t')
+
idprefix += options.idprefix
symprefix += options.symprefix
-fhead += options.fhead
-ftail += options.ftail
-eprod += options.eprod
-vhead += options.vhead
-vprod += options.vprod
-vtail += options.vtail
+fhead += unescape_cmdline_args(options.fhead)
+ftail += unescape_cmdline_args(options.ftail)
+eprod += unescape_cmdline_args(options.eprod)
+vhead += unescape_cmdline_args(options.vhead)
+vprod += unescape_cmdline_args(options.vprod)
+vtail += unescape_cmdline_args(options.vtail)
if options.comment_tmpl != '':
- comment_tmpl = options.comment_tmpl
+ comment_tmpl = unescape_cmdline_args(options.comment_tmpl)
output = options.output
if output is not None:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]