From ab841afa5cb39058d9ab2cebb67cfe6369443f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 25 Jun 2018 20:55:59 +0200 Subject: New upstream version 0.28.3 --- src/db/TagTable.c | 1497 +++++++++++++++++++++++++++-------------------------- 1 file changed, 774 insertions(+), 723 deletions(-) (limited to 'src/db/TagTable.c') diff --git a/src/db/TagTable.c b/src/db/TagTable.c index 986af84..b1c77a4 100644 --- a/src/db/TagTable.c +++ b/src/db/TagTable.c @@ -1,4 +1,4 @@ -/* TagTable.c generated by valac 0.36.6, the Vala compiler +/* TagTable.c generated by valac 0.40.4, the Vala compiler * generated from TagTable.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -7,6 +7,7 @@ * (version 2.1 or later). See the COPYING file in this distribution. */ + #include #include #include @@ -137,83 +138,131 @@ GType tag_id_get_type (void) G_GNUC_CONST; TagID* tag_id_dup (const TagID* self); void tag_id_free (TagID* self); #define TAG_ID_INVALID ((gint64) -1) -void tag_id_init (TagID *self, gint64 id); +void tag_id_init (TagID *self, + gint64 id); gboolean tag_id_is_invalid (TagID *self); gboolean tag_id_is_valid (TagID *self); gpointer tag_row_ref (gpointer instance); void tag_row_unref (gpointer instance); -GParamSpec* param_spec_tag_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_tag_row (GValue* value, gpointer v_object); -void value_take_tag_row (GValue* value, gpointer v_object); +GParamSpec* param_spec_tag_row (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_tag_row (GValue* value, + gpointer v_object); +void value_take_tag_row (GValue* value, + gpointer v_object); gpointer value_get_tag_row (const GValue* value); GType tag_row_get_type (void) G_GNUC_CONST; -enum { - TAG_ROW_DUMMY_PROPERTY -}; TagRow* tag_row_new (void); TagRow* tag_row_construct (GType object_type); static void tag_row_finalize (TagRow * obj); gpointer database_table_ref (gpointer instance); void database_table_unref (gpointer instance); -GParamSpec* param_spec_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_database_table (GValue* value, gpointer v_object); -void value_take_database_table (GValue* value, gpointer v_object); +GParamSpec* param_spec_database_table (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_database_table (GValue* value, + gpointer v_object); +void value_take_database_table (GValue* value, + gpointer v_object); gpointer value_get_database_table (const GValue* value); GType database_table_get_type (void) G_GNUC_CONST; GType tag_table_get_type (void) G_GNUC_CONST; -enum { - TAG_TABLE_DUMMY_PROPERTY -}; static TagTable* tag_table_new (void); static TagTable* tag_table_construct (GType object_type); DatabaseTable* database_table_construct (GType object_type); -void database_table_set_table_name (DatabaseTable* self, const gchar* table_name); -void database_table_fatal (const gchar* op, gint res); +void database_table_set_table_name (DatabaseTable* self, + const gchar* table_name); +void database_table_fatal (const gchar* op, + gint res); TagTable* tag_table_get_instance (void); void tag_table_upgrade_for_htags (void); GQuark database_error_quark (void); -GeeList* tag_table_get_all_rows (TagTable* self, GError** error); +GeeList* tag_table_get_all_rows (TagTable* self, + GError** error); #define TAG_PATH_SEPARATOR_STRING "/" -void tag_table_rename (TagTable* self, TagID* tag_id, const gchar* new_name, GError** error); -TagRow* tag_table_add (TagTable* self, const gchar* name, GError** error); +void tag_table_rename (TagTable* self, + TagID* tag_id, + const gchar* new_name, + GError** error); +TagRow* tag_table_add (TagTable* self, + const gchar* name, + GError** error); gulong now_sec (void); -void database_table_throw_error (const gchar* method, gint res, GError** error); -void tag_table_create_from_row (TagTable* self, TagRow* row, TagID* result, GError** error); -static gchar* tag_table_serialize_source_ids (TagTable* self, GeeCollection* source_ids); -void tag_table_remove (TagTable* self, TagID* tag_id, GError** error); -void database_table_delete_by_id (DatabaseTable* self, gint64 id, GError** error); -gchar* tag_table_get_name (TagTable* self, TagID* tag_id, GError** error); -gboolean database_table_select_by_id (DatabaseTable* self, gint64 id, const gchar* columns, sqlite3_stmt* * stmt); -TagRow* tag_table_get_row (TagTable* self, TagID* tag_id, GError** error); -static GeeSet* tag_table_unserialize_source_ids (TagTable* self, const gchar* text_list); -void database_table_update_text_by_id_2 (DatabaseTable* self, gint64 id, const gchar* column, const gchar* text, GError** error); -void tag_table_set_tagged_sources (TagTable* self, TagID* tag_id, GeeCollection* source_ids, GError** error); +void database_table_throw_error (const gchar* method, + gint res, + GError** error); +void tag_table_create_from_row (TagTable* self, + TagRow* row, + TagID* result, + GError** error); +static gchar* tag_table_serialize_source_ids (TagTable* self, + GeeCollection* source_ids); +void tag_table_remove (TagTable* self, + TagID* tag_id, + GError** error); +void database_table_delete_by_id (DatabaseTable* self, + gint64 id, + GError** error); +gchar* tag_table_get_name (TagTable* self, + TagID* tag_id, + GError** error); +gboolean database_table_select_by_id (DatabaseTable* self, + gint64 id, + const gchar* columns, + sqlite3_stmt* * stmt); +TagRow* tag_table_get_row (TagTable* self, + TagID* tag_id, + GError** error); +static GeeSet* tag_table_unserialize_source_ids (TagTable* self, + const gchar* text_list); +void database_table_update_text_by_id_2 (DatabaseTable* self, + gint64 id, + const gchar* column, + const gchar* text, + GError** error); +void tag_table_set_tagged_sources (TagTable* self, + TagID* tag_id, + GeeCollection* source_ids, + GError** error); gboolean is_string_empty (const gchar* s); GType photo_id_get_type (void) G_GNUC_CONST; PhotoID* photo_id_dup (const PhotoID* self); void photo_id_free (PhotoID* self); gchar* photo_id_upgrade_photo_id_to_source_id (PhotoID* photo_id); -gint64 parse_int64 (const gchar* str, gint num_base); -void photo_id_init (PhotoID *self, gint64 id); +gint64 parse_int64 (const gchar* str, + gint num_base); +void photo_id_init (PhotoID *self, + gint64 id); static void tag_table_finalize (DatabaseTable * obj); -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func); -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func); +static void _vala_array_destroy (gpointer array, + gint array_length, + GDestroyNotify destroy_func); +static void _vala_array_free (gpointer array, + gint array_length, + GDestroyNotify destroy_func); static gint _vala_array_length (gpointer array); -void tag_id_init (TagID *self, gint64 id) { - gint64 _tmp0_; +void +tag_id_init (TagID *self, + gint64 id) +{ #line 12 "/home/jens/Source/shotwell/src/db/TagTable.vala" memset (self, 0, sizeof (TagID)); #line 13 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp0_ = id; -#line 13 "/home/jens/Source/shotwell/src/db/TagTable.vala" - (*self).id = _tmp0_; -#line 213 "TagTable.c" + (*self).id = id; +#line 260 "TagTable.c" } -gboolean tag_id_is_invalid (TagID *self) { +gboolean +tag_id_is_invalid (TagID *self) +{ gboolean result = FALSE; gint64 _tmp0_; #line 17 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -222,11 +271,13 @@ gboolean tag_id_is_invalid (TagID *self) { result = _tmp0_ == TAG_ID_INVALID; #line 17 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 226 "TagTable.c" +#line 275 "TagTable.c" } -gboolean tag_id_is_valid (TagID *self) { +gboolean +tag_id_is_valid (TagID *self) +{ gboolean result = FALSE; gint64 _tmp0_; #line 21 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -235,11 +286,13 @@ gboolean tag_id_is_valid (TagID *self) { result = _tmp0_ != TAG_ID_INVALID; #line 21 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 239 "TagTable.c" +#line 290 "TagTable.c" } -TagID* tag_id_dup (const TagID* self) { +TagID* +tag_id_dup (const TagID* self) +{ TagID* dup; #line 7 "/home/jens/Source/shotwell/src/db/TagTable.vala" dup = g_new0 (TagID, 1); @@ -247,18 +300,22 @@ TagID* tag_id_dup (const TagID* self) { memcpy (dup, self, sizeof (TagID)); #line 7 "/home/jens/Source/shotwell/src/db/TagTable.vala" return dup; -#line 251 "TagTable.c" +#line 304 "TagTable.c" } -void tag_id_free (TagID* self) { +void +tag_id_free (TagID* self) +{ #line 7 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_free (self); -#line 258 "TagTable.c" +#line 313 "TagTable.c" } -GType tag_id_get_type (void) { +GType +tag_id_get_type (void) +{ static volatile gsize tag_id_type_id__volatile = 0; if (g_once_init_enter (&tag_id_type_id__volatile)) { GType tag_id_type_id; @@ -269,121 +326,150 @@ GType tag_id_get_type (void) { } -TagRow* tag_row_construct (GType object_type) { +TagRow* +tag_row_construct (GType object_type) +{ TagRow* self = NULL; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" self = (TagRow*) g_type_create_instance (object_type); #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return self; -#line 279 "TagTable.c" +#line 338 "TagTable.c" } -TagRow* tag_row_new (void) { +TagRow* +tag_row_new (void) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return tag_row_construct (TYPE_TAG_ROW); -#line 286 "TagTable.c" +#line 347 "TagTable.c" } -static void value_tag_row_init (GValue* value) { +static void +value_tag_row_init (GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" value->data[0].v_pointer = NULL; -#line 293 "TagTable.c" +#line 356 "TagTable.c" } -static void value_tag_row_free_value (GValue* value) { +static void +value_tag_row_free_value (GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" tag_row_unref (value->data[0].v_pointer); -#line 302 "TagTable.c" +#line 367 "TagTable.c" } } -static void value_tag_row_copy_value (const GValue* src_value, GValue* dest_value) { +static void +value_tag_row_copy_value (const GValue* src_value, + GValue* dest_value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (src_value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" dest_value->data[0].v_pointer = tag_row_ref (src_value->data[0].v_pointer); -#line 312 "TagTable.c" +#line 380 "TagTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" dest_value->data[0].v_pointer = NULL; -#line 316 "TagTable.c" +#line 384 "TagTable.c" } } -static gpointer value_tag_row_peek_pointer (const GValue* value) { +static gpointer +value_tag_row_peek_pointer (const GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return value->data[0].v_pointer; -#line 324 "TagTable.c" +#line 394 "TagTable.c" } -static gchar* value_tag_row_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +static gchar* +value_tag_row_collect_value (GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (collect_values[0].v_pointer) { -#line 331 "TagTable.c" +#line 406 "TagTable.c" TagRow * object; object = collect_values[0].v_pointer; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (object->parent_instance.g_class == NULL) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 338 "TagTable.c" +#line 413 "TagTable.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.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 342 "TagTable.c" +#line 417 "TagTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" value->data[0].v_pointer = tag_row_ref (object); -#line 346 "TagTable.c" +#line 421 "TagTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" value->data[0].v_pointer = NULL; -#line 350 "TagTable.c" +#line 425 "TagTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return NULL; -#line 354 "TagTable.c" +#line 429 "TagTable.c" } -static gchar* value_tag_row_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { +static gchar* +value_tag_row_lcopy_value (const GValue* value, + guint n_collect_values, + GTypeCValue* collect_values, + guint collect_flags) +{ TagRow ** object_p; object_p = collect_values[0].v_pointer; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (!object_p) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 365 "TagTable.c" +#line 445 "TagTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (!value->data[0].v_pointer) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" *object_p = NULL; -#line 371 "TagTable.c" +#line 451 "TagTable.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" *object_p = value->data[0].v_pointer; -#line 375 "TagTable.c" +#line 455 "TagTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" *object_p = tag_row_ref (value->data[0].v_pointer); -#line 379 "TagTable.c" +#line 459 "TagTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return NULL; -#line 383 "TagTable.c" +#line 463 "TagTable.c" } -GParamSpec* param_spec_tag_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { +GParamSpec* +param_spec_tag_row (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags) +{ ParamSpecTagRow* spec; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_val_if_fail (g_type_is_a (object_type, TYPE_TAG_ROW), NULL); @@ -393,20 +479,25 @@ GParamSpec* param_spec_tag_row (const gchar* name, const gchar* nick, const gcha G_PARAM_SPEC (spec)->value_type = object_type; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return G_PARAM_SPEC (spec); -#line 397 "TagTable.c" +#line 483 "TagTable.c" } -gpointer value_get_tag_row (const GValue* value) { +gpointer +value_get_tag_row (const GValue* value) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TAG_ROW), NULL); #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return value->data[0].v_pointer; -#line 406 "TagTable.c" +#line 494 "TagTable.c" } -void value_set_tag_row (GValue* value, gpointer v_object) { +void +value_set_tag_row (GValue* value, + gpointer v_object) +{ TagRow * old; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TAG_ROW)); @@ -422,22 +513,25 @@ void value_set_tag_row (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" tag_row_ref (value->data[0].v_pointer); -#line 426 "TagTable.c" +#line 517 "TagTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" value->data[0].v_pointer = NULL; -#line 430 "TagTable.c" +#line 521 "TagTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (old) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" tag_row_unref (old); -#line 436 "TagTable.c" +#line 527 "TagTable.c" } } -void value_take_tag_row (GValue* value, gpointer v_object) { +void +value_take_tag_row (GValue* value, + gpointer v_object) +{ TagRow * old; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TAG_ROW)); @@ -451,38 +545,44 @@ void value_take_tag_row (GValue* value, gpointer v_object) { g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" value->data[0].v_pointer = v_object; -#line 455 "TagTable.c" +#line 549 "TagTable.c" } else { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" value->data[0].v_pointer = NULL; -#line 459 "TagTable.c" +#line 553 "TagTable.c" } #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (old) { #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" tag_row_unref (old); -#line 465 "TagTable.c" +#line 559 "TagTable.c" } } -static void tag_row_class_init (TagRowClass * klass) { +static void +tag_row_class_init (TagRowClass * klass) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" tag_row_parent_class = g_type_class_peek_parent (klass); #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" ((TagRowClass *) klass)->finalize = tag_row_finalize; -#line 475 "TagTable.c" +#line 571 "TagTable.c" } -static void tag_row_instance_init (TagRow * self) { +static void +tag_row_instance_init (TagRow * self) +{ #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" self->ref_count = 1; -#line 482 "TagTable.c" +#line 580 "TagTable.c" } -static void tag_row_finalize (TagRow * obj) { +static void +tag_row_finalize (TagRow * obj) +{ TagRow * self; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TAG_ROW, TagRow); @@ -492,11 +592,13 @@ static void tag_row_finalize (TagRow * obj) { _g_free0 (self->name); #line 28 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_object_unref0 (self->source_id_list); -#line 496 "TagTable.c" +#line 596 "TagTable.c" } -GType tag_row_get_type (void) { +GType +tag_row_get_type (void) +{ static volatile gsize tag_row_type_id__volatile = 0; if (g_once_init_enter (&tag_row_type_id__volatile)) { static const GTypeValueTable g_define_type_value_table = { value_tag_row_init, value_tag_row_free_value, value_tag_row_copy_value, value_tag_row_peek_pointer, "p", value_tag_row_collect_value, "p", value_tag_row_lcopy_value }; @@ -510,18 +612,22 @@ GType tag_row_get_type (void) { } -gpointer tag_row_ref (gpointer instance) { +gpointer +tag_row_ref (gpointer instance) +{ TagRow * self; self = instance; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_atomic_int_inc (&self->ref_count); #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" return instance; -#line 521 "TagTable.c" +#line 625 "TagTable.c" } -void tag_row_unref (gpointer instance) { +void +tag_row_unref (gpointer instance) +{ TagRow * self; self = instance; #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -530,12 +636,14 @@ void tag_row_unref (gpointer instance) { TAG_ROW_GET_CLASS (self)->finalize (self); #line 25 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_type_free_instance ((GTypeInstance *) self); -#line 534 "TagTable.c" +#line 640 "TagTable.c" } } -static TagTable* tag_table_construct (GType object_type) { +static TagTable* +tag_table_construct (GType object_type) +{ TagTable* self = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -545,7 +653,6 @@ static TagTable* tag_table_construct (GType object_type) { gint _tmp3_; sqlite3_stmt* _tmp4_; gint _tmp5_; - gint _tmp6_; #line 35 "/home/jens/Source/shotwell/src/db/TagTable.vala" self = (TagTable*) database_table_construct (object_type); #line 36 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -567,44 +674,48 @@ static TagTable* tag_table_construct (GType object_type) { #line 49 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp4_ = stmt; #line 49 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp5_ = sqlite3_step (_tmp4_); -#line 49 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp5_; + res = sqlite3_step (_tmp4_); #line 50 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp6_ = res; + _tmp5_ = res; #line 50 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp6_ != SQLITE_DONE) { -#line 578 "TagTable.c" - gint _tmp7_; + if (_tmp5_ != SQLITE_DONE) { +#line 683 "TagTable.c" + gint _tmp6_; #line 51 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp7_ = res; + _tmp6_ = res; #line 51 "/home/jens/Source/shotwell/src/db/TagTable.vala" - database_table_fatal ("create TagTable", _tmp7_); -#line 584 "TagTable.c" + database_table_fatal ("create TagTable", _tmp6_); +#line 689 "TagTable.c" } #line 35 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); #line 35 "/home/jens/Source/shotwell/src/db/TagTable.vala" return self; -#line 590 "TagTable.c" +#line 695 "TagTable.c" } -static TagTable* tag_table_new (void) { +static TagTable* +tag_table_new (void) +{ #line 35 "/home/jens/Source/shotwell/src/db/TagTable.vala" return tag_table_construct (TYPE_TAG_TABLE); -#line 597 "TagTable.c" +#line 704 "TagTable.c" } -static gpointer _database_table_ref0 (gpointer self) { +static gpointer +_database_table_ref0 (gpointer self) +{ #line 58 "/home/jens/Source/shotwell/src/db/TagTable.vala" return self ? database_table_ref (self) : NULL; -#line 604 "TagTable.c" +#line 713 "TagTable.c" } -TagTable* tag_table_get_instance (void) { +TagTable* +tag_table_get_instance (void) +{ TagTable* result = NULL; TagTable* _tmp0_; TagTable* _tmp2_; @@ -613,7 +724,7 @@ TagTable* tag_table_get_instance (void) { _tmp0_ = tag_table_instance; #line 55 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (_tmp0_ == NULL) { -#line 617 "TagTable.c" +#line 728 "TagTable.c" TagTable* _tmp1_; #line 56 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp1_ = tag_table_new (); @@ -621,7 +732,7 @@ TagTable* tag_table_get_instance (void) { _database_table_unref0 (tag_table_instance); #line 56 "/home/jens/Source/shotwell/src/db/TagTable.vala" tag_table_instance = _tmp1_; -#line 625 "TagTable.c" +#line 736 "TagTable.c" } #line 58 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp2_ = tag_table_instance; @@ -631,180 +742,173 @@ TagTable* tag_table_get_instance (void) { result = _tmp3_; #line 58 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 635 "TagTable.c" +#line 746 "TagTable.c" } -static gpointer _g_object_ref0 (gpointer self) { +static gpointer +_g_object_ref0 (gpointer self) +{ #line 67 "/home/jens/Source/shotwell/src/db/TagTable.vala" return self ? g_object_ref (self) : NULL; -#line 642 "TagTable.c" +#line 755 "TagTable.c" } -static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) { +static gchar* +string_replace (const gchar* self, + const gchar* old, + const gchar* replacement) +{ gchar* result = NULL; gboolean _tmp0_ = FALSE; gboolean _tmp1_ = FALSE; GError * _inner_error_ = NULL; -#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (old != NULL, NULL); -#line 1407 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1421 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (replacement != NULL, NULL); -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if ((*((gchar*) self)) == '\0') { -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp1_ = TRUE; -#line 661 "TagTable.c" +#line 778 "TagTable.c" } else { - const gchar* _tmp2_; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp2_ = old; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = (*((gchar*) _tmp2_)) == '\0'; -#line 668 "TagTable.c" +#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp1_ = (*((gchar*) old)) == '\0'; +#line 782 "TagTable.c" } -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_tmp1_) { -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _tmp0_ = TRUE; -#line 674 "TagTable.c" +#line 788 "TagTable.c" } else { - const gchar* _tmp3_; - const gchar* _tmp4_; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp3_ = old; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp4_ = replacement; -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = g_strcmp0 (_tmp3_, _tmp4_) == 0; -#line 684 "TagTable.c" +#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = g_strcmp0 (old, replacement) == 0; +#line 792 "TagTable.c" } -#line 1408 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1422 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_tmp0_) { -#line 688 "TagTable.c" - gchar* _tmp5_; -#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp5_ = g_strdup (self); -#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp5_; -#line 1409 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 796 "TagTable.c" + gchar* _tmp2_; +#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp2_ = g_strdup (self); +#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp2_; +#line 1423 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 696 "TagTable.c" +#line 804 "TagTable.c" } { GRegex* regex = NULL; - const gchar* _tmp6_; - gchar* _tmp7_; - gchar* _tmp8_; - GRegex* _tmp9_; - GRegex* _tmp10_; - gchar* _tmp11_ = NULL; - GRegex* _tmp12_; - const gchar* _tmp13_; - gchar* _tmp14_; - gchar* _tmp15_; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp6_ = old; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp7_ = g_regex_escape_string (_tmp6_, -1); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp8_ = _tmp7_; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp9_ = g_regex_new (_tmp8_, 0, 0, &_inner_error_); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp10_ = _tmp9_; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _g_free0 (_tmp8_); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - regex = _tmp10_; -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar* _tmp3_; + gchar* _tmp4_; + GRegex* _tmp5_; + GRegex* _tmp6_; + gchar* _tmp7_ = NULL; + GRegex* _tmp8_; + gchar* _tmp9_; + gchar* _tmp10_; +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp3_ = g_regex_escape_string (old, -1); +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp4_ = _tmp3_; +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp5_ = g_regex_new (_tmp4_, 0, 0, &_inner_error_); +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp6_ = _tmp5_; +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _g_free0 (_tmp4_); +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + regex = _tmp6_; +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_inner_error_->domain == G_REGEX_ERROR) { -#line 728 "TagTable.c" +#line 832 "TagTable.c" goto __catch21_g_regex_error; } -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_clear_error (&_inner_error_); -#line 1412 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1426 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return NULL; -#line 737 "TagTable.c" +#line 841 "TagTable.c" } -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp12_ = regex; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp13_ = replacement; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp14_ = g_regex_replace_literal (_tmp12_, self, (gssize) -1, 0, _tmp13_, 0, &_inner_error_); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = _tmp14_; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp8_ = regex; +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp9_ = g_regex_replace_literal (_tmp8_, self, (gssize) -1, 0, replacement, 0, &_inner_error_); +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp7_ = _tmp9_; +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _g_regex_unref0 (regex); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (_inner_error_->domain == G_REGEX_ERROR) { -#line 753 "TagTable.c" +#line 855 "TagTable.c" goto __catch21_g_regex_error; } -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _g_regex_unref0 (regex); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_clear_error (&_inner_error_); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return NULL; -#line 764 "TagTable.c" +#line 866 "TagTable.c" } -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp15_ = _tmp11_; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp11_ = NULL; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp15_; -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _g_free0 (_tmp11_); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp10_ = _tmp7_; +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp7_ = NULL; +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp10_; +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _g_free0 (_tmp7_); +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _g_regex_unref0 (regex); -#line 1413 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1427 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 778 "TagTable.c" +#line 880 "TagTable.c" } goto __finally21; __catch21_g_regex_error: { GError* e = NULL; -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" e = _inner_error_; -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _inner_error_ = NULL; -#line 1415 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1429 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_assert_not_reached (); -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" _g_error_free0 (e); -#line 792 "TagTable.c" +#line 894 "TagTable.c" } __finally21: -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" 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 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_clear_error (&_inner_error_); -#line 1411 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1425 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return NULL; -#line 803 "TagTable.c" +#line 905 "TagTable.c" } } -void tag_table_upgrade_for_htags (void) { +void +tag_table_upgrade_for_htags (void) +{ TagTable* table = NULL; TagTable* _tmp0_; GError * _inner_error_ = NULL; @@ -812,7 +916,7 @@ void tag_table_upgrade_for_htags (void) { _tmp0_ = tag_table_get_instance (); #line 62 "/home/jens/Source/shotwell/src/db/TagTable.vala" table = _tmp0_; -#line 816 "TagTable.c" +#line 920 "TagTable.c" { GeeList* rows = NULL; TagTable* _tmp1_; @@ -827,7 +931,7 @@ void tag_table_upgrade_for_htags (void) { if (G_UNLIKELY (_inner_error_ != NULL)) { #line 65 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (_inner_error_->domain == DATABASE_ERROR) { -#line 831 "TagTable.c" +#line 935 "TagTable.c" goto __catch20_database_error; } #line 65 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -838,7 +942,7 @@ void tag_table_upgrade_for_htags (void) { g_clear_error (&_inner_error_); #line 65 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 842 "TagTable.c" +#line 946 "TagTable.c" } { GeeList* _row_list = NULL; @@ -867,7 +971,7 @@ void tag_table_upgrade_for_htags (void) { _row_index = -1; #line 67 "/home/jens/Source/shotwell/src/db/TagTable.vala" while (TRUE) { -#line 871 "TagTable.c" +#line 975 "TagTable.c" gint _tmp8_; gint _tmp9_; gint _tmp10_; @@ -896,7 +1000,7 @@ void tag_table_upgrade_for_htags (void) { if (!(_tmp9_ < _tmp10_)) { #line 67 "/home/jens/Source/shotwell/src/db/TagTable.vala" break; -#line 900 "TagTable.c" +#line 1004 "TagTable.c" } #line 67 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp11_ = _row_list; @@ -940,7 +1044,7 @@ void tag_table_upgrade_for_htags (void) { _g_object_unref0 (rows); #line 69 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (_inner_error_->domain == DATABASE_ERROR) { -#line 944 "TagTable.c" +#line 1048 "TagTable.c" goto __catch20_database_error; } #line 69 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -957,19 +1061,19 @@ void tag_table_upgrade_for_htags (void) { g_clear_error (&_inner_error_); #line 69 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 961 "TagTable.c" +#line 1065 "TagTable.c" } #line 67 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tag_row_unref0 (row); -#line 965 "TagTable.c" +#line 1069 "TagTable.c" } #line 67 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_object_unref0 (_row_list); -#line 969 "TagTable.c" +#line 1073 "TagTable.c" } #line 64 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_object_unref0 (rows); -#line 973 "TagTable.c" +#line 1077 "TagTable.c" } goto __finally20; __catch20_database_error: @@ -987,7 +1091,7 @@ void tag_table_upgrade_for_htags (void) { "ag support: %s", _tmp23_); #line 64 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_error_free0 (e); -#line 990 "TagTable.c" +#line 1094 "TagTable.c" } __finally20: #line 64 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -1000,15 +1104,19 @@ void tag_table_upgrade_for_htags (void) { g_clear_error (&_inner_error_); #line 64 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1003 "TagTable.c" +#line 1107 "TagTable.c" } #line 61 "/home/jens/Source/shotwell/src/db/TagTable.vala" _database_table_unref0 (table); -#line 1007 "TagTable.c" +#line 1111 "TagTable.c" } -TagRow* tag_table_add (TagTable* self, const gchar* name, GError** error) { +TagRow* +tag_table_add (TagTable* self, + const gchar* name, + GError** error) +{ TagRow* result = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -1017,31 +1125,24 @@ TagRow* tag_table_add (TagTable* self, const gchar* name, GError** error) { gint _tmp2_; gint _tmp3_; time_t time_created = 0; - gulong _tmp4_; - sqlite3_stmt* _tmp5_; - const gchar* _tmp6_; - gchar* _tmp7_; - GDestroyNotify _tmp8_; - gint _tmp9_; + sqlite3_stmt* _tmp4_; + gchar* _tmp5_; + GDestroyNotify _tmp6_; + gint _tmp7_; + sqlite3_stmt* _tmp8_; + time_t _tmp9_; gint _tmp10_; sqlite3_stmt* _tmp11_; - time_t _tmp12_; - gint _tmp13_; - gint _tmp14_; - sqlite3_stmt* _tmp15_; - gint _tmp16_; - gint _tmp17_; + gint _tmp12_; TagRow* row = NULL; + TagRow* _tmp14_; + TagRow* _tmp15_; + sqlite3* _tmp16_; + TagRow* _tmp17_; + gchar* _tmp18_; TagRow* _tmp19_; TagRow* _tmp20_; - sqlite3* _tmp21_; - gint64 _tmp22_; - TagRow* _tmp23_; - const gchar* _tmp24_; - gchar* _tmp25_; - TagRow* _tmp26_; - TagRow* _tmp27_; - time_t _tmp28_; + time_t _tmp21_; GError * _inner_error_ = NULL; #line 76 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_val_if_fail (IS_TAG_TABLE (self), NULL); @@ -1062,53 +1163,43 @@ TagRow* tag_table_add (TagTable* self, const gchar* name, GError** error) { #line 80 "/home/jens/Source/shotwell/src/db/TagTable.vala" _vala_assert (_tmp3_ == SQLITE_OK, "res == Sqlite.OK"); #line 82 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp4_ = now_sec (); -#line 82 "/home/jens/Source/shotwell/src/db/TagTable.vala" - time_created = (time_t) _tmp4_; -#line 84 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp5_ = stmt; + time_created = (time_t) now_sec (); #line 84 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp6_ = name; -#line 84 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp7_ = g_strdup (_tmp6_); + _tmp4_ = stmt; #line 84 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp8_ = g_free; + _tmp5_ = g_strdup (name); #line 84 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp9_ = sqlite3_bind_text (_tmp5_, 1, _tmp7_, -1, _tmp8_); + _tmp6_ = g_free; #line 84 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp9_; + res = sqlite3_bind_text (_tmp4_, 1, _tmp5_, -1, _tmp6_); #line 85 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp10_ = res; + _tmp7_ = res; #line 85 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _vala_assert (_tmp10_ == SQLITE_OK, "res == Sqlite.OK"); + _vala_assert (_tmp7_ == SQLITE_OK, "res == Sqlite.OK"); #line 86 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp11_ = stmt; + _tmp8_ = stmt; #line 86 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp12_ = time_created; + _tmp9_ = time_created; #line 86 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp13_ = sqlite3_bind_int64 (_tmp11_, 2, (gint64) _tmp12_); -#line 86 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp13_; + res = sqlite3_bind_int64 (_tmp8_, 2, (gint64) _tmp9_); #line 87 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp14_ = res; + _tmp10_ = res; #line 87 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _vala_assert (_tmp14_ == SQLITE_OK, "res == Sqlite.OK"); -#line 89 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp15_ = stmt; + _vala_assert (_tmp10_ == SQLITE_OK, "res == Sqlite.OK"); #line 89 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp16_ = sqlite3_step (_tmp15_); + _tmp11_ = stmt; #line 89 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp16_; + res = sqlite3_step (_tmp11_); #line 90 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp17_ = res; + _tmp12_ = res; #line 90 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp17_ != SQLITE_DONE) { -#line 1106 "TagTable.c" - gint _tmp18_; + if (_tmp12_ != SQLITE_DONE) { +#line 1197 "TagTable.c" + gint _tmp13_; #line 91 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp18_ = res; + _tmp13_ = res; #line 91 "/home/jens/Source/shotwell/src/db/TagTable.vala" - database_table_throw_error ("TagTable.add", _tmp18_, &_inner_error_); + database_table_throw_error ("TagTable.add", _tmp13_, &_inner_error_); #line 91 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 91 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -1119,7 +1210,7 @@ TagRow* tag_table_add (TagTable* self, const gchar* name, GError** error) { _sqlite3_finalize0 (stmt); #line 91 "/home/jens/Source/shotwell/src/db/TagTable.vala" return NULL; -#line 1122 "TagTable.c" +#line 1213 "TagTable.c" } else { #line 91 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); @@ -1129,55 +1220,56 @@ TagRow* tag_table_add (TagTable* self, const gchar* name, GError** error) { g_clear_error (&_inner_error_); #line 91 "/home/jens/Source/shotwell/src/db/TagTable.vala" return NULL; -#line 1132 "TagTable.c" +#line 1223 "TagTable.c" } } } #line 93 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp19_ = tag_row_new (); + _tmp14_ = tag_row_new (); #line 93 "/home/jens/Source/shotwell/src/db/TagTable.vala" - row = _tmp19_; -#line 94 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp20_ = row; + row = _tmp14_; #line 94 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp21_ = database_table_db; + _tmp15_ = row; #line 94 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp22_ = sqlite3_last_insert_rowid (_tmp21_); + _tmp16_ = database_table_db; #line 94 "/home/jens/Source/shotwell/src/db/TagTable.vala" - tag_id_init (&_tmp20_->tag_id, _tmp22_); + tag_id_init (&_tmp15_->tag_id, sqlite3_last_insert_rowid (_tmp16_)); #line 95 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp23_ = row; -#line 95 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp24_ = name; + _tmp17_ = row; #line 95 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp25_ = g_strdup (_tmp24_); + _tmp18_ = g_strdup (name); #line 95 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _g_free0 (_tmp23_->name); + _g_free0 (_tmp17_->name); #line 95 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp23_->name = _tmp25_; + _tmp17_->name = _tmp18_; #line 96 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp26_ = row; + _tmp19_ = row; #line 96 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _g_object_unref0 (_tmp26_->source_id_list); + _g_object_unref0 (_tmp19_->source_id_list); #line 96 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp26_->source_id_list = NULL; + _tmp19_->source_id_list = NULL; #line 97 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp27_ = row; + _tmp20_ = row; #line 97 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp28_ = time_created; + _tmp21_ = time_created; #line 97 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp27_->time_created = _tmp28_; + _tmp20_->time_created = _tmp21_; #line 99 "/home/jens/Source/shotwell/src/db/TagTable.vala" result = row; #line 99 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); #line 99 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 1176 "TagTable.c" +#line 1263 "TagTable.c" } -void tag_table_create_from_row (TagTable* self, TagRow* row, TagID* result, GError** error) { +void +tag_table_create_from_row (TagTable* self, + TagRow* row, + TagID* result, + GError** error) +{ sqlite3_stmt* stmt = NULL; gint res = 0; sqlite3* _tmp0_; @@ -1185,30 +1277,22 @@ void tag_table_create_from_row (TagTable* self, TagRow* row, TagID* result, GErr gint _tmp2_; gint _tmp3_; sqlite3_stmt* _tmp4_; - TagRow* _tmp5_; - const gchar* _tmp6_; - gchar* _tmp7_; - GDestroyNotify _tmp8_; - gint _tmp9_; - gint _tmp10_; - sqlite3_stmt* _tmp11_; - TagRow* _tmp12_; - GeeSet* _tmp13_; - gchar* _tmp14_; - GDestroyNotify _tmp15_; + const gchar* _tmp5_; + gchar* _tmp6_; + GDestroyNotify _tmp7_; + gint _tmp8_; + sqlite3_stmt* _tmp9_; + GeeSet* _tmp10_; + gchar* _tmp11_; + GDestroyNotify _tmp12_; + gint _tmp13_; + sqlite3_stmt* _tmp14_; + time_t _tmp15_; gint _tmp16_; - gint _tmp17_; - sqlite3_stmt* _tmp18_; - TagRow* _tmp19_; - time_t _tmp20_; - gint _tmp21_; - gint _tmp22_; - sqlite3_stmt* _tmp23_; - gint _tmp24_; - gint _tmp25_; - sqlite3* _tmp27_; - gint64 _tmp28_; - TagID _tmp29_ = {0}; + sqlite3_stmt* _tmp17_; + gint _tmp18_; + sqlite3* _tmp20_; + TagID _tmp21_ = {0}; GError * _inner_error_ = NULL; #line 103 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_if_fail (IS_TAG_TABLE (self)); @@ -1232,69 +1316,55 @@ void tag_table_create_from_row (TagTable* self, TagRow* row, TagID* result, GErr #line 109 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp4_ = stmt; #line 109 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp5_ = row; -#line 109 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp6_ = _tmp5_->name; + _tmp5_ = row->name; #line 109 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp7_ = g_strdup (_tmp6_); -#line 109 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp8_ = g_free; + _tmp6_ = g_strdup (_tmp5_); #line 109 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp9_ = sqlite3_bind_text (_tmp4_, 1, _tmp7_, -1, _tmp8_); + _tmp7_ = g_free; #line 109 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp9_; + res = sqlite3_bind_text (_tmp4_, 1, _tmp6_, -1, _tmp7_); #line 110 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp10_ = res; + _tmp8_ = res; #line 110 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _vala_assert (_tmp10_ == SQLITE_OK, "res == Sqlite.OK"); -#line 111 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp11_ = stmt; -#line 111 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp12_ = row; + _vala_assert (_tmp8_ == SQLITE_OK, "res == Sqlite.OK"); #line 111 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp13_ = _tmp12_->source_id_list; + _tmp9_ = stmt; #line 111 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp14_ = tag_table_serialize_source_ids (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection)); + _tmp10_ = row->source_id_list; #line 111 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp15_ = g_free; + _tmp11_ = tag_table_serialize_source_ids (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection)); #line 111 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp16_ = sqlite3_bind_text (_tmp11_, 2, _tmp14_, -1, _tmp15_); + _tmp12_ = g_free; #line 111 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp16_; + res = sqlite3_bind_text (_tmp9_, 2, _tmp11_, -1, _tmp12_); #line 112 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp17_ = res; + _tmp13_ = res; #line 112 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _vala_assert (_tmp17_ == SQLITE_OK, "res == Sqlite.OK"); + _vala_assert (_tmp13_ == SQLITE_OK, "res == Sqlite.OK"); #line 113 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp18_ = stmt; + _tmp14_ = stmt; #line 113 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp19_ = row; -#line 113 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp20_ = _tmp19_->time_created; -#line 113 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp21_ = sqlite3_bind_int64 (_tmp18_, 3, (gint64) _tmp20_); + _tmp15_ = row->time_created; #line 113 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp21_; + res = sqlite3_bind_int64 (_tmp14_, 3, (gint64) _tmp15_); #line 114 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp22_ = res; + _tmp16_ = res; #line 114 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _vala_assert (_tmp22_ == SQLITE_OK, "res == Sqlite.OK"); + _vala_assert (_tmp16_ == SQLITE_OK, "res == Sqlite.OK"); #line 116 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp23_ = stmt; + _tmp17_ = stmt; #line 116 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp24_ = sqlite3_step (_tmp23_); -#line 116 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp24_; + res = sqlite3_step (_tmp17_); #line 117 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp25_ = res; + _tmp18_ = res; #line 117 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp25_ != SQLITE_DONE) { -#line 1291 "TagTable.c" - gint _tmp26_; + if (_tmp18_ != SQLITE_DONE) { +#line 1361 "TagTable.c" + gint _tmp19_; #line 118 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp26_ = res; + _tmp19_ = res; #line 118 "/home/jens/Source/shotwell/src/db/TagTable.vala" - database_table_throw_error ("TagTable.create_from_row", _tmp26_, &_inner_error_); + database_table_throw_error ("TagTable.create_from_row", _tmp19_, &_inner_error_); #line 118 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 118 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -1305,7 +1375,7 @@ void tag_table_create_from_row (TagTable* self, TagRow* row, TagID* result, GErr _sqlite3_finalize0 (stmt); #line 118 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1307 "TagTable.c" +#line 1377 "TagTable.c" } else { #line 118 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); @@ -1315,27 +1385,29 @@ void tag_table_create_from_row (TagTable* self, TagRow* row, TagID* result, GErr g_clear_error (&_inner_error_); #line 118 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1317 "TagTable.c" +#line 1387 "TagTable.c" } } } #line 120 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp27_ = database_table_db; -#line 120 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp28_ = sqlite3_last_insert_rowid (_tmp27_); + _tmp20_ = database_table_db; #line 120 "/home/jens/Source/shotwell/src/db/TagTable.vala" - tag_id_init (&_tmp29_, _tmp28_); + tag_id_init (&_tmp21_, sqlite3_last_insert_rowid (_tmp20_)); #line 120 "/home/jens/Source/shotwell/src/db/TagTable.vala" - *result = _tmp29_; + *result = _tmp21_; #line 120 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); #line 120 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1333 "TagTable.c" +#line 1401 "TagTable.c" } -void tag_table_remove (TagTable* self, TagID* tag_id, GError** error) { +void +tag_table_remove (TagTable* self, + TagID* tag_id, + GError** error) +{ TagID _tmp0_; gint64 _tmp1_; GError * _inner_error_ = NULL; @@ -1357,7 +1429,7 @@ void tag_table_remove (TagTable* self, TagID* tag_id, GError** error) { g_propagate_error (error, _inner_error_); #line 124 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1359 "TagTable.c" +#line 1431 "TagTable.c" } else { #line 124 "/home/jens/Source/shotwell/src/db/TagTable.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); @@ -1365,13 +1437,17 @@ void tag_table_remove (TagTable* self, TagID* tag_id, GError** error) { g_clear_error (&_inner_error_); #line 124 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1367 "TagTable.c" +#line 1439 "TagTable.c" } } } -gchar* tag_table_get_name (TagTable* self, TagID* tag_id, GError** error) { +gchar* +tag_table_get_name (TagTable* self, + TagID* tag_id, + GError** error) +{ gchar* result = NULL; sqlite3_stmt* stmt = NULL; TagID _tmp0_; @@ -1403,7 +1479,7 @@ gchar* tag_table_get_name (TagTable* self, TagID* tag_id, GError** error) { _sqlite3_finalize0 (stmt); #line 130 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 1405 "TagTable.c" +#line 1481 "TagTable.c" } #line 132 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp4_ = stmt; @@ -1417,11 +1493,15 @@ gchar* tag_table_get_name (TagTable* self, TagID* tag_id, GError** error) { _sqlite3_finalize0 (stmt); #line 132 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 1419 "TagTable.c" +#line 1495 "TagTable.c" } -TagRow* tag_table_get_row (TagTable* self, TagID* tag_id, GError** error) { +TagRow* +tag_table_get_row (TagTable* self, + TagID* tag_id, + GError** error) +{ TagRow* result = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -1433,25 +1513,22 @@ TagRow* tag_table_get_row (TagTable* self, TagID* tag_id, GError** error) { TagID _tmp5_; gint64 _tmp6_; gint _tmp7_; - gint _tmp8_; - sqlite3_stmt* _tmp9_; - gint _tmp10_; - gint _tmp11_; + sqlite3_stmt* _tmp8_; + gint _tmp9_; TagRow* row = NULL; - TagRow* _tmp14_; + TagRow* _tmp12_; + TagRow* _tmp13_; + TagID _tmp14_; TagRow* _tmp15_; - TagID _tmp16_; - TagRow* _tmp17_; - sqlite3_stmt* _tmp18_; - const gchar* _tmp19_; - gchar* _tmp20_; - TagRow* _tmp21_; - sqlite3_stmt* _tmp22_; - const gchar* _tmp23_; - GeeSet* _tmp24_; - TagRow* _tmp25_; - sqlite3_stmt* _tmp26_; - gint64 _tmp27_; + sqlite3_stmt* _tmp16_; + const gchar* _tmp17_; + gchar* _tmp18_; + TagRow* _tmp19_; + sqlite3_stmt* _tmp20_; + const gchar* _tmp21_; + GeeSet* _tmp22_; + TagRow* _tmp23_; + sqlite3_stmt* _tmp24_; GError * _inner_error_ = NULL; #line 135 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_val_if_fail (IS_TAG_TABLE (self), NULL); @@ -1478,42 +1555,38 @@ TagRow* tag_table_get_row (TagTable* self, TagID* tag_id, GError** error) { #line 141 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp6_ = _tmp5_.id; #line 141 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp7_ = sqlite3_bind_int64 (_tmp4_, 1, _tmp6_); -#line 141 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp7_; + res = sqlite3_bind_int64 (_tmp4_, 1, _tmp6_); #line 142 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp8_ = res; + _tmp7_ = res; #line 142 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _vala_assert (_tmp8_ == SQLITE_OK, "res == Sqlite.OK"); -#line 144 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp9_ = stmt; + _vala_assert (_tmp7_ == SQLITE_OK, "res == Sqlite.OK"); #line 144 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp10_ = sqlite3_step (_tmp9_); + _tmp8_ = stmt; #line 144 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp10_; + res = sqlite3_step (_tmp8_); #line 145 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp11_ = res; + _tmp9_ = res; #line 145 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp11_ == SQLITE_DONE) { + if (_tmp9_ == SQLITE_DONE) { #line 146 "/home/jens/Source/shotwell/src/db/TagTable.vala" result = NULL; #line 146 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); #line 146 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 1503 "TagTable.c" +#line 1576 "TagTable.c" } else { - gint _tmp12_; + gint _tmp10_; #line 147 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp12_ = res; + _tmp10_ = res; #line 147 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp12_ != SQLITE_ROW) { -#line 1510 "TagTable.c" - gint _tmp13_; + if (_tmp10_ != SQLITE_ROW) { +#line 1583 "TagTable.c" + gint _tmp11_; #line 148 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp13_ = res; + _tmp11_ = res; #line 148 "/home/jens/Source/shotwell/src/db/TagTable.vala" - database_table_throw_error ("TagTable.get_row", _tmp13_, &_inner_error_); + database_table_throw_error ("TagTable.get_row", _tmp11_, &_inner_error_); #line 148 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 148 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -1524,7 +1597,7 @@ TagRow* tag_table_get_row (TagTable* self, TagID* tag_id, GError** error) { _sqlite3_finalize0 (stmt); #line 148 "/home/jens/Source/shotwell/src/db/TagTable.vala" return NULL; -#line 1526 "TagTable.c" +#line 1599 "TagTable.c" } else { #line 148 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); @@ -1534,64 +1607,65 @@ TagRow* tag_table_get_row (TagTable* self, TagID* tag_id, GError** error) { g_clear_error (&_inner_error_); #line 148 "/home/jens/Source/shotwell/src/db/TagTable.vala" return NULL; -#line 1536 "TagTable.c" +#line 1609 "TagTable.c" } } } } #line 150 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp14_ = tag_row_new (); + _tmp12_ = tag_row_new (); #line 150 "/home/jens/Source/shotwell/src/db/TagTable.vala" - row = _tmp14_; + row = _tmp12_; #line 151 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp15_ = row; + _tmp13_ = row; #line 151 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp16_ = *tag_id; + _tmp14_ = *tag_id; #line 151 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp15_->tag_id = _tmp16_; + _tmp13_->tag_id = _tmp14_; #line 152 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp17_ = row; + _tmp15_ = row; #line 152 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp18_ = stmt; + _tmp16_ = stmt; #line 152 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp19_ = sqlite3_column_text (_tmp18_, 0); + _tmp17_ = sqlite3_column_text (_tmp16_, 0); #line 152 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp20_ = g_strdup (_tmp19_); + _tmp18_ = g_strdup (_tmp17_); #line 152 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _g_free0 (_tmp17_->name); + _g_free0 (_tmp15_->name); #line 152 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp17_->name = _tmp20_; + _tmp15_->name = _tmp18_; #line 153 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp21_ = row; + _tmp19_ = row; #line 153 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp22_ = stmt; + _tmp20_ = stmt; #line 153 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp23_ = sqlite3_column_text (_tmp22_, 1); + _tmp21_ = sqlite3_column_text (_tmp20_, 1); #line 153 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp24_ = tag_table_unserialize_source_ids (self, _tmp23_); + _tmp22_ = tag_table_unserialize_source_ids (self, _tmp21_); #line 153 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _g_object_unref0 (_tmp21_->source_id_list); + _g_object_unref0 (_tmp19_->source_id_list); #line 153 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp21_->source_id_list = _tmp24_; -#line 154 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp25_ = row; + _tmp19_->source_id_list = _tmp22_; #line 154 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp26_ = stmt; + _tmp23_ = row; #line 154 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp27_ = sqlite3_column_int64 (_tmp26_, 2); + _tmp24_ = stmt; #line 154 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp25_->time_created = (time_t) _tmp27_; + _tmp23_->time_created = (time_t) sqlite3_column_int64 (_tmp24_, 2); #line 156 "/home/jens/Source/shotwell/src/db/TagTable.vala" result = row; #line 156 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); #line 156 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 1589 "TagTable.c" +#line 1660 "TagTable.c" } -GeeList* tag_table_get_all_rows (TagTable* self, GError** error) { +GeeList* +tag_table_get_all_rows (TagTable* self, + GError** error) +{ GeeList* result = NULL; sqlite3_stmt* stmt = NULL; gint res = 0; @@ -1622,66 +1696,61 @@ GeeList* tag_table_get_all_rows (TagTable* self, GError** error) { _tmp4_ = gee_array_list_new (TYPE_TAG_ROW, (GBoxedCopyFunc) tag_row_ref, (GDestroyNotify) tag_row_unref, NULL, NULL, NULL); #line 165 "/home/jens/Source/shotwell/src/db/TagTable.vala" rows = G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_LIST, GeeList); -#line 1624 "TagTable.c" +#line 1698 "TagTable.c" { gboolean _tmp5_ = FALSE; #line 167 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp5_ = TRUE; #line 167 "/home/jens/Source/shotwell/src/db/TagTable.vala" while (TRUE) { -#line 1631 "TagTable.c" +#line 1705 "TagTable.c" sqlite3_stmt* _tmp6_; gint _tmp7_; - gint _tmp8_; TagRow* row = NULL; + TagRow* _tmp10_; TagRow* _tmp11_; - TagRow* _tmp12_; - sqlite3_stmt* _tmp13_; - gint64 _tmp14_; - TagRow* _tmp15_; - sqlite3_stmt* _tmp16_; - const gchar* _tmp17_; - gchar* _tmp18_; - TagRow* _tmp19_; - sqlite3_stmt* _tmp20_; - const gchar* _tmp21_; - GeeSet* _tmp22_; - TagRow* _tmp23_; - sqlite3_stmt* _tmp24_; - gint64 _tmp25_; - GeeList* _tmp26_; - TagRow* _tmp27_; + sqlite3_stmt* _tmp12_; + TagRow* _tmp13_; + sqlite3_stmt* _tmp14_; + const gchar* _tmp15_; + gchar* _tmp16_; + TagRow* _tmp17_; + sqlite3_stmt* _tmp18_; + const gchar* _tmp19_; + GeeSet* _tmp20_; + TagRow* _tmp21_; + sqlite3_stmt* _tmp22_; + GeeList* _tmp23_; + TagRow* _tmp24_; #line 167 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (!_tmp5_) { -#line 1655 "TagTable.c" +#line 1726 "TagTable.c" } #line 167 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp5_ = FALSE; #line 168 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp6_ = stmt; #line 168 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp7_ = sqlite3_step (_tmp6_); -#line 168 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp7_; + res = sqlite3_step (_tmp6_); #line 169 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp8_ = res; + _tmp7_ = res; #line 169 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp8_ == SQLITE_DONE) { + if (_tmp7_ == SQLITE_DONE) { #line 170 "/home/jens/Source/shotwell/src/db/TagTable.vala" break; -#line 1671 "TagTable.c" +#line 1740 "TagTable.c" } else { - gint _tmp9_; + gint _tmp8_; #line 171 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp9_ = res; + _tmp8_ = res; #line 171 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp9_ != SQLITE_ROW) { -#line 1678 "TagTable.c" - gint _tmp10_; + if (_tmp8_ != SQLITE_ROW) { +#line 1747 "TagTable.c" + gint _tmp9_; #line 172 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp10_ = res; + _tmp9_ = res; #line 172 "/home/jens/Source/shotwell/src/db/TagTable.vala" - database_table_throw_error ("TagTable.get_all_rows", _tmp10_, &_inner_error_); + database_table_throw_error ("TagTable.get_all_rows", _tmp9_, &_inner_error_); #line 172 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 172 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -1694,7 +1763,7 @@ GeeList* tag_table_get_all_rows (TagTable* self, GError** error) { _sqlite3_finalize0 (stmt); #line 172 "/home/jens/Source/shotwell/src/db/TagTable.vala" return NULL; -#line 1696 "TagTable.c" +#line 1765 "TagTable.c" } else { #line 172 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_object_unref0 (rows); @@ -1706,64 +1775,60 @@ GeeList* tag_table_get_all_rows (TagTable* self, GError** error) { g_clear_error (&_inner_error_); #line 172 "/home/jens/Source/shotwell/src/db/TagTable.vala" return NULL; -#line 1708 "TagTable.c" +#line 1777 "TagTable.c" } } } } #line 175 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp11_ = tag_row_new (); + _tmp10_ = tag_row_new (); #line 175 "/home/jens/Source/shotwell/src/db/TagTable.vala" - row = _tmp11_; + row = _tmp10_; #line 176 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp12_ = row; + _tmp11_ = row; #line 176 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp13_ = stmt; + _tmp12_ = stmt; #line 176 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp14_ = sqlite3_column_int64 (_tmp13_, 0); -#line 176 "/home/jens/Source/shotwell/src/db/TagTable.vala" - tag_id_init (&_tmp12_->tag_id, _tmp14_); + tag_id_init (&_tmp11_->tag_id, sqlite3_column_int64 (_tmp12_, 0)); #line 177 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp15_ = row; + _tmp13_ = row; #line 177 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp16_ = stmt; + _tmp14_ = stmt; #line 177 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp17_ = sqlite3_column_text (_tmp16_, 1); + _tmp15_ = sqlite3_column_text (_tmp14_, 1); #line 177 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp18_ = g_strdup (_tmp17_); + _tmp16_ = g_strdup (_tmp15_); #line 177 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _g_free0 (_tmp15_->name); + _g_free0 (_tmp13_->name); #line 177 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp15_->name = _tmp18_; + _tmp13_->name = _tmp16_; #line 178 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp19_ = row; + _tmp17_ = row; #line 178 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp20_ = stmt; + _tmp18_ = stmt; #line 178 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp21_ = sqlite3_column_text (_tmp20_, 2); + _tmp19_ = sqlite3_column_text (_tmp18_, 2); #line 178 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp22_ = tag_table_unserialize_source_ids (self, _tmp21_); + _tmp20_ = tag_table_unserialize_source_ids (self, _tmp19_); #line 178 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _g_object_unref0 (_tmp19_->source_id_list); + _g_object_unref0 (_tmp17_->source_id_list); #line 178 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp19_->source_id_list = _tmp22_; -#line 179 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp23_ = row; + _tmp17_->source_id_list = _tmp20_; #line 179 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp24_ = stmt; + _tmp21_ = row; #line 179 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp25_ = sqlite3_column_int64 (_tmp24_, 3); + _tmp22_ = stmt; #line 179 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp23_->time_created = (time_t) _tmp25_; + _tmp21_->time_created = (time_t) sqlite3_column_int64 (_tmp22_, 3); #line 181 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp26_ = rows; + _tmp23_ = rows; #line 181 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp27_ = row; + _tmp24_ = row; #line 181 "/home/jens/Source/shotwell/src/db/TagTable.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_COLLECTION, GeeCollection), _tmp27_); + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, GEE_TYPE_COLLECTION, GeeCollection), _tmp24_); #line 167 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tag_row_unref0 (row); -#line 1765 "TagTable.c" +#line 1830 "TagTable.c" } } #line 184 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -1772,14 +1837,18 @@ GeeList* tag_table_get_all_rows (TagTable* self, GError** error) { _sqlite3_finalize0 (stmt); #line 184 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 1774 "TagTable.c" +#line 1839 "TagTable.c" } -void tag_table_rename (TagTable* self, TagID* tag_id, const gchar* new_name, GError** error) { +void +tag_table_rename (TagTable* self, + TagID* tag_id, + const gchar* new_name, + GError** error) +{ TagID _tmp0_; gint64 _tmp1_; - const gchar* _tmp2_; GError * _inner_error_ = NULL; #line 187 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_if_fail (IS_TAG_TABLE (self)); @@ -1792,9 +1861,7 @@ void tag_table_rename (TagTable* self, TagID* tag_id, const gchar* new_name, GEr #line 188 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp1_ = _tmp0_.id; #line 188 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp2_ = new_name; -#line 188 "/home/jens/Source/shotwell/src/db/TagTable.vala" - database_table_update_text_by_id_2 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp1_, "name", _tmp2_, &_inner_error_); + database_table_update_text_by_id_2 (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_TABLE, DatabaseTable), _tmp1_, "name", new_name, &_inner_error_); #line 188 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 188 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -1803,7 +1870,7 @@ void tag_table_rename (TagTable* self, TagID* tag_id, const gchar* new_name, GEr g_propagate_error (error, _inner_error_); #line 188 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1805 "TagTable.c" +#line 1872 "TagTable.c" } else { #line 188 "/home/jens/Source/shotwell/src/db/TagTable.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); @@ -1811,13 +1878,18 @@ void tag_table_rename (TagTable* self, TagID* tag_id, const gchar* new_name, GEr g_clear_error (&_inner_error_); #line 188 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1813 "TagTable.c" +#line 1880 "TagTable.c" } } } -void tag_table_set_tagged_sources (TagTable* self, TagID* tag_id, GeeCollection* source_ids, GError** error) { +void +tag_table_set_tagged_sources (TagTable* self, + TagID* tag_id, + GeeCollection* source_ids, + GError** error) +{ sqlite3_stmt* stmt = NULL; gint res = 0; sqlite3* _tmp0_; @@ -1825,19 +1897,15 @@ void tag_table_set_tagged_sources (TagTable* self, TagID* tag_id, GeeCollection* gint _tmp2_; gint _tmp3_; sqlite3_stmt* _tmp4_; - GeeCollection* _tmp5_; - gchar* _tmp6_; - GDestroyNotify _tmp7_; - gint _tmp8_; - gint _tmp9_; - sqlite3_stmt* _tmp10_; - TagID _tmp11_; - gint64 _tmp12_; + gchar* _tmp5_; + GDestroyNotify _tmp6_; + gint _tmp7_; + sqlite3_stmt* _tmp8_; + TagID _tmp9_; + gint64 _tmp10_; + gint _tmp11_; + sqlite3_stmt* _tmp12_; gint _tmp13_; - gint _tmp14_; - sqlite3_stmt* _tmp15_; - gint _tmp16_; - gint _tmp17_; GError * _inner_error_ = NULL; #line 191 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_if_fail (IS_TAG_TABLE (self)); @@ -1862,49 +1930,41 @@ void tag_table_set_tagged_sources (TagTable* self, TagID* tag_id, GeeCollection* #line 196 "/home/jens/Source/shotwell/src/db/TagTable.vala" _tmp4_ = stmt; #line 196 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp5_ = source_ids; -#line 196 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp6_ = tag_table_serialize_source_ids (self, _tmp5_); -#line 196 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp7_ = g_free; + _tmp5_ = tag_table_serialize_source_ids (self, source_ids); #line 196 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp8_ = sqlite3_bind_text (_tmp4_, 1, _tmp6_, -1, _tmp7_); + _tmp6_ = g_free; #line 196 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp8_; + res = sqlite3_bind_text (_tmp4_, 1, _tmp5_, -1, _tmp6_); #line 197 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp9_ = res; + _tmp7_ = res; #line 197 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _vala_assert (_tmp9_ == SQLITE_OK, "res == Sqlite.OK"); -#line 198 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp10_ = stmt; + _vala_assert (_tmp7_ == SQLITE_OK, "res == Sqlite.OK"); #line 198 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp11_ = *tag_id; + _tmp8_ = stmt; #line 198 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp12_ = _tmp11_.id; + _tmp9_ = *tag_id; #line 198 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp13_ = sqlite3_bind_int64 (_tmp10_, 2, _tmp12_); + _tmp10_ = _tmp9_.id; #line 198 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp13_; + res = sqlite3_bind_int64 (_tmp8_, 2, _tmp10_); #line 199 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp14_ = res; + _tmp11_ = res; #line 199 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _vala_assert (_tmp14_ == SQLITE_OK, "res == Sqlite.OK"); + _vala_assert (_tmp11_ == SQLITE_OK, "res == Sqlite.OK"); #line 201 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp15_ = stmt; + _tmp12_ = stmt; #line 201 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp16_ = sqlite3_step (_tmp15_); -#line 201 "/home/jens/Source/shotwell/src/db/TagTable.vala" - res = _tmp16_; + res = sqlite3_step (_tmp12_); #line 202 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp17_ = res; + _tmp13_ = res; #line 202 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp17_ != SQLITE_DONE) { -#line 1901 "TagTable.c" - gint _tmp18_; + if (_tmp13_ != SQLITE_DONE) { +#line 1961 "TagTable.c" + gint _tmp14_; #line 203 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp18_ = res; + _tmp14_ = res; #line 203 "/home/jens/Source/shotwell/src/db/TagTable.vala" - database_table_throw_error ("TagTable.set_tagged_photos", _tmp18_, &_inner_error_); + database_table_throw_error ("TagTable.set_tagged_photos", _tmp14_, &_inner_error_); #line 203 "/home/jens/Source/shotwell/src/db/TagTable.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 203 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -1915,7 +1975,7 @@ void tag_table_set_tagged_sources (TagTable* self, TagID* tag_id, GeeCollection* _sqlite3_finalize0 (stmt); #line 203 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1917 "TagTable.c" +#line 1977 "TagTable.c" } else { #line 203 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); @@ -1925,163 +1985,158 @@ void tag_table_set_tagged_sources (TagTable* self, TagID* tag_id, GeeCollection* g_clear_error (&_inner_error_); #line 203 "/home/jens/Source/shotwell/src/db/TagTable.vala" return; -#line 1927 "TagTable.c" +#line 1987 "TagTable.c" } } } #line 191 "/home/jens/Source/shotwell/src/db/TagTable.vala" _sqlite3_finalize0 (stmt); -#line 1933 "TagTable.c" +#line 1993 "TagTable.c" } -static gchar* tag_table_serialize_source_ids (TagTable* self, GeeCollection* source_ids) { +static gchar* +tag_table_serialize_source_ids (TagTable* self, + GeeCollection* source_ids) +{ gchar* result = NULL; - GeeCollection* _tmp0_; GString* _result_ = NULL; - GString* _tmp1_; - const gchar* _tmp11_ = NULL; - GString* _tmp12_; - gssize _tmp13_; - gchar* _tmp16_; + GString* _tmp0_; + const gchar* _tmp8_ = NULL; + GString* _tmp9_; + gssize _tmp10_; + gchar* _tmp13_; #line 206 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_val_if_fail (IS_TAG_TABLE (self), NULL); #line 206 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_val_if_fail ((source_ids == NULL) || GEE_IS_COLLECTION (source_ids), NULL); #line 207 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp0_ = source_ids; -#line 207 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp0_ == NULL) { + if (source_ids == NULL) { #line 208 "/home/jens/Source/shotwell/src/db/TagTable.vala" result = NULL; #line 208 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 1958 "TagTable.c" +#line 2018 "TagTable.c" } #line 210 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp1_ = g_string_new (""); + _tmp0_ = g_string_new (""); #line 210 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _result_ = _tmp1_; -#line 1964 "TagTable.c" + _result_ = _tmp0_; +#line 2024 "TagTable.c" { GeeIterator* _source_id_it = NULL; - GeeCollection* _tmp2_; - GeeIterator* _tmp3_; + GeeIterator* _tmp1_; #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp2_ = source_ids; + _tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (source_ids, GEE_TYPE_ITERABLE, GeeIterable)); #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable)); -#line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _source_id_it = _tmp3_; + _source_id_it = _tmp1_; #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" while (TRUE) { -#line 1977 "TagTable.c" - GeeIterator* _tmp4_; - gboolean _tmp5_; +#line 2034 "TagTable.c" + GeeIterator* _tmp2_; gchar* source_id = NULL; - GeeIterator* _tmp6_; - gpointer _tmp7_; - GString* _tmp8_; - const gchar* _tmp9_; - GString* _tmp10_; + GeeIterator* _tmp3_; + gpointer _tmp4_; + GString* _tmp5_; + const gchar* _tmp6_; + GString* _tmp7_; #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp4_ = _source_id_it; + _tmp2_ = _source_id_it; #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp5_ = gee_iterator_next (_tmp4_); -#line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (!_tmp5_) { + if (!gee_iterator_next (_tmp2_)) { #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" break; -#line 1994 "TagTable.c" +#line 2048 "TagTable.c" } #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp6_ = _source_id_it; + _tmp3_ = _source_id_it; #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp7_ = gee_iterator_get (_tmp6_); + _tmp4_ = gee_iterator_get (_tmp3_); #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" - source_id = (gchar*) _tmp7_; + source_id = (gchar*) _tmp4_; #line 213 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp8_ = _result_; + _tmp5_ = _result_; #line 213 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp9_ = source_id; + _tmp6_ = source_id; #line 213 "/home/jens/Source/shotwell/src/db/TagTable.vala" - g_string_append (_tmp8_, _tmp9_); + g_string_append (_tmp5_, _tmp6_); #line 214 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp10_ = _result_; + _tmp7_ = _result_; #line 214 "/home/jens/Source/shotwell/src/db/TagTable.vala" - g_string_append (_tmp10_, ","); + g_string_append (_tmp7_, ","); #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_free0 (source_id); -#line 2014 "TagTable.c" +#line 2068 "TagTable.c" } #line 212 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_object_unref0 (_source_id_it); -#line 2018 "TagTable.c" +#line 2072 "TagTable.c" } #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp12_ = _result_; + _tmp9_ = _result_; #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp13_ = _tmp12_->len; + _tmp10_ = _tmp9_->len; #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp13_ != ((gssize) 0)) { -#line 2026 "TagTable.c" - GString* _tmp14_; - const gchar* _tmp15_; + if (_tmp10_ != ((gssize) 0)) { +#line 2080 "TagTable.c" + GString* _tmp11_; + const gchar* _tmp12_; #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp14_ = _result_; + _tmp11_ = _result_; #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp15_ = _tmp14_->str; + _tmp12_ = _tmp11_->str; #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp11_ = _tmp15_; -#line 2035 "TagTable.c" + _tmp8_ = _tmp12_; +#line 2089 "TagTable.c" } else { #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp11_ = NULL; -#line 2039 "TagTable.c" + _tmp8_ = NULL; +#line 2093 "TagTable.c" } #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp16_ = g_strdup (_tmp11_); + _tmp13_ = g_strdup (_tmp8_); #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" - result = _tmp16_; + result = _tmp13_; #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_string_free0 (_result_); #line 217 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 2049 "TagTable.c" +#line 2103 "TagTable.c" } -static gchar string_get (const gchar* self, glong index) { +static gchar +string_get (const gchar* self, + glong index) +{ gchar result = '\0'; - glong _tmp0_; - gchar _tmp1_; -#line 1110 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" + gchar _tmp0_; +#line 1124 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, '\0'); -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp0_ = index; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - _tmp1_ = ((gchar*) self)[_tmp0_]; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" - result = _tmp1_; -#line 1111 "/usr/share/vala-0.36/vapi/glib-2.0.vapi" +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + _tmp0_ = ((gchar*) self)[index]; +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" + result = _tmp0_; +#line 1125 "/usr/share/vala-0.40/vapi/glib-2.0.vapi" return result; -#line 2067 "TagTable.c" +#line 2121 "TagTable.c" } -static GeeSet* tag_table_unserialize_source_ids (TagTable* self, const gchar* text_list) { +static GeeSet* +tag_table_unserialize_source_ids (TagTable* self, + const gchar* text_list) +{ GeeSet* result = NULL; GeeSet* _result_ = NULL; GeeHashSet* _tmp0_; - const gchar* _tmp1_; gchar** split = NULL; - const gchar* _tmp2_; - gchar** _tmp3_; - gchar** _tmp4_; + gchar** _tmp1_; + gchar** _tmp2_; gint split_length1; gint _split_size_; - gchar** _tmp5_; - gint _tmp5__length1; + gchar** _tmp3_; + gint _tmp3__length1; #line 220 "/home/jens/Source/shotwell/src/db/TagTable.vala" g_return_val_if_fail (IS_TAG_TABLE (self), NULL); #line 221 "/home/jens/Source/shotwell/src/db/TagTable.vala" @@ -2089,126 +2144,104 @@ static GeeSet* tag_table_unserialize_source_ids (TagTable* self, const gchar* te #line 221 "/home/jens/Source/shotwell/src/db/TagTable.vala" _result_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_SET, GeeSet); #line 223 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp1_ = text_list; -#line 223 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp1_ == NULL) { + if (text_list == NULL) { #line 224 "/home/jens/Source/shotwell/src/db/TagTable.vala" result = _result_; #line 224 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 2098 "TagTable.c" +#line 2151 "TagTable.c" } #line 226 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp2_ = text_list; -#line 226 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp4_ = _tmp3_ = g_strsplit (_tmp2_, ",", 0); + _tmp2_ = _tmp1_ = g_strsplit (text_list, ",", 0); #line 226 "/home/jens/Source/shotwell/src/db/TagTable.vala" - split = _tmp4_; + split = _tmp2_; #line 226 "/home/jens/Source/shotwell/src/db/TagTable.vala" - split_length1 = _vala_array_length (_tmp3_); + split_length1 = _vala_array_length (_tmp1_); #line 226 "/home/jens/Source/shotwell/src/db/TagTable.vala" _split_size_ = split_length1; #line 227 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp5_ = split; + _tmp3_ = split; #line 227 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp5__length1 = split_length1; -#line 2114 "TagTable.c" + _tmp3__length1 = split_length1; +#line 2165 "TagTable.c" { gchar** token_collection = NULL; gint token_collection_length1 = 0; gint _token_collection_size_ = 0; gint token_it = 0; #line 227 "/home/jens/Source/shotwell/src/db/TagTable.vala" - token_collection = _tmp5_; + token_collection = _tmp3_; #line 227 "/home/jens/Source/shotwell/src/db/TagTable.vala" - token_collection_length1 = _tmp5__length1; + token_collection_length1 = _tmp3__length1; #line 227 "/home/jens/Source/shotwell/src/db/TagTable.vala" - for (token_it = 0; token_it < _tmp5__length1; token_it = token_it + 1) { -#line 2126 "TagTable.c" - gchar* _tmp6_; + for (token_it = 0; token_it < _tmp3__length1; token_it = token_it + 1) { +#line 2177 "TagTable.c" + gchar* _tmp4_; gchar* token = NULL; #line 227 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp6_ = g_strdup (token_collection[token_it]); + _tmp4_ = g_strdup (token_collection[token_it]); #line 227 "/home/jens/Source/shotwell/src/db/TagTable.vala" - token = _tmp6_; -#line 2133 "TagTable.c" + token = _tmp4_; +#line 2184 "TagTable.c" { - const gchar* _tmp7_; - gboolean _tmp8_; - const gchar* _tmp9_; - gchar _tmp10_; - gboolean _tmp11_; -#line 228 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp7_ = token; + const gchar* _tmp5_; + const gchar* _tmp6_; #line 228 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp8_ = is_string_empty (_tmp7_); + _tmp5_ = token; #line 228 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp8_) { + if (is_string_empty (_tmp5_)) { #line 229 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_free0 (token); #line 229 "/home/jens/Source/shotwell/src/db/TagTable.vala" continue; -#line 2150 "TagTable.c" +#line 2196 "TagTable.c" } #line 236 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp9_ = token; -#line 236 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp10_ = string_get (_tmp9_, (glong) 0); + _tmp6_ = token; #line 236 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp11_ = g_ascii_isdigit (_tmp10_); -#line 236 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp11_) { -#line 2160 "TagTable.c" - GeeSet* _tmp12_; - const gchar* _tmp13_; - gint64 _tmp14_; - PhotoID _tmp15_ = {0}; - gchar* _tmp16_; - gchar* _tmp17_; -#line 238 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp12_ = _result_; + if (g_ascii_isdigit (string_get (_tmp6_, (glong) 0))) { +#line 2202 "TagTable.c" + GeeSet* _tmp7_; + const gchar* _tmp8_; + PhotoID _tmp9_ = {0}; + gchar* _tmp10_; + gchar* _tmp11_; #line 238 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp13_ = token; + _tmp7_ = _result_; #line 238 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp14_ = parse_int64 (_tmp13_, 10); + _tmp8_ = token; #line 238 "/home/jens/Source/shotwell/src/db/TagTable.vala" - photo_id_init (&_tmp15_, _tmp14_); + photo_id_init (&_tmp9_, parse_int64 (_tmp8_, 10)); #line 238 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp16_ = photo_id_upgrade_photo_id_to_source_id (&_tmp15_); + _tmp10_ = photo_id_upgrade_photo_id_to_source_id (&_tmp9_); #line 238 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp17_ = _tmp16_; + _tmp11_ = _tmp10_; #line 238 "/home/jens/Source/shotwell/src/db/TagTable.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection), _tmp17_); + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection), _tmp11_); #line 238 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _g_free0 (_tmp17_); -#line 2183 "TagTable.c" + _g_free0 (_tmp11_); +#line 2222 "TagTable.c" } else { - const gchar* _tmp18_; - gchar _tmp19_; - gboolean _tmp20_; -#line 239 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp18_ = token; + const gchar* _tmp12_; #line 239 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp19_ = string_get (_tmp18_, (glong) 0); + _tmp12_ = token; #line 239 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp20_ = g_ascii_isalpha (_tmp19_); -#line 239 "/home/jens/Source/shotwell/src/db/TagTable.vala" - if (_tmp20_) { -#line 2196 "TagTable.c" - GeeSet* _tmp21_; - const gchar* _tmp22_; + if (g_ascii_isalpha (string_get (_tmp12_, (glong) 0))) { +#line 2229 "TagTable.c" + GeeSet* _tmp13_; + const gchar* _tmp14_; #line 241 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp21_ = _result_; + _tmp13_ = _result_; #line 241 "/home/jens/Source/shotwell/src/db/TagTable.vala" - _tmp22_ = token; + _tmp14_ = token; #line 241 "/home/jens/Source/shotwell/src/db/TagTable.vala" - gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_COLLECTION, GeeCollection), _tmp22_); -#line 2205 "TagTable.c" + gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection), _tmp14_); +#line 2238 "TagTable.c" } } #line 227 "/home/jens/Source/shotwell/src/db/TagTable.vala" _g_free0 (token); -#line 2210 "TagTable.c" +#line 2243 "TagTable.c" } } } @@ -2218,34 +2251,42 @@ static GeeSet* tag_table_unserialize_source_ids (TagTable* self, const gchar* te split = (_vala_array_free (split, split_length1, (GDestroyNotify) g_free), NULL); #line 245 "/home/jens/Source/shotwell/src/db/TagTable.vala" return result; -#line 2220 "TagTable.c" +#line 2253 "TagTable.c" } -static void tag_table_class_init (TagTableClass * klass) { +static void +tag_table_class_init (TagTableClass * klass) +{ #line 32 "/home/jens/Source/shotwell/src/db/TagTable.vala" tag_table_parent_class = g_type_class_peek_parent (klass); #line 32 "/home/jens/Source/shotwell/src/db/TagTable.vala" ((DatabaseTableClass *) klass)->finalize = tag_table_finalize; -#line 2229 "TagTable.c" +#line 2264 "TagTable.c" } -static void tag_table_instance_init (TagTable * self) { +static void +tag_table_instance_init (TagTable * self) +{ } -static void tag_table_finalize (DatabaseTable * obj) { +static void +tag_table_finalize (DatabaseTable * obj) +{ TagTable * self; #line 32 "/home/jens/Source/shotwell/src/db/TagTable.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TAG_TABLE, TagTable); #line 32 "/home/jens/Source/shotwell/src/db/TagTable.vala" DATABASE_TABLE_CLASS (tag_table_parent_class)->finalize (obj); -#line 2243 "TagTable.c" +#line 2282 "TagTable.c" } -GType tag_table_get_type (void) { +GType +tag_table_get_type (void) +{ static volatile gsize tag_table_type_id__volatile = 0; if (g_once_init_enter (&tag_table_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (TagTableClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tag_table_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TagTable), 0, (GInstanceInitFunc) tag_table_instance_init, NULL }; @@ -2257,7 +2298,11 @@ GType tag_table_get_type (void) { } -static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) { +static void +_vala_array_destroy (gpointer array, + gint array_length, + GDestroyNotify destroy_func) +{ if ((array != NULL) && (destroy_func != NULL)) { int i; for (i = 0; i < array_length; i = i + 1) { @@ -2269,13 +2314,19 @@ static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNoti } -static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) { +static void +_vala_array_free (gpointer array, + gint array_length, + GDestroyNotify destroy_func) +{ _vala_array_destroy (array, array_length, destroy_func); g_free (array); } -static gint _vala_array_length (gpointer array) { +static gint +_vala_array_length (gpointer array) +{ int length; length = 0; if (array) { -- cgit v1.2.3