]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
update from gobject-introspection SVN
authorJuerg Billeter <j@bitron.ch>
Fri, 19 Oct 2007 15:47:02 +0000 (15:47 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Fri, 19 Oct 2007 15:47:02 +0000 (15:47 +0000)
2007-10-19  Juerg Billeter  <j@bitron.ch>

* gobject-introspection/gidlnode.c, gobject-introspection/gidlparser.c:
  update from gobject-introspection SVN

svn path=/trunk/; revision=659

ChangeLog
gobject-introspection/gidlnode.c
gobject-introspection/gidlparser.c

index 1d12ac3eea52da94347f856c22e16992a9a24d0f..f3387469b78e31e62a296d77cc653abd8818b463 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-10-19  Jürg Billeter  <j@bitron.ch>
+
+       * gobject-introspection/gidlnode.c, gobject-introspection/gidlparser.c:
+         update from gobject-introspection SVN
+
 2007-10-19  Jürg Billeter  <j@bitron.ch>
 
        * vapi/glib-2.0.vapi: add stub for GData
index bbde2a0058e05c74ad9d9f46b104eb85cb6c0ea6..92ce1958cb3e4f5ae2b6c2f649ea0b3f63402b52 100644 (file)
@@ -19,6 +19,7 @@
  */
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include "gidlmodule.h"
@@ -46,9 +47,9 @@ init_stats (void)
 void
 dump_stats (void)
 {
-  g_message ("%d strings (%d before sharing), %d bytes (%d before sharing)",
+  g_message ("%lu strings (%lu before sharing), %lu bytes (%lu before sharing)",
             unique_string_count, string_count, unique_string_size, string_size);
-  g_message ("%d types (%d before sharing)", unique_types_count, types_count);
+  g_message ("%lu types (%lu before sharing)", unique_types_count, types_count);
 }
 
 #define ALIGN_VALUE(this, boundary) \
@@ -63,6 +64,7 @@ g_idl_node_new (GIdlNodeTypeId type)
   switch (type)
     {
    case G_IDL_NODE_FUNCTION:
+   case G_IDL_NODE_CALLBACK:
       node = g_malloc0 (sizeof (GIdlNodeFunction));
       break;
 
@@ -251,8 +253,6 @@ g_idl_node_free (GIdlNode *node)
  
     case G_IDL_NODE_VALUE:
       {
-       GIdlNodeValue *value = (GIdlNodeValue *)node;
-       
        g_free (node->name);
       }
       break;
@@ -479,7 +479,7 @@ g_idl_node_get_size (GIdlNode *node)
       size = 0;
     }
 
-  g_debug ("node %d type %d size %d", node, node->type, size);
+  g_debug ("node %p type %d size %d", node, node->type, size);
 
   return size;
 }
@@ -633,8 +633,6 @@ g_idl_node_get_full_size (GIdlNode *node)
 
     case G_IDL_NODE_VALUE:
       {
-       GIdlNodeValue *value = (GIdlNodeValue *)node;
-       
        size = 12;
        size += ALIGN_VALUE (strlen (node->name) + 1, 4);
       }
@@ -761,7 +759,7 @@ g_idl_node_get_full_size (GIdlNode *node)
       size = 0;
     }
 
-  g_debug ("node %d type %d full size %d", node, node->type, size);
+  g_debug ("node %p type %d full size %d", node, node->type, size);
 
   return size;
 }
