gobject-introspection r384 - in trunk: . giscanner



Author: johan
Date: Sat Aug 16 21:28:15 2008
New Revision: 384
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=384&view=rev

Log:
2008-08-16  Johan Dahlin  <johan gnome org>

    * giscanner/glibtransformer.py:
    Resolve type names for alias targets
    * giscanner/transformer.py:
    Skip FILE* parameters fow now



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

Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py	(original)
+++ trunk/giscanner/glibtransformer.py	Sat Aug 16 21:28:15 2008
@@ -64,6 +64,8 @@
             if isinstance(node, Struct):
                 self._pair_class_struct(node)
             self._resolve_node(node)
+        for alias in self._aliases:
+            self._resolve_alias(alias)
 
         # Create a new namespace with what we found
         namespace = Namespace(namespace.name)
@@ -416,6 +418,8 @@
             self._resolve_glib_boxed(node)
         elif isinstance(node, Struct):
             self._resolve_struct(node)
+        elif isinstance(node, Alias):
+            self._resolve_alias(node)
 
     def _resolve_struct(self, node):
         for field in node.fields:
@@ -468,3 +472,6 @@
             self._resolve_function(field)
             return
         field.type = self._resolve_param_type(field.type)
+
+    def _resolve_alias(self, field):
+        field.target = self._resolve_type_name(field.target)

Modified: trunk/giscanner/transformer.py
==============================================================================
--- trunk/giscanner/transformer.py	(original)
+++ trunk/giscanner/transformer.py	Sat Aug 16 21:28:15 2008
@@ -239,6 +239,10 @@
         ctype = self._create_source_type(source_type)
         if ctype == 'va_list':
             raise SkipError
+        # FIXME: FILE* should not be skipped, it should be handled
+        #        properly instead
+        elif ctype == 'FILE*':
+            raise SkipError
         type_name = type_name_from_ctype(ctype)
         resolved_type_name = self.resolve_type_name(type_name)
         return Type(resolved_type_name, ctype)



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