gobject-introspection r880 - trunk/tests/scanner



Author: johan
Date: Tue Nov 11 13:21:01 2008
New Revision: 880
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=880&view=rev

Log:
Reorganize and fix compiler warnings

Modified:
   trunk/tests/scanner/foo.c

Modified: trunk/tests/scanner/foo.c
==============================================================================
--- trunk/tests/scanner/foo.c	(original)
+++ trunk/tests/scanner/foo.c	Tue Nov 11 13:21:01 2008
@@ -6,37 +6,20 @@
    object */
 typedef struct _FooHidden FooHidden;
 
-struct _FooHidden
-{
-  char *frob;
-};
-
-FooHidden *
-foo_hidden_copy (const FooHidden *boxed)
-{
-  return (FooHidden *)g_memdup (boxed, sizeof (FooHidden));
-}
-
-void
-foo_hidden_free (FooHidden *boxed)
-{
-  g_slice_free (FooHidden, boxed);
-}
-
-
-GType
-foo_hidden_get_type (void)
-{
-  static GType our_type = 0;
-
-  if (our_type == 0)
-    our_type = g_boxed_type_register_static ("FooHidden",
-					     (GBoxedCopyFunc) foo_hidden_copy,
-					     (GBoxedFreeFunc) foo_hidden_free);
-  return our_type;
-}
-
-static void foo_do_foo (FooInterface *self);
+int foo_init_argv (int argc, char **argv);
+int foo_init_argv_address (int *argc, char ***argv);
+void foo_private_function (FooObject *foo);
+void foo_test_unsigned (unsigned int uint);
+void foo_interface_do_foo (FooInterface *self);
+void foo_do_foo (FooInterface *self);
+int foo_enum_method (FooEnumType foo_enum);
+FooHidden * foo_hidden_copy (const FooHidden *boxed);
+void foo_hidden_free (FooHidden *boxed);
+GType foo_hidden_get_type (void);
+FooBoxed *foo_boxed_copy (const FooBoxed *boxed);
+void foo_boxed_free (FooBoxed *boxed);
+void foo_dbus_data_free (FooDBusData *boxed);
+FooDBusData *foo_dbus_data_copy (const FooDBusData *boxed);
 
 typedef struct
 {
@@ -102,8 +85,6 @@
                          const GValue    *value,
                          GParamSpec      *pspec)
 {
-  FooObject *foo = FOO_OBJECT (object);
-
   switch (prop_id)
     {
     case PROP_STRING:
@@ -122,8 +103,6 @@
                          GValue          *value,
                          GParamSpec      *pspec)
 {
-  FooObject *foo = FOO_OBJECT (object);
-
   switch (prop_id)
     {
     case PROP_STRING:
@@ -180,7 +159,7 @@
 UtilityObject*
 foo_object_external_type (FooObject *object)
 {
-
+  return NULL;
 }
 
 void                  
@@ -323,6 +302,7 @@
 
 }
 
+/* FooDbus */
 struct _FooDBusData
 {
   double private;
@@ -335,7 +315,7 @@
 }
 
 void
-foo_dbus_data_free (FooBoxed *boxed)
+foo_dbus_data_free (FooDBusData *boxed)
 {
   g_slice_free (FooDBusData, boxed);
 }
@@ -396,3 +376,36 @@
 {
 
 }
+
+/* FooHidden */
+
+struct _FooHidden
+{
+  char *frob;
+};
+
+FooHidden *
+foo_hidden_copy (const FooHidden *boxed)
+{
+  return (FooHidden *)g_memdup (boxed, sizeof (FooHidden));
+}
+
+void
+foo_hidden_free (FooHidden *boxed)
+{
+  g_slice_free (FooHidden, boxed);
+}
+
+
+GType
+foo_hidden_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("FooHidden",
+					     (GBoxedCopyFunc) foo_hidden_copy,
+					     (GBoxedFreeFunc) foo_hidden_free);
+  return our_type;
+}
+



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