summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gio/ChangeLog29
-rw-r--r--gio/gbufferedinputstream.c2
-rw-r--r--gio/gbufferedoutputstream.c4
-rw-r--r--gio/gdrive.c4
-rw-r--r--gio/gdrive.h2
-rw-r--r--gio/gfile.c6
-rw-r--r--gio/gfile.h4
-rw-r--r--gio/gfileenumerator.c4
-rw-r--r--gio/gfileenumerator.h2
-rw-r--r--gio/gfileinputstream.c2
-rw-r--r--gio/gfileoutputstream.c8
-rw-r--r--gio/gfileoutputstream.h2
-rw-r--r--gio/gfilterinputstream.c4
-rw-r--r--gio/gfilteroutputstream.c4
-rw-r--r--gio/ginputstream.c18
-rw-r--r--gio/ginputstream.h4
-rw-r--r--gio/glocalfile.c2
-rw-r--r--gio/glocalfileenumerator.c2
-rw-r--r--gio/glocalfileinputstream.c4
-rw-r--r--gio/glocalfileoutputstream.c6
-rw-r--r--gio/gmemoryinputstream.c6
-rw-r--r--gio/gmemoryoutputstream.c6
-rw-r--r--gio/goutputstream.c26
-rw-r--r--gio/goutputstream.h32
-rw-r--r--gio/gseekable.c2
-rw-r--r--gio/gseekable.h4
-rw-r--r--gio/gunixdrive.c2
-rw-r--r--gio/gunixinputstream.c4
-rw-r--r--gio/gunixoutputstream.c4
29 files changed, 114 insertions, 85 deletions
diff --git a/gio/ChangeLog b/gio/ChangeLog
index b9000fc52..6b2f1e795 100644
--- a/gio/ChangeLog
+++ b/gio/ChangeLog
@@ -1,3 +1,32 @@
+2007-12-05 Alexander Larsson <alexl@redhat.com>
+
+ * gbufferedinputstream.c:
+ * gbufferedoutputstream.c:
+ * gdrive.[ch]:
+ * gfile.[ch]:
+ * gfileenumerator.[ch]:
+ * gfileinputstream.c:
+ * gfileoutputstream.[ch]:
+ * gfilterinputstream.c:
+ * gfilteroutputstream.c:
+ * ginputstream.[ch]:
+ * glocalfile.c:
+ * glocalfileenumerator.c:
+ * glocalfileinputstream.c:
+ * glocalfileoutputstream.c:
+ * gmemoryinputstream.c:
+ * gmemoryoutputstream.c:
+ * goutputstream.[ch]:
+ * gseekable.[ch]:
+ * gunixdrive.c:
+ * gunixinputstream.c:
+ * gunixoutputstream.c:
+ Rename all struct members named:
+ read, write, close, truncate, or mount
+ to foo_fn, as these are reserved names
+ and could be defined as macros in libc.
+ (#501645)
+
2007-12-04 Alexander Larsson <alexl@redhat.com>
* goutputstream.c:
diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c
index 66d522a5a..fc994a577 100644
--- a/gio/gbufferedinputstream.c
+++ b/gio/gbufferedinputstream.c
@@ -148,7 +148,7 @@ g_buffered_input_stream_class_init (GBufferedInputStreamClass *klass)
istream_class->skip = g_buffered_input_stream_skip;
istream_class->skip_async = g_buffered_input_stream_skip_async;
istream_class->skip_finish = g_buffered_input_stream_skip_finish;
- istream_class->read = g_buffered_input_stream_read;
+ istream_class->read_fn = g_buffered_input_stream_read;
istream_class->read_async = g_buffered_input_stream_read_async;
istream_class->read_finish = g_buffered_input_stream_read_finish;
diff --git a/gio/gbufferedoutputstream.c b/gio/gbufferedoutputstream.c
index 15ca514d8..89e9ba6d5 100644
--- a/gio/gbufferedoutputstream.c
+++ b/gio/gbufferedoutputstream.c
@@ -135,9 +135,9 @@ g_buffered_output_stream_class_init (GBufferedOutputStreamClass *klass)
object_class->finalize = g_buffered_output_stream_finalize;
ostream_class = G_OUTPUT_STREAM_CLASS (klass);
- ostream_class->write = g_buffered_output_stream_write;
+ ostream_class->write_fn = g_buffered_output_stream_write;
ostream_class->flush = g_buffered_output_stream_flush;
- ostream_class->close = g_buffered_output_stream_close;
+ ostream_class->close_fn = g_buffered_output_stream_close;
ostream_class->write_async = g_buffered_output_stream_write_async;
ostream_class->write_finish = g_buffered_output_stream_write_finish;
ostream_class->flush_async = g_buffered_output_stream_flush_async;
diff --git a/gio/gdrive.c b/gio/gdrive.c
index 66d1217cc..5d851e39b 100644
--- a/gio/gdrive.c
+++ b/gio/gdrive.c
@@ -275,7 +275,7 @@ g_drive_mount (GDrive *drive,
iface = G_DRIVE_GET_IFACE (drive);
- if (iface->mount == NULL)
+ if (iface->mount_fn == NULL)
{
g_simple_async_report_error_in_idle (G_OBJECT (drive), callback, user_data,
G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
@@ -284,7 +284,7 @@ g_drive_mount (GDrive *drive,
return;
}
- (* iface->mount) (drive, mount_operation, cancellable, callback, user_data);
+ (* iface->mount_fn) (drive, mount_operation, cancellable, callback, user_data);
}
/**
diff --git a/gio/gdrive.h b/gio/gdrive.h
index 4770b132a..7d0965362 100644
--- a/gio/gdrive.h
+++ b/gio/gdrive.h
@@ -70,7 +70,7 @@ struct _GDriveIface
gboolean (*is_automounted)(GDrive *drive);
gboolean (*can_mount) (GDrive *drive);
gboolean (*can_eject) (GDrive *drive);
- void (*mount) (GDrive *drive,
+ void (*mount_fn) (GDrive *drive,
GMountOperation *mount_operation,
GCancellable *cancellable,
GAsyncReadyCallback callback,
diff --git a/gio/gfile.c b/gio/gfile.c
index b4b61a3ed..f8317b978 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -999,7 +999,7 @@ g_file_read (GFile *file,
iface = G_FILE_GET_IFACE (file);
- if (iface->read == NULL)
+ if (iface->read_fn == NULL)
{
g_set_error (error, G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
@@ -1007,7 +1007,7 @@ g_file_read (GFile *file,
return NULL;
}
- return (* iface->read) (file, cancellable, error);
+ return (* iface->read_fn) (file, cancellable, error);
}
/**
@@ -3369,7 +3369,7 @@ open_read_async_thread (GSimpleAsyncResult *res,
iface = G_FILE_GET_IFACE (object);
- stream = iface->read (G_FILE (object), cancellable, &error);
+ stream = iface->read_fn (G_FILE (object), cancellable, &error);
if (stream == NULL)
{
diff --git a/gio/gfile.h b/gio/gfile.h
index e9df49dde..5872b8d00 100644
--- a/gio/gfile.h
+++ b/gio/gfile.h
@@ -352,7 +352,7 @@ struct _GFileIface
GFileInfo **info,
GError **error);
- GFileInputStream * (*read) (GFile *file,
+ GFileInputStream * (*read_fn) (GFile *file,
GCancellable *cancellable,
GError **error);
void (*read_async) (GFile *file,
@@ -378,7 +378,7 @@ struct _GFileIface
GAsyncResult *res,
GError **error);
- GFileOutputStream * (*create) (GFile *file,
+ GFileOutputStream * (*create) (GFile *file,
GFileCreateFlags flags,
GCancellable *cancellable,
GError **error);
diff --git a/gio/gfileenumerator.c b/gio/gfileenumerator.c
index e525aa8a1..3b8b84b83 100644
--- a/gio/gfileenumerator.c
+++ b/gio/gfileenumerator.c
@@ -204,7 +204,7 @@ g_file_enumerator_close (GFileEnumerator *enumerator,
g_push_current_cancellable (cancellable);
enumerator->priv->pending = TRUE;
- (* class->close) (enumerator, cancellable, error);
+ (* class->close_fn) (enumerator, cancellable, error);
enumerator->priv->pending = FALSE;
enumerator->priv->closed = TRUE;
@@ -590,7 +590,7 @@ close_async_thread (GSimpleAsyncResult *res,
open handles */
class = G_FILE_ENUMERATOR_GET_CLASS (object);
- result = class->close (G_FILE_ENUMERATOR (object), cancellable, &error);
+ result = class->close_fn (G_FILE_ENUMERATOR (object), cancellable, &error);
if (!result)
{
g_simple_async_result_set_from_error (res, error);
diff --git a/gio/gfileenumerator.h b/gio/gfileenumerator.h
index 677311787..2126920c4 100644
--- a/gio/gfileenumerator.h
+++ b/gio/gfileenumerator.h
@@ -67,7 +67,7 @@ struct _GFileEnumeratorClass
GFileInfo *(*next_file) (GFileEnumerator *enumerator,
GCancellable *cancellable,
GError **error);
- gboolean (*close) (GFileEnumerator *enumerator,
+ gboolean (*close_fn) (GFileEnumerator *enumerator,
GCancellable *cancellable,
GError **error);
diff --git a/gio/gfileinputstream.c b/gio/gfileinputstream.c
index adaac3d83..5c0f2a3c6 100644
--- a/gio/gfileinputstream.c
+++ b/gio/gfileinputstream.c
@@ -87,7 +87,7 @@ g_file_input_stream_seekable_iface_init (GSeekableIface *iface)
iface->can_seek = g_file_input_stream_seekable_can_seek;
iface->seek = g_file_input_stream_seekable_seek;
iface->can_truncate = g_file_input_stream_seekable_can_truncate;
- iface->truncate = g_file_input_stream_seekable_truncate;
+ iface->truncate_fn = g_file_input_stream_seekable_truncate;
}
static void
diff --git a/gio/gfileoutputstream.c b/gio/gfileoutputstream.c
index e23a34f60..5515e0456 100644
--- a/gio/gfileoutputstream.c
+++ b/gio/gfileoutputstream.c
@@ -86,7 +86,7 @@ g_file_output_stream_seekable_iface_init (GSeekableIface *iface)
iface->can_seek = g_file_output_stream_seekable_can_seek;
iface->seek = g_file_output_stream_seekable_seek;
iface->can_truncate = g_file_output_stream_seekable_can_truncate;
- iface->truncate = g_file_output_stream_seekable_truncate;
+ iface->truncate_fn = g_file_output_stream_seekable_truncate;
}
static void
@@ -440,7 +440,7 @@ g_file_output_stream_can_truncate (GFileOutputStream *stream)
class = G_FILE_OUTPUT_STREAM_GET_CLASS (stream);
can_truncate = FALSE;
- if (class->truncate)
+ if (class->truncate_fn)
{
can_truncate = TRUE;
if (class->can_truncate)
@@ -482,7 +482,7 @@ g_file_output_stream_truncate (GFileOutputStream *stream,
output_stream = G_OUTPUT_STREAM (stream);
class = G_FILE_OUTPUT_STREAM_GET_CLASS (stream);
- if (!class->truncate)
+ if (!class->truncate_fn)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
_("Truncate not supported on stream"));
@@ -495,7 +495,7 @@ g_file_output_stream_truncate (GFileOutputStream *stream,
if (cancellable)
g_push_current_cancellable (cancellable);
- res = class->truncate (stream, size, cancellable, error);
+ res = class->truncate_fn (stream, size, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
diff --git a/gio/gfileoutputstream.h b/gio/gfileoutputstream.h
index 5cead47f8..853f5d4c3 100644
--- a/gio/gfileoutputstream.h
+++ b/gio/gfileoutputstream.h
@@ -65,7 +65,7 @@ struct _GFileOutputStreamClass
GCancellable *cancellable,
GError **error);
gboolean (*can_truncate) (GFileOutputStream *stream);
- gboolean (*truncate) (GFileOutputStream *stream,
+ gboolean (*truncate_fn) (GFileOutputStream *stream,
goffset size,
GCancellable *cancellable,
GError **error);
diff --git a/gio/gfilterinputstream.c b/gio/gfilterinputstream.c
index c2d79e204..0eb4eb362 100644
--- a/gio/gfilterinputstream.c
+++ b/gio/gfilterinputstream.c
@@ -105,9 +105,9 @@ g_filter_input_stream_class_init (GFilterInputStreamClass *klass)
object_class->finalize = g_filter_input_stream_finalize;
istream_class = G_INPUT_STREAM_CLASS (klass);
- istream_class->read = g_filter_input_stream_read;
+ istream_class->read_fn = g_filter_input_stream_read;
istream_class->skip = g_filter_input_stream_skip;
- istream_class->close = g_filter_input_stream_close;
+ istream_class->close_fn = g_filter_input_stream_close;
istream_class->read_async = g_filter_input_stream_read_async;
istream_class->read_finish = g_filter_input_stream_read_finish;
diff --git a/gio/gfilteroutputstream.c b/gio/gfilteroutputstream.c
index 534ea7c4f..ed433be34 100644
--- a/gio/gfilteroutputstream.c
+++ b/gio/gfilteroutputstream.c
@@ -106,9 +106,9 @@ g_filter_output_stream_class_init (GFilterOutputStreamClass *klass)
object_class->dispose = g_filter_output_stream_dispose;
ostream_class = G_OUTPUT_STREAM_CLASS (klass);
- ostream_class->write = g_filter_output_stream_write;
+ ostream_class->write_fn = g_filter_output_stream_write;
ostream_class->flush = g_filter_output_stream_flush;
- ostream_class->close = g_filter_output_stream_close;
+ ostream_class->close_fn = g_filter_output_stream_close;
ostream_class->write_async = g_filter_output_stream_write_async;
ostream_class->write_finish = g_filter_output_stream_write_finish;
ostream_class->flush_async = g_filter_output_stream_flush_async;
diff --git a/gio/ginputstream.c b/gio/ginputstream.c
index f73602c18..43b70907a 100644
--- a/gio/ginputstream.c
+++ b/gio/ginputstream.c
@@ -188,7 +188,7 @@ g_input_stream_read (GInputStream *stream,
class = G_INPUT_STREAM_GET_CLASS (stream);
- if (class->read == NULL)
+ if (class->read_fn == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
_("Input stream doesn't implement read"));
@@ -201,7 +201,7 @@ g_input_stream_read (GInputStream *stream,
if (cancellable)
g_push_current_cancellable (cancellable);
- res = class->read (stream, buffer, count, cancellable, error);
+ res = class->read_fn (stream, buffer, count, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
@@ -368,7 +368,7 @@ g_input_stream_real_skip (GInputStream *stream,
{
my_error = NULL;
- ret = class->read (stream, buffer, MIN (sizeof (buffer), count),
+ ret = class->read_fn (stream, buffer, MIN (sizeof (buffer), count),
cancellable, &my_error);
if (ret == -1)
{
@@ -447,8 +447,8 @@ g_input_stream_close (GInputStream *stream,
if (cancellable)
g_push_current_cancellable (cancellable);
- if (class->close)
- res = class->close (stream, cancellable, error);
+ if (class->close_fn)
+ res = class->close_fn (stream, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
@@ -936,9 +936,9 @@ read_async_thread (GSimpleAsyncResult *res,
class = G_INPUT_STREAM_GET_CLASS (object);
- op->count_read = class->read (G_INPUT_STREAM (object),
- op->buffer, op->count_requested,
- cancellable, &error);
+ op->count_read = class->read_fn (G_INPUT_STREAM (object),
+ op->buffer, op->count_requested,
+ cancellable, &error);
if (op->count_read == -1)
{
g_simple_async_result_set_from_error (res, error);
@@ -1153,7 +1153,7 @@ close_async_thread (GSimpleAsyncResult *res,
open handles */
class = G_INPUT_STREAM_GET_CLASS (object);
- result = class->close (G_INPUT_STREAM (object), cancellable, &error);
+ result = class->close_fn (G_INPUT_STREAM (object), cancellable, &error);
if (!result)
{
g_simple_async_result_set_from_error (res, error);
diff --git a/gio/ginputstream.h b/gio/ginputstream.h
index 279cd6565..b730a2bdf 100644
--- a/gio/ginputstream.h
+++ b/gio/ginputstream.h
@@ -60,7 +60,7 @@ struct _GInputStreamClass
/* Sync ops: */
- gssize (* read) (GInputStream *stream,
+ gssize (* read_fn) (GInputStream *stream,
void *buffer,
gsize count,
GCancellable *cancellable,
@@ -69,7 +69,7 @@ struct _GInputStreamClass
gsize count,
GCancellable *cancellable,
GError **error);
- gboolean (* close) (GInputStream *stream,
+ gboolean (* close_fn) (GInputStream *stream,
GCancellable *cancellable,
GError **error);
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index 22ccc10ad..2d59fe0f2 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -1815,7 +1815,7 @@ g_local_file_file_iface_init (GFileIface *iface)
iface->query_writable_namespaces = g_local_file_query_writable_namespaces;
iface->set_attribute = g_local_file_set_attribute;
iface->set_attributes_from_info = g_local_file_set_attributes_from_info;
- iface->read = g_local_file_read;
+ iface->read_fn = g_local_file_read;
iface->append_to = g_local_file_append_to;
iface->create = g_local_file_create;
iface->replace = g_local_file_replace;
diff --git a/gio/glocalfileenumerator.c b/gio/glocalfileenumerator.c
index b98b83f16..1859d41f3 100644
--- a/gio/glocalfileenumerator.c
+++ b/gio/glocalfileenumerator.c
@@ -92,7 +92,7 @@ g_local_file_enumerator_class_init (GLocalFileEnumeratorClass *klass)
gobject_class->finalize = g_local_file_enumerator_finalize;
enumerator_class->next_file = g_local_file_enumerator_next_file;
- enumerator_class->close = g_local_file_enumerator_close;
+ enumerator_class->close_fn = g_local_file_enumerator_close;
}
static void
diff --git a/gio/glocalfileinputstream.c b/gio/glocalfileinputstream.c
index c634f9073..1370d1b38 100644
--- a/gio/glocalfileinputstream.c
+++ b/gio/glocalfileinputstream.c
@@ -92,9 +92,9 @@ g_local_file_input_stream_class_init (GLocalFileInputStreamClass *klass)
gobject_class->finalize = g_local_file_input_stream_finalize;
- stream_class->read = g_local_file_input_stream_read;
+ stream_class->read_fn = g_local_file_input_stream_read;
stream_class->skip = g_local_file_input_stream_skip;
- stream_class->close = g_local_file_input_stream_close;
+ stream_class->close_fn = g_local_file_input_stream_close;
file_stream_class->tell = g_local_file_input_stream_tell;
file_stream_class->can_seek = g_local_file_input_stream_can_seek;
file_stream_class->seek = g_local_file_input_stream_seek;
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
index 9949c2fbe..6766e4140 100644
--- a/gio/glocalfileoutputstream.c
+++ b/gio/glocalfileoutputstream.c
@@ -110,15 +110,15 @@ g_local_file_output_stream_class_init (GLocalFileOutputStreamClass *klass)
gobject_class->finalize = g_local_file_output_stream_finalize;
- stream_class->write = g_local_file_output_stream_write;
- stream_class->close = g_local_file_output_stream_close;
+ stream_class->write_fn = g_local_file_output_stream_write;
+ stream_class->close_fn = g_local_file_output_stream_close;
file_stream_class->query_info = g_local_file_output_stream_query_info;
file_stream_class->get_etag = g_local_file_output_stream_get_etag;
file_stream_class->tell = g_local_file_output_stream_tell;
file_stream_class->can_seek = g_local_file_output_stream_can_seek;
file_stream_class->seek = g_local_file_output_stream_seek;
file_stream_class->can_truncate = g_local_file_output_stream_can_truncate;
- file_stream_class->truncate = g_local_file_output_stream_truncate;
+ file_stream_class->truncate_fn = g_local_file_output_stream_truncate;
}
static void
diff --git a/gio/gmemoryinputstream.c b/gio/gmemoryinputstream.c
index 7b93669e6..5274ab5f1 100644
--- a/gio/gmemoryinputstream.c
+++ b/gio/gmemoryinputstream.c
@@ -119,9 +119,9 @@ g_memory_input_stream_class_init (GMemoryInputStreamClass *klass)
object_class->finalize = g_memory_input_stream_finalize;
istream_class = G_INPUT_STREAM_CLASS (klass);
- istream_class->read = g_memory_input_stream_read;
+ istream_class->read_fn = g_memory_input_stream_read;
istream_class->skip = g_memory_input_stream_skip;
- istream_class->close = g_memory_input_stream_close;
+ istream_class->close_fn = g_memory_input_stream_close;
istream_class->read_async = g_memory_input_stream_read_async;
istream_class->read_finish = g_memory_input_stream_read_finish;
@@ -152,7 +152,7 @@ g_memory_input_stream_seekable_iface_init (GSeekableIface *iface)
iface->can_seek = g_memory_input_stream_can_seek;
iface->seek = g_memory_input_stream_seek;
iface->can_truncate = g_memory_input_stream_can_truncate;
- iface->truncate = g_memory_input_stream_truncate;
+ iface->truncate_fn = g_memory_input_stream_truncate;
}
static void
diff --git a/gio/gmemoryoutputstream.c b/gio/gmemoryoutputstream.c
index 545c5bfeb..8444b254c 100644
--- a/gio/gmemoryoutputstream.c
+++ b/gio/gmemoryoutputstream.c
@@ -131,8 +131,8 @@ g_memory_output_stream_class_init (GMemoryOutputStreamClass *klass)
ostream_class = G_OUTPUT_STREAM_CLASS (klass);
- ostream_class->write = g_memory_output_stream_write;
- ostream_class->close = g_memory_output_stream_close;
+ ostream_class->write_fn = g_memory_output_stream_write;
+ ostream_class->close_fn = g_memory_output_stream_close;
ostream_class->write_async = g_memory_output_stream_write_async;
ostream_class->write_finish = g_memory_output_stream_write_finish;
ostream_class->close_async = g_memory_output_stream_close_async;
@@ -189,7 +189,7 @@ g_memory_output_stream_seekable_iface_init (GSeekableIface *iface)
iface->can_seek = g_memory_output_stream_can_seek;
iface->seek = g_memory_output_stream_seek;
iface->can_truncate = g_memory_output_stream_can_truncate;
- iface->truncate = g_memory_output_stream_truncate;
+ iface->truncate_fn = g_memory_output_stream_truncate;
}
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index 62c75a6c8..fcfc17795 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -196,7 +196,7 @@ g_output_stream_write (GOutputStream *stream,
class = G_OUTPUT_STREAM_GET_CLASS (stream);
- if (class->write == NULL)
+ if (class->write_fn == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
_("Output stream doesn't implement write"));
@@ -209,7 +209,7 @@ g_output_stream_write (GOutputStream *stream,
if (cancellable)
g_push_current_cancellable (cancellable);
- res = class->write (stream, buffer, count, cancellable, error);
+ res = class->write_fn (stream, buffer, count, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
@@ -396,7 +396,8 @@ g_output_stream_real_splice (GOutputStream *stream,
char buffer[8192], *p;
gboolean res;
- if (class->write == NULL)
+ bytes_copied = 0;
+ if (class->write_fn == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
_("Output stream doesn't implement write"));
@@ -404,7 +405,6 @@ g_output_stream_real_splice (GOutputStream *stream,
goto notsupported;
}
- bytes_copied = 0;
res = TRUE;
do
{
@@ -421,7 +421,7 @@ g_output_stream_real_splice (GOutputStream *stream,
p = buffer;
while (n_read > 0)
{
- n_written = class->write (stream, p, n_read, cancellable, error);
+ n_written = class->write_fn (stream, p, n_read, cancellable, error);
if (n_written == -1)
{
res = FALSE;
@@ -448,7 +448,7 @@ g_output_stream_real_splice (GOutputStream *stream,
if (flags & G_OUTPUT_STREAM_SPLICE_FLAGS_CLOSE_TARGET)
{
/* But write errors on close are bad! */
- if (!class->close (stream, cancellable, error))
+ if (!class->close_fn (stream, cancellable, error))
res = FALSE;
}
@@ -528,14 +528,14 @@ g_output_stream_close (GOutputStream *stream,
/* flushing caused the error that we want to return,
* but we still want to close the underlying stream if possible
*/
- if (class->close)
- class->close (stream, cancellable, NULL);
+ if (class->close_fn)
+ class->close_fn (stream, cancellable, NULL);
}
else
{
res = TRUE;
- if (class->close)
- res = class->close (stream, cancellable, error);
+ if (class->close_fn)
+ res = class->close_fn (stream, cancellable, error);
}
if (cancellable)
@@ -1112,8 +1112,8 @@ write_async_thread (GSimpleAsyncResult *res,
class = G_OUTPUT_STREAM_GET_CLASS (object);
op = g_simple_async_result_get_op_res_gpointer (res);
- op->count_written = class->write (G_OUTPUT_STREAM (object), op->buffer, op->count_requested,
- cancellable, &error);
+ op->count_written = class->write_fn (G_OUTPUT_STREAM (object), op->buffer, op->count_requested,
+ cancellable, &error);
if (op->count_written == -1)
{
g_simple_async_result_set_from_error (res, error);
@@ -1286,7 +1286,7 @@ close_async_thread (GSimpleAsyncResult *res,
open handles */
class = G_OUTPUT_STREAM_GET_CLASS (object);
- result = class->close (G_OUTPUT_STREAM (object), cancellable, &error);
+ result = class->close_fn (G_OUTPUT_STREAM (object), cancellable, &error);
if (!result)
{
g_simple_async_result_set_from_error (res, error);
diff --git a/gio/goutputstream.h b/gio/goutputstream.h
index a52612547..0d9f828e0 100644
--- a/gio/goutputstream.h
+++ b/gio/goutputstream.h
@@ -80,22 +80,22 @@ struct _GOutputStreamClass
/* Sync ops: */
- gssize (* write) (GOutputStream *stream,
- const void *buffer,
- gsize count,
- GCancellable *cancellable,
- GError **error);
- gssize (* splice) (GOutputStream *stream,
- GInputStream *source,
- GOutputStreamSpliceFlags flags,
- GCancellable *cancellable,
- GError **error);
- gboolean (* flush) (GOutputStream *stream,
- GCancellable *cancellable,
- GError **error);
- gboolean (* close) (GOutputStream *stream,
- GCancellable *cancellable,
- GError **error);
+ gssize (* write_fn)(GOutputStream *stream,
+ const void *buffer,
+ gsize count,
+ GCancellable *cancellable,
+ GError **error);
+ gssize (* splice) (GOutputStream *stream,
+ GInputStream *source,
+ GOutputStreamSpliceFlags flags,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (* flush) (GOutputStream *stream,
+ GCancellable *cancellable,
+ GError **error);
+ gboolean (* close_fn)(GOutputStream *stream,
+ GCancellable *cancellable,
+ GError **error);
/* Async ops: (optional in derived classes) */
diff --git a/gio/gseekable.c b/gio/gseekable.c
index 6d5fc600d..f8019b7be 100644
--- a/gio/gseekable.c
+++ b/gio/gseekable.c
@@ -202,7 +202,7 @@ 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__
diff --git a/gio/gseekable.h b/gio/gseekable.h
index b289df587..052534903 100644
--- a/gio/gseekable.h
+++ b/gio/gseekable.h
@@ -48,7 +48,7 @@ typedef struct _GSeekableIface GSeekableIface;
* @can_seek: Checks if seeking is supported by the stream.
* @seek: Seeks to a location within a stream.
* @can_truncate: Chekcs if truncation is suppored by the stream.
- * @truncate: Truncates a stream.
+ * @truncate_fn: Truncates a stream.
*
* Provides an interface for implementing seekable functionality on I/O Streams.
**/
@@ -68,7 +68,7 @@ struct _GSeekableIface
GError **error);
gboolean (* can_truncate) (GSeekable *seekable);
- gboolean (* truncate) (GSeekable *seekable,
+ gboolean (* truncate_fn) (GSeekable *seekable,
goffset offset,
GCancellable *cancellable,
GError **error);
diff --git a/gio/gunixdrive.c b/gio/gunixdrive.c
index 2a5e40c8c..ab8eebfe9 100644
--- a/gio/gunixdrive.c
+++ b/gio/gunixdrive.c
@@ -315,7 +315,7 @@ g_unix_volume_drive_iface_init (GDriveIface *iface)
iface->is_automounted = g_unix_drive_is_automounted;
iface->can_mount = g_unix_drive_can_mount;
iface->can_eject = g_unix_drive_can_eject;
- iface->mount = g_unix_drive_mount;
+ iface->mount_fn = g_unix_drive_mount;
iface->mount_finish = g_unix_drive_mount_finish;
iface->eject = g_unix_drive_eject;
iface->eject_finish = g_unix_drive_eject_finish;
diff --git a/gio/gunixinputstream.c b/gio/gunixinputstream.c
index b1de0ed28..b9c1c31c1 100644
--- a/gio/gunixinputstream.c
+++ b/gio/gunixinputstream.c
@@ -116,8 +116,8 @@ g_unix_input_stream_class_init (GUnixInputStreamClass *klass)
gobject_class->finalize = g_unix_input_stream_finalize;
- stream_class->read = g_unix_input_stream_read;
- stream_class->close = g_unix_input_stream_close;
+ stream_class->read_fn = g_unix_input_stream_read;
+ stream_class->close_fn = g_unix_input_stream_close;
stream_class->read_async = g_unix_input_stream_read_async;
stream_class->read_finish = g_unix_input_stream_read_finish;
if (0)
diff --git a/gio/gunixoutputstream.c b/gio/gunixoutputstream.c
index ba16738c3..9bf3b6203 100644
--- a/gio/gunixoutputstream.c
+++ b/gio/gunixoutputstream.c
@@ -108,8 +108,8 @@ g_unix_output_stream_class_init (GUnixOutputStreamClass *klass)
gobject_class->finalize = g_unix_output_stream_finalize;
- stream_class->write = g_unix_output_stream_write;
- stream_class->close = g_unix_output_stream_close;
+ stream_class->write_fn = g_unix_output_stream_write;
+ stream_class->close_fn = g_unix_output_stream_close;
stream_class->write_async = g_unix_output_stream_write_async;
stream_class->write_finish = g_unix_output_stream_write_finish;
stream_class->close_async = g_unix_output_stream_close_async;