@@ -1129,7 +1127,7 @@ g_idl_node_build_metadata (GIdlNode   *node,
                  case TYPE_TAG_ERROR:
                    {
                      ErrorTypeBlob *blob = (ErrorTypeBlob *)&data[*offset2];
-                     gint i, domain;
+                     gint i;
                      
                      blob->pointer = 1;
                      blob->reserved = 0;
@@ -1201,7 +1199,7 @@ g_idl_node_build_metadata (GIdlNode   *node,
        FunctionBlob *blob = (FunctionBlob *)&data[*offset];
        SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
        GIdlNodeFunction *function = (GIdlNodeFunction *)node;
-       guint32 signature, res;
+       guint32 signature;
        gint n;
 
        signature = *offset2;
@@ -1250,7 +1248,7 @@ g_idl_node_build_metadata (GIdlNode   *node,
        CallbackBlob *blob = (CallbackBlob *)&data[*offset];
        SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
        GIdlNodeFunction *function = (GIdlNodeFunction *)node;
-       guint32 signature, res;
+       guint32 signature;
        gint n;
 
        signature = *offset2;
@@ -1293,7 +1291,7 @@ g_idl_node_build_metadata (GIdlNode   *node,
        SignalBlob *blob = (SignalBlob *)&data[*offset];
        SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
        GIdlNodeSignal *signal = (GIdlNodeSignal *)node;
-       guint32 signature, res;
+       guint32 signature;
        gint n;
 
        signature = *offset2;
@@ -1344,7 +1342,7 @@ g_idl_node_build_metadata (GIdlNode   *node,
        VFuncBlob *blob = (VFuncBlob *)&data[*offset];
        SignatureBlob *blob2 = (SignatureBlob *)&data[*offset2];
        GIdlNodeVFunc *vfunc = (GIdlNodeVFunc *)node;
-       guint32 signature, res;
+       guint32 signature;
        gint n;
 
        signature = *offset2;
@@ -1390,7 +1388,6 @@ g_idl_node_build_metadata (GIdlNode   *node,
       {
        ArgBlob *blob = (ArgBlob *)&data[*offset];
        GIdlNodeParam *param = (GIdlNodeParam *)node;
-       guint32 res;
 
        *offset += 8;
 
@@ -1414,7 +1411,6 @@ g_idl_node_build_metadata (GIdlNode   *node,
       {
        StructBlob *blob = (StructBlob *)&data[*offset];
        GIdlNodeStruct *struct_ = (GIdlNodeStruct *)node;
-       guint32 pos;
        
        blob->blob_type = BLOB_TYPE_STRUCT;
        blob->deprecated = struct_->deprecated;
@@ -1624,7 +1620,6 @@ g_idl_node_build_metadata (GIdlNode   *node,
       {
        ObjectBlob *blob = (ObjectBlob *)&data[*offset];
        GIdlNodeInterface *object = (GIdlNodeInterface *)node;
-       gint parent;
 
        blob->blob_type = BLOB_TYPE_OBJECT;
        blob->deprecated = object->deprecated;
@@ -1947,6 +1942,8 @@ g_idl_node_build_metadata (GIdlNode   *node,
                                   strings, types, data, &pos, offset2);
       }
       break;
+    default:
+      g_assert_not_reached ();
     }
   
   g_debug ("node %p type %d, offset %d -> %d, offset2 %d -> %d",
index adc0723b3cf9dcaa7c3b7c9e2fac0c7afb66a43b..150861708b7961cc5225d824d8b825a6c18f99b9 100644 (file)
@@ -17,6 +17,8 @@
  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  * Boston, MA 02111-1307, USA.
  */
+
+#include <stdlib.h>
 #include <string.h>
 
 #include <glib.h>
@@ -522,6 +524,8 @@ start_function (GMarkupParseContext *context,
                  union_->members = g_list_append (union_->members, function);
                }
                break;
+             default:
+               g_assert_not_reached ();
              }
          
          ctx->current_node = (GIdlNode *)function;
@@ -655,6 +659,8 @@ start_parameter (GMarkupParseContext *context,
                vfunc->parameters = g_list_append (vfunc->parameters, param);
              }
              break;
+           default:
+             g_assert_not_reached ();
            }
        }
 
@@ -772,6 +778,8 @@ start_field (GMarkupParseContext *context,
                  }
              }
              break;
+           default:
+             g_assert_not_reached ();
            }
        }
       return TRUE;
@@ -1265,6 +1273,8 @@ start_return_type (GMarkupParseContext *context,
                vfunc->result = param;
              }
              break;
+           default:
+             g_assert_not_reached ();
            }
        }
       
@@ -1570,7 +1580,7 @@ start_element_handler (GMarkupParseContext *context,
                       GError             **error)
 {
   ParseContext *ctx = user_data;
-  gint i, line_number, char_number;
+  gint line_number, char_number;
 
   switch (element_name[0])
     {
@@ -1853,7 +1863,7 @@ end_element_handler (GMarkupParseContext *context,
 
     case STATE_NAMESPACE:
       if (strcmp (element_name, "namespace") == 0)
-       {
+        {
           ctx->current_module = NULL;
           ctx->state = STATE_ROOT;
         }