diff options
author | Johan Dahlin <johan@gnome.org> | 2010-09-19 11:33:38 -0300 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-09-19 12:04:20 -0300 |
commit | cb61330eb495786bf8232ebcb51b0d6d9a753ce7 (patch) | |
tree | 544f43868003c027ad127e497ba9f959da12da37 /giscanner/giscannermodule.c | |
parent | 9180641a496b26b5d5a720a2f2a61c710f094d2a (diff) | |
download | gobject-introspection-cb61330eb495786bf8232ebcb51b0d6d9a753ce7.tar.gz |
Save the line number of a source comment
Diffstat (limited to 'giscanner/giscannermodule.c')
-rw-r--r-- | giscanner/giscannermodule.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c index 2d2e073e..b4aae792 100644 --- a/giscanner/giscannermodule.c +++ b/giscanner/giscannermodule.c @@ -517,14 +517,17 @@ pygi_source_scanner_get_comments (PyGISourceScanner *self) GSList *l, *comments; PyObject *list; int i = 0; - + comments = gi_source_scanner_get_comments (self->scanner); list = PyList_New (g_slist_length (comments)); - + for (l = comments; l; l = l->next) { - PyObject *item = PyString_FromString (l->data); - PyList_SetItem (list, i++, item); + GISourceComment *comment = l->data; + PyObject *item = Py_BuildValue ("(ssi)", comment->comment, + comment->filename, + comment->line); + PyList_SET_ITEM (list, i++, item); Py_INCREF (item); } |