diff options
author | Alan Knowles <alan@akbkhome.com> | 2010-04-04 16:52:24 +0800 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-05-25 14:02:37 -0300 |
commit | ef76b0e4ef0a5d4790147a746a944c5fd5f91159 (patch) | |
tree | 7e7848a88f1d8486244583cd134904ac925734e0 /giscanner/giscannermodule.c | |
parent | f18a979634d427615f08995290c3a9d3aa50d12e (diff) | |
download | gobject-introspection-ef76b0e4ef0a5d4790147a746a944c5fd5f91159.tar.gz |
[sourcescanner] Support for line numbers on Symbol
Add line numbers to symbols, which can be useful
in later stages of the scanner.
Diffstat (limited to 'giscanner/giscannermodule.c')
-rw-r--r-- | giscanner/giscannermodule.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c index 0b24714a..2d2e073e 100644 --- a/giscanner/giscannermodule.c +++ b/giscanner/giscannermodule.c @@ -112,6 +112,13 @@ symbol_get_type (PyGISourceSymbol *self, } static PyObject * +symbol_get_line (PyGISourceSymbol *self, + void *context) +{ + return PyInt_FromLong (self->symbol->line); +} + +static PyObject * symbol_get_ident (PyGISourceSymbol *self, void *context) { @@ -194,6 +201,7 @@ static const PyGetSetDef _PyGISourceSymbol_getsets[] = { { "const_double", (getter)symbol_get_const_double, NULL, NULL}, { "const_string", (getter)symbol_get_const_string, NULL, NULL}, { "source_filename", (getter)symbol_get_source_filename, NULL, NULL}, + { "line", (getter)symbol_get_line, NULL, NULL}, { 0 } }; |