diff options
author | Owen Taylor <otaylor@redhat.com> | 2008-11-07 13:23:17 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2008-11-07 13:23:17 +0000 |
commit | f85ee225ce85a0dd6e8da008af6eea5c8ea736ce (patch) | |
tree | 941920fbaeab914da33cd4ad6b9df40664008672 /giscanner/giscannermodule.c | |
parent | d7c5b6ad2ccb76c6fe6428ea018aa7ef10fcbebc (diff) | |
download | gobject-introspection-f85ee225ce85a0dd6e8da008af6eea5c8ea736ce.tar.gz |
Set current_filename before lexing the file so error messages are reported
2008-11-07 Owen Taylor <otaylor@redhat.com>
* giscanner/giscannermodule.c (pygi_source_scanner_lex_filename):
Set current_filename before lexing the file so error messages
are reported in the right file.
svn path=/trunk/; revision=866
Diffstat (limited to 'giscanner/giscannermodule.c')
-rw-r--r-- | giscanner/giscannermodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c index 056e20d1..df1ba095 100644 --- a/giscanner/giscannermodule.c +++ b/giscanner/giscannermodule.c @@ -505,6 +505,7 @@ pygi_source_scanner_lex_filename (PyGISourceScanner *self, if (!PyArg_ParseTuple (args, "s:SourceScanner.lex_filename", &filename)) return NULL; + self->scanner->current_filename = g_strdup (filename); if (!gi_source_scanner_lex_filename (self->scanner, filename)) { g_print ("Something went wrong during lexing.\n"); @@ -512,7 +513,6 @@ pygi_source_scanner_lex_filename (PyGISourceScanner *self, } self->scanner->filenames = g_list_append (self->scanner->filenames, g_strdup (filename)); - self->scanner->current_filename = g_strdup (filename); Py_INCREF (Py_None); return Py_None; |