diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-10-17 17:43:48 +0200 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-10-17 15:04:50 -0400 |
commit | ebb80508d6959a0c94351e841c2cab6220602e62 (patch) | |
tree | da08996f1ce0f1904a6bd64eabb7d6665b0364bc /giscanner/giscannermodule.c | |
parent | 65a0fa4c4e005047af7ec029c733bed4bd80292f (diff) | |
download | gobject-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/giscannermodule.c')
-rw-r--r-- | giscanner/giscannermodule.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c index 2f4c0e8a..2f413a02 100644 --- a/giscanner/giscannermodule.c +++ b/giscanner/giscannermodule.c @@ -28,7 +28,6 @@ #ifdef G_OS_WIN32 #define USE_WINDOWS #endif -#include "grealpath.h" #ifdef _WIN32 #include <fcntl.h> @@ -361,7 +360,7 @@ pygi_source_scanner_append_filename (PyGISourceScanner *self, if (!PyArg_ParseTuple (args, "s:SourceScanner.append_filename", &filename)) return NULL; - file = g_file_new_for_path (g_realpath (filename)); + file = g_file_new_for_path (filename); g_hash_table_add (self->scanner->files, file); Py_INCREF (Py_None); @@ -517,7 +516,7 @@ pygi_source_scanner_lex_filename (PyGISourceScanner *self, if (!PyArg_ParseTuple (args, "s:SourceScanner.lex_filename", &filename)) return NULL; - self->scanner->current_file = g_file_new_for_path ( g_realpath (filename)); + self->scanner->current_file = g_file_new_for_path (filename); if (!gi_source_scanner_lex_filename (self->scanner, filename)) { g_print ("Something went wrong during lexing.\n"); |