diff options
author | Johan Dahlin <johan@gnome.org> | 2008-05-03 14:36:47 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-05-03 14:36:47 +0000 |
commit | b7e6d64c635284ec8a5315d2365722f1b00626f8 (patch) | |
tree | e13e7148e4294d960e1a851f24e3c9f8bc2a1042 /giscanner/__init__.py | |
parent | 8b449c3170c3e5cc0ce477de172913558ee7a9e1 (diff) | |
download | gobject-introspection-b7e6d64c635284ec8a5315d2365722f1b00626f8.tar.gz |
Parse struct fields properly, improve debugging.
2008-05-03 Johan Dahlin <johan@gnome.org>
* giscanner/__init__.py:
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
Parse struct fields properly, improve debugging.
svn path=/trunk/; revision=261
Diffstat (limited to 'giscanner/__init__.py')
-rw-r--r-- | giscanner/__init__.py | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/giscanner/__init__.py b/giscanner/__init__.py index 74a7f4a4..532d779b 100644 --- a/giscanner/__init__.py +++ b/giscanner/__init__.py @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301, USA. # (CSYMBOL_TYPE_INVALID, @@ -58,3 +59,16 @@ FUNCTION_INLINE = 1 << 1 UNARY_MINUS, UNARY_BITWISE_COMPLEMENT, UNARY_LOGICAL_NEGATION) = range(6) + +def symbol_type_name(symbol_type): + return { + CSYMBOL_TYPE_INVALID: 'invalid', + CSYMBOL_TYPE_CONST: 'const', + CSYMBOL_TYPE_OBJECT: 'object', + CSYMBOL_TYPE_FUNCTION: 'function', + CSYMBOL_TYPE_STRUCT: 'struct', + CSYMBOL_TYPE_UNION: 'union', + CSYMBOL_TYPE_ENUM: 'enum', + CSYMBOL_TYPE_TYPEDEF: 'typedef' + }.get(symbol_type) + |