projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix minor mem leak in test case
[platform/upstream/glib.git]
/
gio
/
gpollableutils.c
diff --git
a/gio/gpollableutils.c
b/gio/gpollableutils.c
index
0e653fa
..
58313a7
100644
(file)
--- a/
gio/gpollableutils.c
+++ b/
gio/gpollableutils.c
@@
-13,9
+13,7
@@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
*/
#include "config.h"
@@
-28,7
+26,7
@@
/**
* SECTION:gpollableutils
/**
* SECTION:gpollableutils
- * @short_description:
#GPollableInputStream / #GPollableOutputStream utilitie
s
+ * @short_description:
Utilities for pollable stream
s
* @include: gio/gio.h
*
* Utility functions for #GPollableInputStream and
* @include: gio/gio.h
*
* Utility functions for #GPollableInputStream and
@@
-42,20
+40,6
@@
typedef struct {
} GPollableSource;
static gboolean
} GPollableSource;
static gboolean
-pollable_source_prepare (GSource *source,
- gint *timeout)
-{
- *timeout = -1;
- return FALSE;
-}
-
-static gboolean
-pollable_source_check (GSource *source)
-{
- return FALSE;
-}
-
-static gboolean
pollable_source_dispatch (GSource *source,
GSourceFunc callback,
gpointer user_data)
pollable_source_dispatch (GSource *source,
GSourceFunc callback,
gpointer user_data)
@@
-100,12
+84,11
@@
pollable_source_closure_callback (GObject *stream,
static GSourceFuncs pollable_source_funcs =
{
static GSourceFuncs pollable_source_funcs =
{
-
pollable_source_prepare
,
-
pollable_source_check
,
+
NULL
,
+
NULL
,
pollable_source_dispatch,
pollable_source_finalize,
(GSourceFunc)pollable_source_closure_callback,
pollable_source_dispatch,
pollable_source_finalize,
(GSourceFunc)pollable_source_closure_callback,
- (GSourceDummyMarshal)g_cclosure_marshal_generic,
};
/**
};
/**
@@
-118,7
+101,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.
*
* anything on its own; use g_source_add_child_source() to add other
* sources to it to cause it to trigger.
*
- * Return
value
: (transfer full): the new #GSource.
+ * Return
s
: (transfer full): the new #GSource.
*
* Since: 2.28
*/
*
* Since: 2.28
*/
@@
-151,7
+134,7
@@
g_pollable_source_new (GObject *pollable_stream)
* g_pollable_source_new(), but also attaching @child_source (with a
* dummy callback), and @cancellable, if they are non-%NULL.
*
* g_pollable_source_new(), but also attaching @child_source (with a
* dummy callback), and @cancellable, if they are non-%NULL.
*
- * Return
value
: (transfer full): the new #GSource.
+ * Return
s
: (transfer full): the new #GSource.
*
* Since: 2.34
*/
*
* Since: 2.34
*/
@@
-186,7
+169,8
@@
g_pollable_source_new_full (gpointer pollable_stream,
/**
* g_pollable_stream_read:
* @stream: a #GInputStream
/**
* g_pollable_stream_read:
* @stream: a #GInputStream
- * @buffer: a buffer to read data into
+ * @buffer: (array length=count) (element-type guint8): a buffer to
+ * read data into
* @count: the number of bytes to read
* @blocking: whether to do blocking I/O
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @count: the number of bytes to read
* @blocking: whether to do blocking I/O
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
@@
-306,7
+290,7
@@
g_pollable_stream_write (GOutputStream *stream,
* behavior is undefined. If @blocking is %TRUE, then @stream does not
* need to be a #GPollableOutputStream.
*
* behavior is undefined. If @blocking is %TRUE, then @stream does not
* need to be a #GPollableOutputStream.
*
- * Return
value
: %TRUE on success, %FALSE if there was an error
+ * Return
s
: %TRUE on success, %FALSE if there was an error
*
* Since: 2.34
*/
*
* Since: 2.34
*/