=== Released 2.2.0 ===
[platform/upstream/glib.git] / gobject / gsourceclosure.c
index 90b581a..ac6724f 100644 (file)
@@ -31,10 +31,8 @@ g_io_channel_get_type (void)
   
   if (our_type == 0)
     our_type = g_boxed_type_register_static ("GIOChannel",
-                                            NULL,
                                             (GBoxedCopyFunc) g_io_channel_ref,
-                                            (GBoxedFreeFunc) g_io_channel_unref,
-                                            FALSE);
+                                            (GBoxedFreeFunc) g_io_channel_unref);
 
   return our_type;
 }
@@ -150,27 +148,30 @@ closure_callback_get (gpointer     cb_data,
   *data = cb_data;
 }
 
-GSourceCallbackFuncs closure_callback_funcs = {
+static GSourceCallbackFuncs closure_callback_funcs = {
   (void (*) (gpointer)) g_closure_ref,
   (void (*) (gpointer)) g_closure_unref,
   closure_callback_get
 };
 
 /**
- * g_source_set_callback:
+ * g_source_set_closure:
  * @source: the source
- * @func: a #GClosure
+ * @closure: a #GClosure
  *
  * Set the callback for a source as a #GClosure.
  *
- * If the source is not one of the standard GLib types, the closure_callback
- * and closure_marshal fields of the GSourceFuncs structure must have been
+ * If the source is not one of the standard GLib types, the @closure_callback
+ * and @closure_marshal fields of the GSourceFuncs structure must have been
  * filled in with pointers to appropriate functions.
  **/
 void
 g_source_set_closure (GSource  *source,
                      GClosure *closure)
 {
+  g_return_if_fail (source != NULL);
+  g_return_if_fail (closure != NULL);
+
   if (!source->source_funcs->closure_callback &&
       source->source_funcs != &g_io_watch_funcs &&
       source->source_funcs != &g_timeout_funcs &&