summaryrefslogtreecommitdiff
path: root/giscanner/scannerlexer.l
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-10-17 08:03:02 +0200
committerColin Walters <walters@verbum.org>2013-10-17 15:03:18 -0400
commit69d2fe30289795b3daf099a5f84ff9216dc6ed44 (patch)
tree5ac19aad6788c55c8a0428ae31c09032c34e2e94 /giscanner/scannerlexer.l
parentce1e2a2cc609b2e9e36c741e72bcfa5859ed6b62 (diff)
downloadgobject-introspection-69d2fe30289795b3daf099a5f84ff9216dc6ed44.tar.gz
giscanner: restore linemark filename unescaping
This was broken in 0d6db7114a176c2d24a19a2d6a570aab406608ac where the unescaped filename was still computed but no longer used... https://bugzilla.gnome.org/show_bug.cgi?id=710320
Diffstat (limited to 'giscanner/scannerlexer.l')
-rw-r--r--giscanner/scannerlexer.l29
1 files changed, 14 insertions, 15 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index f7199ff4..2e3d0ab7 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -316,21 +316,20 @@ check_identifier (GISourceScanner *scanner,
static void
process_linemarks (GISourceScanner *scanner)
{
- char filename[1025];
- char *compress;
- char *real;
-
- sscanf(yytext, "# %d \"%1024[^\"]\"", &lineno, filename);
-
- compress = g_strcompress (filename);
- real = g_realpath (filename);
- if (real) {
- g_free (scanner->current_filename);
- scanner->current_filename = real;
- } else {
- g_free (real);
- }
- g_free (compress);
+ char escaped_filename[1025];
+ char *filename;
+ char *real;
+
+ sscanf(yytext, "# %d \"%1024[^\"]\"", &lineno, escaped_filename);
+ filename = g_strcompress (escaped_filename);
+ real = g_realpath (filename);
+ if (real) {
+ g_free (scanner->current_filename);
+ scanner->current_filename = real;
+ } else {
+ g_free (real);
+ }
+ g_free (filename);
}
/*