diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-01-19 09:43:17 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-01-19 09:43:17 +0100 |
commit | d8006d3987034f51ee84f034fb5c9cb33195600d (patch) | |
tree | 6617fbc43905eb346b305fbf4b83968c3ed22721 /src/page.c | |
parent | d09fb0180e126967c94a13b6414694dfb9be313c (diff) |
Imported Upstream version 3.15.4upstream/3.15.4
Diffstat (limited to 'src/page.c')
-rw-r--r-- | src/page.c | 142 |
1 files changed, 73 insertions, 69 deletions
@@ -1,4 +1,4 @@ -/* page.c generated by valac 0.24.0, the Vala compiler +/* page.c generated by valac 0.26.1, the Vala compiler * generated from page.vala, do not modify */ /* @@ -2711,47 +2711,47 @@ static gchar* string_to_utf8 (const gchar* self, int* result_length1) { gint _tmp6_ = 0; gchar* _tmp7_ = NULL; gint _tmp7__length1 = 0; -#line 1303 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1307 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" g_return_val_if_fail (self != NULL, NULL); -#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp0_ = strlen (self); -#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp1_ = _tmp0_; -#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp2_ = g_new0 (gchar, _tmp1_ + 1); -#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _result_ = _tmp2_; -#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _result__length1 = _tmp1_ + 1; -#line 1304 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1308 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" __result__size_ = _result__length1; -#line 1305 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1309 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp3_ = _result__length1; -#line 1305 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1309 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _result__length1 = _tmp3_ - 1; -#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp4_ = _result_; -#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp4__length1 = _result__length1; -#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp5_ = strlen (self); -#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp6_ = _tmp5_; -#line 1306 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1310 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" memcpy (_tmp4_, self, (gsize) _tmp6_); -#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp7_ = _result_; -#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" _tmp7__length1 = _result__length1; -#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" if (result_length1) { -#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" *result_length1 = _tmp7__length1; #line 2751 "page.c" } -#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" result = _tmp7_; -#line 1307 "/usr/share/vala-0.24/vapi/glib-2.0.vapi" +#line 1311 "/usr/share/vala-0.26/vapi/glib-2.0.vapi" return result; #line 2757 "page.c" } @@ -2785,7 +2785,7 @@ static gchar* page_get_icc_data_encoded (Page* self, const gchar* icc_profile_fi #line 633 "/home/bob/bzr/simple-scan/trunk/src/page.vala" contents = _tmp1_; #line 633 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - if (_inner_error_ != NULL) { + if (G_UNLIKELY (_inner_error_ != NULL)) { #line 2790 "page.c" goto __catch3_g_error; } @@ -2818,7 +2818,7 @@ static gchar* page_get_icc_data_encoded (Page* self, const gchar* icc_profile_fi } __finally3: #line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - if (_inner_error_ != NULL) { + if (G_UNLIKELY (_inner_error_ != NULL)) { #line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _g_free0 (contents); #line 631 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -2932,7 +2932,7 @@ void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError #line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala" stream = _tmp1_; #line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - if (_inner_error_ != NULL) { + if (G_UNLIKELY (_inner_error_ != NULL)) { #line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_propagate_error (error, _inner_error_); #line 655 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -3099,7 +3099,7 @@ void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError #line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_save (_tmp28_, _tmp29_, "jpeg", _tmp30_, _tmp30__length1, _tmp31_, _tmp31__length1, &_inner_error_); #line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - if (_inner_error_ != NULL) { + if (G_UNLIKELY (_inner_error_ != NULL)) { #line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_propagate_error (error, _inner_error_); #line 669 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -3245,7 +3245,7 @@ void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError #line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_save (_tmp49_, _tmp50_, "png", _tmp51_, _tmp51__length1, _tmp52_, _tmp52__length1, &_inner_error_); #line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - if (_inner_error_ != NULL) { + if (G_UNLIKELY (_inner_error_ != NULL)) { #line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_propagate_error (error, _inner_error_); #line 677 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -3401,7 +3401,7 @@ void page_save (Page* self, const gchar* type, gint quality, GFile* file, GError #line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_save (_tmp72_, _tmp73_, "tiff", _tmp74_, _tmp74__length1, _tmp75_, _tmp75__length1, &_inner_error_); #line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - if (_inner_error_ != NULL) { + if (G_UNLIKELY (_inner_error_ != NULL)) { #line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_propagate_error (error, _inner_error_); #line 685 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -4449,7 +4449,7 @@ static void page_class_init (PageClass * klass) { #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" page_parent_class = g_type_class_peek_parent (klass); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - PAGE_CLASS (klass)->finalize = page_finalize; + ((PageClass *) klass)->finalize = page_finalize; #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_type_class_add_private (klass, sizeof (PagePrivate)); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" @@ -4481,13 +4481,15 @@ static void page_finalize (Page* obj) { Page * self; #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PAGE, Page); +#line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + g_signal_handlers_destroy (self); #line 59 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _g_free0 (self->priv->_color_profile); #line 74 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->priv->pixels = (g_free (self->priv->pixels), NULL); #line 153 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _g_free0 (self->priv->_crop_name); -#line 4491 "page.c" +#line 4493 "page.c" } @@ -4512,7 +4514,7 @@ gpointer page_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return instance; -#line 4516 "page.c" +#line 4518 "page.c" } @@ -4525,7 +4527,7 @@ void page_unref (gpointer instance) { PAGE_GET_CLASS (self)->finalize (self); #line 20 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_type_free_instance ((GTypeInstance *) self); -#line 4529 "page.c" +#line 4531 "page.c" } } @@ -4548,14 +4550,14 @@ PixbufWriter* pixbuf_writer_construct (GType object_type, GFileOutputStream* str self->stream = _tmp1_; #line 696 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return self; -#line 4552 "page.c" +#line 4554 "page.c" } PixbufWriter* pixbuf_writer_new (GFileOutputStream* stream) { #line 696 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return pixbuf_writer_construct (TYPE_PIXBUF_WRITER, stream); -#line 4559 "page.c" +#line 4561 "page.c" } @@ -4564,7 +4566,7 @@ static gboolean _pixbuf_writer_write_pixbuf_data_gdk_pixbuf_save_func (guint8* b result = pixbuf_writer_write_pixbuf_data ((PixbufWriter*) self, buf, buf_length1, error); #line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4568 "page.c" +#line 4570 "page.c" } @@ -4597,12 +4599,12 @@ void pixbuf_writer_save (PixbufWriter* self, GdkPixbuf* image, const gchar* type #line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala" gdk_pixbuf_save_to_callbackv (_tmp0_, _pixbuf_writer_write_pixbuf_data_gdk_pixbuf_save_func, self, _tmp1_, _tmp2_, _tmp3_, &_inner_error_); #line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - if (_inner_error_ != NULL) { + if (G_UNLIKELY (_inner_error_ != NULL)) { #line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_propagate_error (error, _inner_error_); #line 703 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return; -#line 4606 "page.c" +#line 4608 "page.c" } } @@ -4624,25 +4626,25 @@ static gboolean pixbuf_writer_write_pixbuf_data (PixbufWriter* self, guint8* buf #line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_output_stream_write_all ((GOutputStream*) _tmp0_, _tmp1_, (gsize) _tmp1__length1, NULL, NULL, &_inner_error_); #line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - if (_inner_error_ != NULL) { + if (G_UNLIKELY (_inner_error_ != NULL)) { #line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_propagate_error (error, _inner_error_); #line 708 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return FALSE; -#line 4633 "page.c" +#line 4635 "page.c" } #line 709 "/home/bob/bzr/simple-scan/trunk/src/page.vala" result = TRUE; #line 709 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return result; -#line 4639 "page.c" +#line 4641 "page.c" } static void value_pixbuf_writer_init (GValue* value) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4646 "page.c" +#line 4648 "page.c" } @@ -4651,7 +4653,7 @@ static void value_pixbuf_writer_free_value (GValue* value) { if (value->data[0].v_pointer) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_unref (value->data[0].v_pointer); -#line 4655 "page.c" +#line 4657 "page.c" } } @@ -4661,11 +4663,11 @@ static void value_pixbuf_writer_copy_value (const GValue* src_value, GValue* des if (src_value->data[0].v_pointer) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" dest_value->data[0].v_pointer = pixbuf_writer_ref (src_value->data[0].v_pointer); -#line 4665 "page.c" +#line 4667 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" dest_value->data[0].v_pointer = NULL; -#line 4669 "page.c" +#line 4671 "page.c" } } @@ -4673,37 +4675,37 @@ static void value_pixbuf_writer_copy_value (const GValue* src_value, GValue* des static gpointer value_pixbuf_writer_peek_pointer (const GValue* value) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return value->data[0].v_pointer; -#line 4677 "page.c" +#line 4679 "page.c" } static gchar* value_pixbuf_writer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (collect_values[0].v_pointer) { -#line 4684 "page.c" +#line 4686 "page.c" PixbufWriter* object; object = collect_values[0].v_pointer; #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (object->parent_instance.g_class == NULL) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); -#line 4691 "page.c" +#line 4693 "page.c" } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.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 4695 "page.c" +#line 4697 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = pixbuf_writer_ref (object); -#line 4699 "page.c" +#line 4701 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4703 "page.c" +#line 4705 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return NULL; -#line 4707 "page.c" +#line 4709 "page.c" } @@ -4714,25 +4716,25 @@ static gchar* value_pixbuf_writer_lcopy_value (const GValue* value, guint n_coll if (!object_p) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); -#line 4718 "page.c" +#line 4720 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (!value->data[0].v_pointer) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = NULL; -#line 4724 "page.c" +#line 4726 "page.c" } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = value->data[0].v_pointer; -#line 4728 "page.c" +#line 4730 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" *object_p = pixbuf_writer_ref (value->data[0].v_pointer); -#line 4732 "page.c" +#line 4734 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return NULL; -#line 4736 "page.c" +#line 4738 "page.c" } @@ -4746,7 +4748,7 @@ GParamSpec* param_spec_pixbuf_writer (const gchar* name, const gchar* nick, cons G_PARAM_SPEC (spec)->value_type = object_type; #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return G_PARAM_SPEC (spec); -#line 4750 "page.c" +#line 4752 "page.c" } @@ -4755,7 +4757,7 @@ gpointer value_get_pixbuf_writer (const GValue* value) { g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_PIXBUF_WRITER), NULL); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return value->data[0].v_pointer; -#line 4759 "page.c" +#line 4761 "page.c" } @@ -4775,17 +4777,17 @@ void value_set_pixbuf_writer (GValue* value, gpointer v_object) { value->data[0].v_pointer = v_object; #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_ref (value->data[0].v_pointer); -#line 4779 "page.c" +#line 4781 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4783 "page.c" +#line 4785 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (old) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_unref (old); -#line 4789 "page.c" +#line 4791 "page.c" } } @@ -4804,17 +4806,17 @@ void value_take_pixbuf_writer (GValue* value, gpointer v_object) { g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = v_object; -#line 4808 "page.c" +#line 4810 "page.c" } else { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" value->data[0].v_pointer = NULL; -#line 4812 "page.c" +#line 4814 "page.c" } #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" if (old) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_unref (old); -#line 4818 "page.c" +#line 4820 "page.c" } } @@ -4823,15 +4825,15 @@ static void pixbuf_writer_class_init (PixbufWriterClass * klass) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" pixbuf_writer_parent_class = g_type_class_peek_parent (klass); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" - PIXBUF_WRITER_CLASS (klass)->finalize = pixbuf_writer_finalize; -#line 4828 "page.c" + ((PixbufWriterClass *) klass)->finalize = pixbuf_writer_finalize; +#line 4830 "page.c" } static void pixbuf_writer_instance_init (PixbufWriter * self) { #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self->ref_count = 1; -#line 4835 "page.c" +#line 4837 "page.c" } @@ -4839,9 +4841,11 @@ static void pixbuf_writer_finalize (PixbufWriter* obj) { PixbufWriter * self; #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_PIXBUF_WRITER, PixbufWriter); +#line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" + g_signal_handlers_destroy (self); #line 694 "/home/bob/bzr/simple-scan/trunk/src/page.vala" _g_object_unref0 (self->stream); -#line 4845 "page.c" +#line 4849 "page.c" } @@ -4866,7 +4870,7 @@ gpointer pixbuf_writer_ref (gpointer instance) { g_atomic_int_inc (&self->ref_count); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" return instance; -#line 4870 "page.c" +#line 4874 "page.c" } @@ -4879,7 +4883,7 @@ void pixbuf_writer_unref (gpointer instance) { PIXBUF_WRITER_GET_CLASS (self)->finalize (self); #line 692 "/home/bob/bzr/simple-scan/trunk/src/page.vala" g_type_free_instance ((GTypeInstance *) self); -#line 4883 "page.c" +#line 4887 "page.c" } } |