summaryrefslogtreecommitdiff
path: root/giscanner/scannerlexer.l
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-10-17 17:43:48 +0200
committerColin Walters <walters@verbum.org>2013-10-17 15:04:50 -0400
commitebb80508d6959a0c94351e841c2cab6220602e62 (patch)
treeda08996f1ce0f1904a6bd64eabb7d6665b0364bc /giscanner/scannerlexer.l
parent65a0fa4c4e005047af7ec029c733bed4bd80292f (diff)
downloadgobject-introspection-ebb80508d6959a0c94351e841c2cab6220602e62.tar.gz
giscanner: remove g_realpath
giscannermodule expects file names to be canonicalized and symlinks to be resolved (most likely to support users of symlinked /usr/local). Instead of computing absolute and real paths all over the place, we can do this once on entry in SourceScanner().parse_files() and SourceScanner().parse_macros() and clean the rest a bit... https://bugzilla.gnome.org/show_bug.cgi?id=710320
Diffstat (limited to 'giscanner/scannerlexer.l')
-rw-r--r--giscanner/scannerlexer.l11
1 files changed, 2 insertions, 9 deletions
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index 91f50cb9..f30191db 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -35,7 +35,6 @@
#include <glib.h>
#include "sourcescanner.h"
#include "scannerparser.h"
-#include "grealpath.h"
int lineno;
char linebuf[2000];
@@ -316,17 +315,11 @@ process_linemarks (GISourceScanner *scanner)
{
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_object_unref (scanner->current_file);
- scanner->current_file = g_file_new_for_path (real);
- } else {
- g_free (real);
- }
+ g_object_unref (scanner->current_file);
+ scanner->current_file = g_file_new_for_path (filename);
g_free (filename);
}