gobject-introspection r167 - in trunk: . giscanner tools
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r167 - in trunk: . giscanner tools
- Date: Tue, 25 Mar 2008 22:07:17 +0000 (GMT)
Author: johan
Date: Tue Mar 25 22:07:17 2008
New Revision: 167
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=167&view=rev
Log:
2008-03-25 Johan Dahlin <johan gnome org>
* giscanner/__init__.py:
* tools/g-ir-scanner:
Fix a typo and add an example python test program.
Added:
trunk/tools/g-ir-scanner (contents, props changed)
Modified:
trunk/ChangeLog
trunk/giscanner/__init__.py
Modified: trunk/giscanner/__init__.py
==============================================================================
--- trunk/giscanner/__init__.py (original)
+++ trunk/giscanner/__init__.py Tue Mar 25 22:07:17 2008
@@ -35,9 +35,9 @@
FUNCTION_NONE = 0
FUNCTION_INLINE = 1 << 1
-UNARY_ADDRESS_OF
-UNARY_POINTER_INDIRECTION
-UNARY_PLUS
-UNARY_MINUS
-UNARY_BITWISE_COMPLEMENT
-UNARY_LOGICAL_NEGATION
+(UNARY_ADDRESS_OF,
+ UNARY_POINTER_INDIRECTION,
+ UNARY_PLUS,
+ UNARY_MINUS,
+ UNARY_BITWISE_COMPLEMENT,
+ UNARY_LOGICAL_NEGATION) = range(6)
Added: trunk/tools/g-ir-scanner
==============================================================================
--- (empty file)
+++ trunk/tools/g-ir-scanner Tue Mar 25 22:07:17 2008
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+import os
+import sys
+
+sys.path.insert(0, '.')
+
+import giscanner
+
+def main(args):
+ if len(args) == 1:
+ print 'ERROR: Needs at least one filename.'
+ return 0
+
+ scan = giscanner.SourceScanner()
+ for arg in args[1:]:
+ filename = os.path.abspath(arg)
+ scan.parse_file(filename)
+
+ print '-'*30
+ for symbol in scan.get_symbols():
+ print symbol
+ print symbol.ident, symbol.type
+ print symbol.base_type.name
+ print '-'*30
+
+sys.exit(main(sys.argv))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]