projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ab29e09
)
Clarify g_cancellable_push_current docs wrt cancellable being NULL (#575013)
author
Alexander Larsson
<alexl@redhat.com>
Wed, 20 May 2009 12:55:14 +0000
(14:55 +0200)
committer
Alexander Larsson
<alexl@redhat.com>
Wed, 20 May 2009 12:55:14 +0000
(14:55 +0200)
gio/gcancellable.c
patch
|
blob
|
history
diff --git
a/gio/gcancellable.c
b/gio/gcancellable.c
index
589b83a
..
7de241a
100644
(file)
--- a/
gio/gcancellable.c
+++ b/
gio/gcancellable.c
@@
-249,8
+249,8
@@
g_cancellable_new (void)
/**
* g_cancellable_push_current:
/**
* g_cancellable_push_current:
- * @cancellable:
optional #GCancellable object, %NULL to ignore.
- *
+ * @cancellable:
a #GCancellable object
+ *
* Pushes @cancellable onto the cancellable stack. The current
* cancllable can then be recieved using g_cancellable_get_current().
*
* Pushes @cancellable onto the cancellable stack. The current
* cancllable can then be recieved using g_cancellable_get_current().
*
@@
-266,7
+266,7
@@
g_cancellable_push_current (GCancellable *cancellable)
GSList *l;
g_return_if_fail (cancellable != NULL);
GSList *l;
g_return_if_fail (cancellable != NULL);
-
+
l = g_static_private_get (¤t_cancellable);
l = g_slist_prepend (l, cancellable);
g_static_private_set (¤t_cancellable, l, NULL);
l = g_static_private_get (¤t_cancellable);
l = g_slist_prepend (l, cancellable);
g_static_private_set (¤t_cancellable, l, NULL);
@@
-274,18
+274,18
@@
g_cancellable_push_current (GCancellable *cancellable)
/**
* g_cancellable_pop_current:
/**
* g_cancellable_pop_current:
- * @cancellable:
optional #GCancellable object, %NULL to ignore.
+ * @cancellable:
a #GCancellable object
*
*
- * Pops @cancellable off the cancellable stack (verifying that @cancellable
+ * Pops @cancellable off the cancellable stack (verifying that @cancellable
* is on the top of the stack).
**/
void
g_cancellable_pop_current (GCancellable *cancellable)
{
GSList *l;
* is on the top of the stack).
**/
void
g_cancellable_pop_current (GCancellable *cancellable)
{
GSList *l;
-
+
l = g_static_private_get (¤t_cancellable);
l = g_static_private_get (¤t_cancellable);
-
+
g_return_if_fail (l != NULL);
g_return_if_fail (l->data == cancellable);
g_return_if_fail (l != NULL);
g_return_if_fail (l->data == cancellable);
@@
-295,17
+295,17
@@
g_cancellable_pop_current (GCancellable *cancellable)
/**
* g_cancellable_get_current:
/**
* g_cancellable_get_current:
- *
+ *
* Gets the top cancellable from the stack.
* Gets the top cancellable from the stack.
- *
+ *
* Returns: a #GCancellable from the top of the stack, or %NULL
* Returns: a #GCancellable from the top of the stack, or %NULL
- * if the stack is empty.
+ * if the stack is empty.
**/
GCancellable *
g_cancellable_get_current (void)
{
GSList *l;
**/
GCancellable *
g_cancellable_get_current (void)
{
GSList *l;
-
+
l = g_static_private_get (¤t_cancellable);
if (l == NULL)
return NULL;
l = g_static_private_get (¤t_cancellable);
if (l == NULL)
return NULL;