Remove non-existing parameter from docs
[platform/upstream/glib.git] / gio / gseekable.c
index fba1dec..a2cbb8a 100644 (file)
  * Author: Alexander Larsson <alexl@redhat.com>
  */
 
-#include <config.h>
+#include "config.h"
 #include "gseekable.h"
 #include "glibintl.h"
 
+#include "gioalias.h"
+
 /**
  * SECTION:gseekable
  * @short_description: Stream seeking interface
+ * @include: gio/gio.h
  * @see_also: #GInputStream, #GOutputStream
  * 
  * #GSeekable is implemented by streams (implementations of 
@@ -41,11 +44,11 @@ static void g_seekable_base_init (gpointer g_class);
 GType
 g_seekable_get_type (void)
 {
-  static GType seekable_type = 0;
+  static volatile gsize g_define_type_id__volatile = 0;
 
-  if (! seekable_type)
+  if (g_once_init_enter (&g_define_type_id__volatile))
     {
-      static const GTypeInfo seekable_info =
+      const GTypeInfo seekable_info =
       {
         sizeof (GSeekableIface), /* class_size */
        g_seekable_base_init,   /* base_init */
@@ -57,15 +60,16 @@ g_seekable_get_type (void)
        0,              /* n_preallocs */
        NULL
       };
-
-      seekable_type =
+      GType g_define_type_id =
        g_type_register_static (G_TYPE_INTERFACE, I_("GSeekable"),
                                &seekable_info, 0);
 
-      g_type_interface_add_prerequisite (seekable_type, G_TYPE_OBJECT);
+      g_type_interface_add_prerequisite (g_define_type_id, G_TYPE_OBJECT);
+
+      g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
     }
 
-  return seekable_type;
+  return g_define_type_id__volatile;
 }
 
 static void
@@ -129,8 +133,8 @@ g_seekable_can_seek (GSeekable *seekable)
  * was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. 
  * 
  * Returns: %TRUE if successful. If an error
- * has occured, this function will return %FALSE and set @error
- * appropriately if present.
+ *     has occurred, this function will return %FALSE and set @error
+ *     appropriately if present.
  **/
 gboolean
 g_seekable_seek (GSeekable     *seekable,
@@ -185,8 +189,8 @@ g_seekable_can_truncate (GSeekable *seekable)
  * partial result will be returned, without an error.
  * 
  * Returns: %TRUE if successful. If an error
- * has occured, this function will return %FALSE and set @error
- * appropriately if present. 
+ *     has occurred, this function will return %FALSE and set @error
+ *     appropriately if present. 
  **/
 gboolean
 g_seekable_truncate (GSeekable     *seekable,
@@ -200,6 +204,8 @@ g_seekable_truncate (GSeekable     *seekable,
 
   iface = G_SEEKABLE_GET_IFACE (seekable);
 
-  return (* iface->truncate) (seekable, offset, cancellable, error);
+  return (* iface->truncate_fn) (seekable, offset, cancellable, error);
 }
 
+#define __G_SEEKABLE_C__
+#include "gioaliasdef.c"