summaryrefslogtreecommitdiff
path: root/src/threads/Workers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/threads/Workers.c')
-rw-r--r--src/threads/Workers.c95
1 files changed, 48 insertions, 47 deletions
diff --git a/src/threads/Workers.c b/src/threads/Workers.c
index 312f3e3..ff9d180 100644
--- a/src/threads/Workers.c
+++ b/src/threads/Workers.c
@@ -1,4 +1,4 @@
-/* Workers.c generated by valac 0.34.4, the Vala compiler
+/* Workers.c generated by valac 0.34.7, the Vala compiler
* generated from Workers.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
@@ -207,7 +207,7 @@ static gint64 _background_job_priority_comparator_comparator (void* a, void* b,
BackgroundJobBatch* background_job_batch_construct (GType object_type) {
BackgroundJobBatch * self = NULL;
#line 10 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- self = (BackgroundJobBatch*) sorted_list_construct (object_type, TYPE_BACKGROUND_JOB, (GBoxedCopyFunc) background_job_ref, background_job_unref, _background_job_priority_comparator_comparator, NULL);
+ self = (BackgroundJobBatch*) sorted_list_construct (object_type, TYPE_BACKGROUND_JOB, (GBoxedCopyFunc) background_job_ref, (GDestroyNotify) background_job_unref, _background_job_priority_comparator_comparator, NULL);
#line 9 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return self;
#line 214 "Workers.c"
@@ -663,29 +663,30 @@ gint workers_get_pending_job_count (Workers* self) {
#line 664 "Workers.c"
{
GAsyncQueue* _tmp0_ = NULL;
+ gint _tmp4_ = 0;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp0_ = self->priv->queue;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_lock (&self->priv->__lock_queue);
-#line 671 "Workers.c"
+#line 672 "Workers.c"
{
gint _tmp1_ = 0;
#line 80 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp1_ = self->priv->enqueued;
#line 80 "/home/jens/Source/shotwell/src/threads/Workers.vala"
result = _tmp1_;
-#line 678 "Workers.c"
+#line 679 "Workers.c"
{
GAsyncQueue* _tmp2_ = NULL;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp2_ = self->priv->queue;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_unlock (&self->priv->__lock_queue);
-#line 685 "Workers.c"
+#line 686 "Workers.c"
}
#line 80 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return result;
-#line 689 "Workers.c"
+#line 690 "Workers.c"
}
__finally11:
{
@@ -694,15 +695,15 @@ gint workers_get_pending_job_count (Workers* self) {
_tmp3_ = self->priv->queue;
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_unlock (&self->priv->__lock_queue);
-#line 698 "Workers.c"
+#line 699 "Workers.c"
}
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_clear_error (&_inner_error_);
#line 79 "/home/jens/Source/shotwell/src/threads/Workers.vala"
- return 0;
-#line 706 "Workers.c"
+ return _tmp4_;
+#line 707 "Workers.c"
}
}
@@ -714,14 +715,14 @@ static void workers_thread_start (Workers* self, void* ignored) {
GError * _inner_error_ = NULL;
#line 84 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_return_if_fail (IS_WORKERS (self));
-#line 718 "Workers.c"
+#line 719 "Workers.c"
{
GAsyncQueue* _tmp0_ = NULL;
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp0_ = self->priv->queue;
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_lock (&self->priv->__lock_queue);
-#line 725 "Workers.c"
+#line 726 "Workers.c"
{
GAsyncQueue* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
@@ -750,7 +751,7 @@ static void workers_thread_start (Workers* self, void* ignored) {
_tmp5_ = self->priv->enqueued;
#line 92 "/home/jens/Source/shotwell/src/threads/Workers.vala"
empty = _tmp5_ == 0;
-#line 754 "Workers.c"
+#line 755 "Workers.c"
}
__finally12:
{
@@ -759,7 +760,7 @@ static void workers_thread_start (Workers* self, void* ignored) {
_tmp6_ = self->priv->queue;
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_rec_mutex_unlock (&self->priv->__lock_queue);
-#line 763 "Workers.c"
+#line 764 "Workers.c"
}
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
@@ -771,7 +772,7 @@ static void workers_thread_start (Workers* self, void* ignored) {
g_clear_error (&_inner_error_);
#line 87 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return;
-#line 775 "Workers.c"
+#line 776 "Workers.c"
}
}
#line 95 "/home/jens/Source/shotwell/src/threads/Workers.vala"
@@ -780,30 +781,30 @@ static void workers_thread_start (Workers* self, void* ignored) {
if (!_tmp7_) {
#line 96 "/home/jens/Source/shotwell/src/threads/Workers.vala"
background_job_execute (job);
-#line 784 "Workers.c"
+#line 785 "Workers.c"
}
#line 98 "/home/jens/Source/shotwell/src/threads/Workers.vala"
background_job_internal_notify_completion (job);
#line 100 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (empty) {
-#line 790 "Workers.c"
+#line 791 "Workers.c"
EventSemaphore* _tmp8_ = NULL;
#line 101 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_tmp8_ = self->priv->empty_event;
#line 101 "/home/jens/Source/shotwell/src/threads/Workers.vala"
abstract_semaphore_notify (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore));
-#line 796 "Workers.c"
+#line 797 "Workers.c"
}
#line 84 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_background_job_unref0 (job);
-#line 800 "Workers.c"
+#line 801 "Workers.c"
}
static void value_workers_init (GValue* value) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = NULL;
-#line 807 "Workers.c"
+#line 808 "Workers.c"
}
@@ -812,7 +813,7 @@ static void value_workers_free_value (GValue* value) {
if (value->data[0].v_pointer) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_unref (value->data[0].v_pointer);
-#line 816 "Workers.c"
+#line 817 "Workers.c"
}
}
@@ -822,11 +823,11 @@ static void value_workers_copy_value (const GValue* src_value, GValue* dest_valu
if (src_value->data[0].v_pointer) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
dest_value->data[0].v_pointer = workers_ref (src_value->data[0].v_pointer);
-#line 826 "Workers.c"
+#line 827 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
dest_value->data[0].v_pointer = NULL;
-#line 830 "Workers.c"
+#line 831 "Workers.c"
}
}
@@ -834,37 +835,37 @@ static void value_workers_copy_value (const GValue* src_value, GValue* dest_valu
static gpointer value_workers_peek_pointer (const GValue* value) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return value->data[0].v_pointer;
-#line 838 "Workers.c"
+#line 839 "Workers.c"
}
static gchar* value_workers_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (collect_values[0].v_pointer) {
-#line 845 "Workers.c"
+#line 846 "Workers.c"
Workers* object;
object = collect_values[0].v_pointer;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (object->parent_instance.g_class == NULL) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 852 "Workers.c"
+#line 853 "Workers.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
-#line 856 "Workers.c"
+#line 857 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = workers_ref (object);
-#line 860 "Workers.c"
+#line 861 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = NULL;
-#line 864 "Workers.c"
+#line 865 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return NULL;
-#line 868 "Workers.c"
+#line 869 "Workers.c"
}
@@ -875,25 +876,25 @@ static gchar* value_workers_lcopy_value (const GValue* value, guint n_collect_va
if (!object_p) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
-#line 879 "Workers.c"
+#line 880 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (!value->data[0].v_pointer) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
*object_p = NULL;
-#line 885 "Workers.c"
+#line 886 "Workers.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
*object_p = value->data[0].v_pointer;
-#line 889 "Workers.c"
+#line 890 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
*object_p = workers_ref (value->data[0].v_pointer);
-#line 893 "Workers.c"
+#line 894 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return NULL;
-#line 897 "Workers.c"
+#line 898 "Workers.c"
}
@@ -907,7 +908,7 @@ GParamSpec* param_spec_workers (const gchar* name, const gchar* nick, const gcha
G_PARAM_SPEC (spec)->value_type = object_type;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return G_PARAM_SPEC (spec);
-#line 911 "Workers.c"
+#line 912 "Workers.c"
}
@@ -916,7 +917,7 @@ gpointer value_get_workers (const GValue* value) {
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_WORKERS), NULL);
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return value->data[0].v_pointer;
-#line 920 "Workers.c"
+#line 921 "Workers.c"
}
@@ -936,17 +937,17 @@ void value_set_workers (GValue* value, gpointer v_object) {
value->data[0].v_pointer = v_object;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_ref (value->data[0].v_pointer);
-#line 940 "Workers.c"
+#line 941 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = NULL;
-#line 944 "Workers.c"
+#line 945 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (old) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_unref (old);
-#line 950 "Workers.c"
+#line 951 "Workers.c"
}
}
@@ -965,17 +966,17 @@ void value_take_workers (GValue* value, gpointer v_object) {
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = v_object;
-#line 969 "Workers.c"
+#line 970 "Workers.c"
} else {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
value->data[0].v_pointer = NULL;
-#line 973 "Workers.c"
+#line 974 "Workers.c"
}
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
if (old) {
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
workers_unref (old);
-#line 979 "Workers.c"
+#line 980 "Workers.c"
}
}
@@ -987,7 +988,7 @@ static void workers_class_init (WorkersClass * klass) {
((WorkersClass *) klass)->finalize = workers_finalize;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_type_class_add_private (klass, sizeof (WorkersPrivate));
-#line 991 "Workers.c"
+#line 992 "Workers.c"
}
@@ -1010,7 +1011,7 @@ static void workers_instance_init (Workers * self) {
self->priv->enqueued = 0;
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
self->ref_count = 1;
-#line 1014 "Workers.c"
+#line 1015 "Workers.c"
}
@@ -1028,7 +1029,7 @@ static void workers_finalize (Workers* obj) {
_g_async_queue_unref0 (self->priv->queue);
#line 20 "/home/jens/Source/shotwell/src/threads/Workers.vala"
_abstract_semaphore_unref0 (self->priv->empty_event);
-#line 1032 "Workers.c"
+#line 1033 "Workers.c"
}
@@ -1053,7 +1054,7 @@ gpointer workers_ref (gpointer instance) {
g_atomic_int_inc (&self->ref_count);
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
return instance;
-#line 1057 "Workers.c"
+#line 1058 "Workers.c"
}
@@ -1066,7 +1067,7 @@ void workers_unref (gpointer instance) {
WORKERS_GET_CLASS (self)->finalize (self);
#line 15 "/home/jens/Source/shotwell/src/threads/Workers.vala"
g_type_free_instance ((GTypeInstance *) self);
-#line 1070 "Workers.c"
+#line 1071 "Workers.c"
}
}