summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2008-11-07 13:23:17 +0000
committerOwen Taylor <otaylor@src.gnome.org>2008-11-07 13:23:17 +0000
commitf85ee225ce85a0dd6e8da008af6eea5c8ea736ce (patch)
tree941920fbaeab914da33cd4ad6b9df40664008672
parentd7c5b6ad2ccb76c6fe6428ea018aa7ef10fcbebc (diff)
downloadgobject-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
-rw-r--r--ChangeLog6
-rw-r--r--giscanner/giscannermodule.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 96190e5f..18fc14b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2008-11-06 Colin Walters <walters@verbum.org>
* tests/everything/*: Add some tests for strv.
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;