gobject-introspection r421 - in trunk: . giscanner



Author: walters
Date: Wed Aug 20 19:11:03 2008
New Revision: 421
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=421&view=rev

Log:
2008-08-20  Colin Walters  <walters verbum org>

	* girepository/transformer.py: Suppress aliases whose
	name is a builtin.
	* girepository/ast.py: Define some more aliases.


Modified:
   trunk/ChangeLog
   trunk/giscanner/ast.py
   trunk/giscanner/transformer.py

Modified: trunk/giscanner/ast.py
==============================================================================
--- trunk/giscanner/ast.py	(original)
+++ trunk/giscanner/ast.py	Wed Aug 20 19:11:03 2008
@@ -98,6 +98,11 @@
 type_names['ssize_t'] = TYPE_SSIZET
 type_names['time_t'] = TYPE_LONG
 
+# Suppress some GLib names
+type_names['uchar'] = TYPE_UINT8
+type_names['ushort'] = TYPE_UINT16
+type_names['pointer'] = TYPE_ANY
+type_names['constpointer'] = TYPE_ANY
 
 def type_name_from_ctype(ctype):
     return type_names.get(ctype, ctype)

Modified: trunk/giscanner/transformer.py
==============================================================================
--- trunk/giscanner/transformer.py	(original)
+++ trunk/giscanner/transformer.py	Wed Aug 20 19:11:03 2008
@@ -239,6 +239,8 @@
                 target = self.strip_namespace_object(symbol.base_type.name)
             else:
                 target = 'none'
+            if name in type_names:
+                return None
             return Alias(name, target, ctype=symbol.ident)
         else:
             raise NotImplementedError(



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]