Clean up includes
[platform/upstream/glib.git] / gio / gpollableinputstream.c
index 19946c6..6bad2a0 100644 (file)
@@ -24,7 +24,6 @@
 
 #include "gpollableinputstream.h"
 #include "gasynchelper.h"
-#include "gio-marshal.h"
 #include "glibintl.h"
 
 /**
@@ -35,8 +34,8 @@
  *
  * #GPollableInputStream is implemented by #GInputStream<!-- -->s that
  * can be polled for readiness to read. This can be used when
- * interfacing with a non-gio API that expects
- * unix-file-descriptor-style asynchronous I/O rather than gio-style.
+ * interfacing with a non-GIO API that expects
+ * UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
  *
  * Since: 2.28
  */
@@ -115,9 +114,9 @@ g_pollable_input_stream_is_readable (GPollableInputStream *stream)
 }
 
 /**
- * g_pollable_input_stream_create_source:
+ * g_pollable_input_stream_create_source: (skip)
  * @stream: a #GPollableInputStream.
- * @cancellable: a #GCancellable, or %NULL
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
  *
  * Creates a #GSource that triggers when @stream can be read, or
  * @cancellable is triggered or an error occurs. The callback on the
@@ -125,11 +124,10 @@ g_pollable_input_stream_is_readable (GPollableInputStream *stream)
  *
  * As with g_pollable_input_stream_is_readable(), it is possible that
  * the stream may not actually be readable even after the source
- * triggers, so you should use
- * g_pollable_input_stream_read_nonblocking() rather than
- * g_input_stream_read() from the callback.
+ * triggers, so you should use g_pollable_input_stream_read_nonblocking()
+ * rather than g_input_stream_read() from the callback.
  *
- * Returns: a new #GSource
+ * Returns: (transfer full): a new #GSource
  *
  * Since: 2.28
  */
@@ -151,8 +149,8 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream  *stream,
 {
   if (!g_pollable_input_stream_is_readable (stream))
     {
-      g_set_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK,
-                  g_strerror (EAGAIN));
+      g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK,
+                           g_strerror (EAGAIN));
       return -1;
     }
 
@@ -166,7 +164,7 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream  *stream,
  * @buffer: a buffer to read data into (which should be at least @size
  *     bytes long).
  * @size: the number of bytes you want to read
- * @cancellable: a #GCancellable, or %NULL
+ * @cancellable: (allow-none): a #GCancellable, or %NULL
  * @error: #GError for error reporting, or %NULL to ignore.
  *
  * Attempts to read up to @size bytes from @stream into @buffer, as
@@ -181,6 +179,7 @@ g_pollable_input_stream_default_read_nonblocking (GPollableInputStream  *stream,
  * may happen if you call this method after a source triggers due
  * to having been cancelled.
  *
+ * Virtual: read_nonblocking
  * Return value: the number of bytes read, or -1 on error (including
  *   %G_IO_ERROR_WOULD_BLOCK).
  */
@@ -272,11 +271,11 @@ static GSourceFuncs pollable_source_funcs =
   pollable_source_dispatch,
   pollable_source_finalize,
   (GSourceFunc)pollable_source_closure_callback,
-  (GSourceDummyMarshal)_gio_marshal_BOOLEAN__VOID,
+  (GSourceDummyMarshal)g_cclosure_marshal_generic,
 };
 
 /**
- * g_pollable_source_new:
+ * g_pollable_source_new: (skip)
  * @pollable_stream: the stream associated with the new source
  *
  * Utility method for #GPollableInputStream and #GPollableOutputStream
@@ -285,7 +284,7 @@ static GSourceFuncs pollable_source_funcs =
  * anything on its own; use g_source_add_child_source() to add other
  * sources to it to cause it to trigger.
  *
- * Return value: the new #GSource.
+ * Return value: (transfer full): the new #GSource.
  *
  * Since: 2.28
  */