Commit 2ae689e3 authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

g_push/pop_current_cancellable -> g_cancellable_push/pop_current

2007-12-13  Alexander Larsson  <alexl@redhat.com>

        * gcancellable.[ch]:
        * gio.symbols:
        * gbufferedinputstream.c:
        * gfileenumerator.c:
        * gfileinputstream.c:
        * gfileoutputstream.c:
        * ginputstream.c:
        * gioscheduler.c:
        * goutputstream.c:
	g_push/pop_current_cancellable ->
	g_cancellable_push/pop_current


svn path=/trunk/; revision=6115
parent f6b9b4f4
2007-12-13 Alexander Larsson <alexl@redhat.com>
* gcancellable.[ch]:
* gio.symbols:
* gbufferedinputstream.c:
* gfileenumerator.c:
* gfileinputstream.c:
* gfileoutputstream.c:
* ginputstream.c:
* gioscheduler.c:
* goutputstream.c:
g_push/pop_current_cancellable ->
g_cancellable_push/pop_current
2007-12-13 Alexander Larsson <alexl@redhat.com>
* gfile.[ch]:
......
......@@ -409,13 +409,13 @@ g_buffered_input_stream_fill (GBufferedInputStream *stream,
return -1;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
class = G_BUFFERED_INPUT_STREAM_GET_CLASS (stream);
res = class->fill (stream, count, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_input_stream_clear_pending (input_stream);
......@@ -883,7 +883,7 @@ g_buffered_input_stream_read_byte (GBufferedInputStream *stream,
/* Byte not available, request refill for more */
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
priv->pos = 0;
priv->end = 0;
......@@ -892,7 +892,7 @@ g_buffered_input_stream_read_byte (GBufferedInputStream *stream,
nread = class->fill (stream, priv->len, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_input_stream_clear_pending (input_stream);
......
......@@ -171,7 +171,7 @@ g_cancellable_new (void)
}
/**
* g_push_current_cancellable:
* g_cancellable_push_current:
* @cancellable: optional #GCancellable object, %NULL to ignore.
*
* Pushes @cancellable onto the cancellable stack. The current
......@@ -184,7 +184,7 @@ g_cancellable_new (void)
* so you rarely have to call this yourself.
**/
void
g_push_current_cancellable (GCancellable *cancellable)
g_cancellable_push_current (GCancellable *cancellable)
{
GSList *l;
......@@ -196,14 +196,14 @@ g_push_current_cancellable (GCancellable *cancellable)
}
/**
* g_pop_current_cancellable:
* g_cancellable_pop_current:
* @cancellable: optional #GCancellable object, %NULL to ignore.
*
* Pops @cancellable off the cancellable stack (verifying that @cancellable
* is on the top of the stack).
**/
void
g_pop_current_cancellable (GCancellable *cancellable)
g_cancellable_pop_current (GCancellable *cancellable)
{
GSList *l;
......
......@@ -67,8 +67,8 @@ gboolean g_cancellable_set_error_if_cancelled (GCancellable *cancellable,
GError **error);
int g_cancellable_get_fd (GCancellable *cancellable);
GCancellable *g_cancellable_get_current (void);
void g_push_current_cancellable (GCancellable *cancellable);
void g_pop_current_cancellable (GCancellable *cancellable);
void g_cancellable_push_current (GCancellable *cancellable);
void g_cancellable_pop_current (GCancellable *cancellable);
void g_cancellable_reset (GCancellable *cancellable);
......
......@@ -166,14 +166,14 @@ g_file_enumerator_next_file (GFileEnumerator *enumerator,
class = G_FILE_ENUMERATOR_GET_CLASS (enumerator);
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
enumerator->priv->pending = TRUE;
info = (* class->next_file) (enumerator, cancellable, error);
enumerator->priv->pending = FALSE;
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
return info;
}
......@@ -216,7 +216,7 @@ g_file_enumerator_close (GFileEnumerator *enumerator,
}
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
enumerator->priv->pending = TRUE;
(* class->close_fn) (enumerator, cancellable, error);
......@@ -224,7 +224,7 @@ g_file_enumerator_close (GFileEnumerator *enumerator,
enumerator->priv->closed = TRUE;
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
return TRUE;
}
......
......@@ -134,7 +134,7 @@ g_file_input_stream_query_info (GFileInputStream *stream,
info = NULL;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
class = G_FILE_INPUT_STREAM_GET_CLASS (stream);
if (class->query_info)
......@@ -144,7 +144,7 @@ g_file_input_stream_query_info (GFileInputStream *stream,
_("Stream doesn't support query_info"));
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_input_stream_clear_pending (input_stream);
......@@ -360,12 +360,12 @@ g_file_input_stream_seek (GFileInputStream *stream,
return FALSE;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
res = class->seek (stream, offset, type, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_input_stream_clear_pending (input_stream);
......
......@@ -144,7 +144,7 @@ g_file_output_stream_query_info (GFileOutputStream *stream,
info = NULL;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
class = G_FILE_OUTPUT_STREAM_GET_CLASS (stream);
if (class->query_info)
......@@ -154,7 +154,7 @@ g_file_output_stream_query_info (GFileOutputStream *stream,
_("Stream doesn't support query_info"));
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_output_stream_clear_pending (output_stream);
......@@ -400,12 +400,12 @@ g_file_output_stream_seek (GFileOutputStream *stream,
return FALSE;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
res = class->seek (stream, offset, type, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_output_stream_clear_pending (output_stream);
......@@ -495,12 +495,12 @@ g_file_output_stream_truncate (GFileOutputStream *stream,
return FALSE;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
res = class->truncate_fn (stream, size, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_output_stream_clear_pending (output_stream);
......
......@@ -199,12 +199,12 @@ g_input_stream_read (GInputStream *stream,
return -1;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
res = class->read_fn (stream, buffer, count, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_input_stream_clear_pending (stream);
......@@ -324,12 +324,12 @@ g_input_stream_skip (GInputStream *stream,
return -1;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
res = class->skip (stream, count, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_input_stream_clear_pending (stream);
......@@ -445,13 +445,13 @@ g_input_stream_close (GInputStream *stream,
return FALSE;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
if (class->close_fn)
res = class->close_fn (stream, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_input_stream_clear_pending (stream);
......
......@@ -115,8 +115,8 @@ g_cancellable_is_cancelled
g_cancellable_set_error_if_cancelled
g_cancellable_get_fd
g_cancellable_get_current
g_push_current_cancellable
g_pop_current_cancellable
g_cancellable_push_current
g_cancellable_pop_current
g_cancellable_reset
g_cancellable_cancel
#endif
......
......@@ -156,10 +156,10 @@ io_job_thread (gpointer data,
GIOJob *job = data;
if (job->cancellable)
g_push_current_cancellable (job->cancellable);
g_cancellable_push_current (job->cancellable);
job->job_func (job, job->cancellable, job->data);
if (job->cancellable)
g_pop_current_cancellable (job->cancellable);
g_cancellable_pop_current (job->cancellable);
if (job->destroy_notify)
job->destroy_notify (job->data);
......@@ -175,12 +175,12 @@ run_job_at_idle (gpointer data)
GIOJob *job = data;
if (job->cancellable)
g_push_current_cancellable (job->cancellable);
g_cancellable_push_current (job->cancellable);
job->job_func (job, job->cancellable, job->data);
if (job->cancellable)
g_pop_current_cancellable (job->cancellable);
g_cancellable_pop_current (job->cancellable);
if (job->destroy_notify)
job->destroy_notify (job->data);
......
......@@ -207,12 +207,12 @@ g_output_stream_write (GOutputStream *stream,
return -1;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
res = class->write_fn (stream, buffer, count, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_output_stream_clear_pending (stream);
......@@ -318,12 +318,12 @@ g_output_stream_flush (GOutputStream *stream,
if (class->flush)
{
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
res = class->flush (stream, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
}
g_output_stream_clear_pending (stream);
......@@ -371,12 +371,12 @@ g_output_stream_splice (GOutputStream *stream,
res = TRUE;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
res = class->splice (stream, source, flags, cancellable, error);
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
g_output_stream_clear_pending (stream);
......@@ -516,7 +516,7 @@ g_output_stream_close (GOutputStream *stream,
return FALSE;
if (cancellable)
g_push_current_cancellable (cancellable);
g_cancellable_push_current (cancellable);
if (class->flush)
res = class->flush (stream, cancellable, error);
......@@ -539,7 +539,7 @@ g_output_stream_close (GOutputStream *stream,
}
if (cancellable)
g_pop_current_cancellable (cancellable);
g_cancellable_pop_current (cancellable);
stream->priv->closed = TRUE;
g_output_stream_clear_pending (stream);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment