diff options
author | Johan Dahlin <jdahlin@litl.com> | 2009-02-25 17:38:39 (GMT) |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2009-02-25 17:38:39 (GMT) |
commit | c58582c7a88a95616fa87b81517ab8a2a76af92f (patch) | |
tree | a45e6f19ce8d6fd3ba57510984a94756e0d0ce78 /giscanner/giscannermodule.c | |
parent | a51b8305c70fedd6d989229c3d7ed46b200718e8 (diff) | |
parent | acf7c084c5e13de262d866b896e9b30a0739eecf (diff) |
Merge commit 'origin'
Diffstat (limited to 'giscanner/giscannermodule.c')
-rw-r--r-- | giscanner/giscannermodule.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/giscanner/giscannermodule.c b/giscanner/giscannermodule.c index b7ac316..7d63784 100644 --- a/giscanner/giscannermodule.c +++ b/giscanner/giscannermodule.c @@ -151,6 +151,19 @@ symbol_get_const_string (PyGISourceSymbol *self, return PyString_FromString (self->symbol->const_string); } +static PyObject * +symbol_get_source_filename (PyGISourceSymbol *self, + void *context) +{ + if (!self->symbol->source_filename) + { + Py_INCREF(Py_None); + return Py_None; + } + + return PyString_FromString (self->symbol->source_filename); +} + static const PyGetSetDef _PyGISourceSymbol_getsets[] = { /* int ref_count; */ { "type", (getter)symbol_get_type, NULL, NULL}, @@ -159,7 +172,8 @@ static const PyGetSetDef _PyGISourceSymbol_getsets[] = { { "base_type", (getter)symbol_get_base_type, NULL, NULL}, /* gboolean const_int_set; */ { "const_int", (getter)symbol_get_const_int, NULL, NULL}, - { "const_string", (getter)symbol_get_const_string, NULL, NULL}, + { "const_string", (getter)symbol_get_const_string, NULL, NULL}, + { "source_filename", (getter)symbol_get_source_filename, NULL, NULL}, { 0 } }; |