[gnome-builder: 7/7] egg-task-cache: fix counter type
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder: 7/7] egg-task-cache: fix counter type
- Date: Wed, 13 May 2015 06:21:06 +0000 (UTC)
commit 9bb61d4c2bb96029f6d5a292f089c60f36eedcd2
Author: Christian Hergert <christian hergert me>
Date: Tue May 12 23:17:49 2015 -0700
egg-task-cache: fix counter type
Casting doesn't seem to be enough to cause this to generate the right
value. Need to investigate further.
contrib/egg/egg-task-cache.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/contrib/egg/egg-task-cache.c b/contrib/egg/egg-task-cache.c
index a5adad1..185d213 100644
--- a/contrib/egg/egg-task-cache.c
+++ b/contrib/egg/egg-task-cache.c
@@ -285,6 +285,7 @@ egg_task_cache_propagate_error (EggTaskCache *self,
if ((queued = g_hash_table_lookup (self->queued, key)))
{
+ gint64 count = queued->len;
gsize i;
/* we can't use steal because we want the key freed */
@@ -299,9 +300,9 @@ egg_task_cache_propagate_error (EggTaskCache *self,
g_task_return_error (task, g_error_copy (error));
}
- EGG_COUNTER_SUB (queued, queued->len);
-
g_ptr_array_unref (queued);
+
+ EGG_COUNTER_SUB (queued, count);
}
}
@@ -339,6 +340,7 @@ egg_task_cache_propagate_pointer (EggTaskCache *self,
if ((queued = g_hash_table_lookup (self->queued, key)))
{
+ gint64 count = queued->len;
gsize i;
g_ptr_array_ref (queued);
@@ -352,9 +354,9 @@ egg_task_cache_propagate_pointer (EggTaskCache *self,
g_task_return_pointer (task, g_object_ref (value), g_object_unref);
}
- EGG_COUNTER_SUB (queued, queued->len);
-
g_ptr_array_unref (queued);
+
+ EGG_COUNTER_SUB (queued, count);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]