/* valagvariantmodule.c generated by valac, the Vala compiler * generated from valagvariantmodule.vala, do not modify */ /* valagvariantmodule.vala * * Copyright (C) 2010-2011 Jürg Billeter * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Author: * Jürg Billeter */ #include "valacodegen.h" #include #include #include #include #include #include #include #define VALA_GVARIANT_MODULE_TYPE_BASIC_TYPE_INFO (vala_gvariant_module_basic_type_info_get_type ()) typedef struct _ValaGVariantModuleBasicTypeInfo ValaGVariantModuleBasicTypeInfo; #define _g_free0(var) (var = (g_free (var), NULL)) #define _vala_ccode_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_ccode_node_unref (var), NULL))) #define _vala_code_node_unref0(var) ((var == NULL) ? NULL : (var = (vala_code_node_unref (var), NULL))) #define _vala_target_value_unref0(var) ((var == NULL) ? NULL : (var = (vala_target_value_unref (var), NULL))) #define _vala_iterable_unref0(var) ((var == NULL) ? NULL : (var = (vala_iterable_unref (var), NULL))) struct _ValaGVariantModulePrivate { gint next_variant_function_id; }; struct _ValaGVariantModuleBasicTypeInfo { const gchar* signature; const gchar* type_name; gboolean is_string; }; static gint ValaGVariantModule_private_offset; static gpointer vala_gvariant_module_parent_class = NULL; static GType vala_gvariant_module_basic_type_info_get_type (void) G_GNUC_CONST G_GNUC_UNUSED; static ValaGVariantModuleBasicTypeInfo* vala_gvariant_module_basic_type_info_dup (const ValaGVariantModuleBasicTypeInfo* self); static void vala_gvariant_module_basic_type_info_free (ValaGVariantModuleBasicTypeInfo* self); static gboolean vala_gvariant_module_is_string_marshalled_enum (ValaTypeSymbol* symbol); static gchar* vala_gvariant_module_get_dbus_value (ValaGVariantModule* self, ValaEnumValue* value, const gchar* default_value); static gboolean vala_gvariant_module_get_basic_type_info (ValaGVariantModule* self, const gchar* signature, ValaGVariantModuleBasicTypeInfo* basic_type); static void vala_gvariant_module_real_visit_enum (ValaCodeVisitor* base, ValaEnum* en); static gboolean vala_gvariant_module_real_generate_enum_declaration (ValaCCodeBaseModule* base, ValaEnum* en, ValaCCodeFile* decl_space); static void vala_gvariant_module_real_visit_cast_expression (ValaCodeVisitor* base, ValaCastExpression* expr); static ValaCCodeExpression* vala_gvariant_module_get_array_length (ValaGVariantModule* self, ValaCCodeExpression* expr, gint dim); static ValaCCodeExpression* vala_gvariant_module_generate_enum_value_from_string (ValaGVariantModule* self, ValaEnumValueType* type, ValaCCodeExpression* expr, ValaCCodeExpression* error_expr); static ValaCCodeExpression* vala_gvariant_module_deserialize_basic (ValaGVariantModule* self, ValaGVariantModuleBasicTypeInfo* basic_type, ValaCCodeExpression* variant_expr, gboolean transfer); static ValaCCodeExpression* vala_gvariant_module_deserialize_array (ValaGVariantModule* self, ValaArrayType* array_type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr); static ValaCCodeExpression* vala_gvariant_module_deserialize_buffer_array (ValaGVariantModule* self, ValaArrayType* array_type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr); static void vala_gvariant_module_deserialize_array_dim (ValaGVariantModule* self, ValaArrayType* array_type, gint dim, const gchar* temp_name, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr); static ValaCCodeExpression* vala_gvariant_module_deserialize_struct (ValaGVariantModule* self, ValaStruct* st, ValaCCodeExpression* variant_expr); static ValaCCodeExpression* vala_gvariant_module_deserialize_hash_table (ValaGVariantModule* self, ValaObjectType* type, ValaCCodeExpression* variant_expr); static ValaCCodeExpression* vala_gvariant_module_real_deserialize_expression (ValaCCodeBaseModule* base, ValaDataType* type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr, ValaCCodeExpression* error_expr, gboolean* may_fail); static ValaCCodeExpression* vala_gvariant_module_generate_enum_value_to_string (ValaGVariantModule* self, ValaEnumValueType* type, ValaCCodeExpression* expr); static ValaCCodeExpression* vala_gvariant_module_serialize_basic (ValaGVariantModule* self, ValaGVariantModuleBasicTypeInfo* basic_type, ValaCCodeExpression* expr); static ValaCCodeExpression* vala_gvariant_module_serialize_array (ValaGVariantModule* self, ValaArrayType* array_type, ValaCCodeExpression* array_expr); static ValaCCodeExpression* vala_gvariant_module_serialize_buffer_array (ValaGVariantModule* self, ValaArrayType* array_type, ValaCCodeExpression* array_expr); static ValaCCodeExpression* vala_gvariant_module_serialize_array_dim (ValaGVariantModule* self, ValaArrayType* array_type, gint dim, ValaCCodeExpression* array_expr, ValaCCodeExpression* array_iter_expr); static ValaCCodeExpression* vala_gvariant_module_serialize_struct (ValaGVariantModule* self, ValaStruct* st, ValaCCodeExpression* struct_expr); static ValaCCodeExpression* vala_gvariant_module_serialize_hash_table (ValaGVariantModule* self, ValaObjectType* type, ValaCCodeExpression* hash_table_expr); static ValaCCodeExpression* vala_gvariant_module_real_serialize_expression (ValaCCodeBaseModule* base, ValaDataType* type, ValaCCodeExpression* expr); static void vala_gvariant_module_finalize (ValaCodeVisitor * obj); static GType vala_gvariant_module_get_type_once (void); static const ValaGVariantModuleBasicTypeInfo VALA_GVARIANT_MODULE_basic_types[12] = {{"y", "byte", FALSE}, {"b", "boolean", FALSE}, {"n", "int16", FALSE}, {"q", "uint16", FALSE}, {"i", "int32", FALSE}, {"u", "uint32", FALSE}, {"x", "int64", FALSE}, {"t", "uint64", FALSE}, {"d", "double", FALSE}, {"s", "string", TRUE}, {"o", "object_path", TRUE}, {"g", "signature", TRUE}}; static inline gpointer vala_gvariant_module_get_instance_private (ValaGVariantModule* self) { return G_STRUCT_MEMBER_P (self, ValaGVariantModule_private_offset); } static gboolean vala_gvariant_module_is_string_marshalled_enum (ValaTypeSymbol* symbol) { gboolean _tmp0_ = FALSE; gboolean result = FALSE; if (symbol != NULL) { _tmp0_ = G_TYPE_CHECK_INSTANCE_TYPE (symbol, VALA_TYPE_ENUM); } else { _tmp0_ = FALSE; } if (_tmp0_) { result = vala_code_node_get_attribute_bool ((ValaCodeNode*) symbol, "DBus", "use_string_marshalling", FALSE); return result; } result = FALSE; return result; } static gchar* vala_gvariant_module_get_dbus_value (ValaGVariantModule* self, ValaEnumValue* value, const gchar* default_value) { gchar* dbus_value = NULL; gchar* _tmp0_; const gchar* _tmp1_; gchar* _tmp2_; gchar* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (value != NULL, NULL); g_return_val_if_fail (default_value != NULL, NULL); _tmp0_ = vala_code_node_get_attribute_string ((ValaCodeNode*) value, "DBus", "value", NULL); dbus_value = _tmp0_; _tmp1_ = dbus_value; if (_tmp1_ != NULL) { result = dbus_value; return result; } _tmp2_ = g_strdup (default_value); result = _tmp2_; _g_free0 (dbus_value); return result; } gchar* vala_gvariant_module_get_dbus_signature (ValaSymbol* symbol) { gchar* _tmp0_; gchar* result = NULL; g_return_val_if_fail (symbol != NULL, NULL); _tmp0_ = vala_code_node_get_attribute_string ((ValaCodeNode*) symbol, "DBus", "signature", NULL); result = _tmp0_; return result; } static gboolean vala_gvariant_module_get_basic_type_info (ValaGVariantModule* self, const gchar* signature, ValaGVariantModuleBasicTypeInfo* basic_type) { ValaGVariantModuleBasicTypeInfo _vala_basic_type = {0}; gboolean result = FALSE; g_return_val_if_fail (self != NULL, FALSE); if (signature != NULL) { { ValaGVariantModuleBasicTypeInfo* info_collection = NULL; gint info_collection_length1 = 0; gint _info_collection_size_ = 0; gint info_it = 0; info_collection = VALA_GVARIANT_MODULE_basic_types; info_collection_length1 = G_N_ELEMENTS (VALA_GVARIANT_MODULE_basic_types); for (info_it = 0; info_it < info_collection_length1; info_it = info_it + 1) { ValaGVariantModuleBasicTypeInfo info = {0}; info = info_collection[info_it]; { ValaGVariantModuleBasicTypeInfo _tmp0_; const gchar* _tmp1_; _tmp0_ = info; _tmp1_ = _tmp0_.signature; if (g_strcmp0 (_tmp1_, signature) == 0) { ValaGVariantModuleBasicTypeInfo _tmp2_; _tmp2_ = info; _vala_basic_type = _tmp2_; result = TRUE; if (basic_type) { *basic_type = _vala_basic_type; } return result; } } } } } memset (&_vala_basic_type, 0, sizeof (ValaGVariantModuleBasicTypeInfo)); result = FALSE; if (basic_type) { *basic_type = _vala_basic_type; } return result; } static void vala_gvariant_module_real_visit_enum (ValaCodeVisitor* base, ValaEnum* en) { ValaGVariantModule * self; self = (ValaGVariantModule*) base; g_return_if_fail (en != NULL); VALA_CODE_VISITOR_CLASS (vala_gvariant_module_parent_class)->visit_enum ((ValaCodeVisitor*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GVALUE_MODULE, ValaGValueModule), en); if (vala_gvariant_module_is_string_marshalled_enum ((ValaTypeSymbol*) en)) { ValaCCodeFile* _tmp0_; ValaCCodeFile* _tmp1_; ValaCCodeFile* _tmp2_; ValaCCodeFunction* _tmp3_; ValaCCodeFunction* _tmp4_; ValaCCodeFile* _tmp5_; ValaCCodeFunction* _tmp6_; ValaCCodeFunction* _tmp7_; _tmp0_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_include (_tmp0_, "string.h", FALSE); _tmp1_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_file_add_include (_tmp1_, "gio/gio.h", FALSE); _tmp2_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp3_ = vala_gvariant_module_generate_enum_from_string_function (self, en); _tmp4_ = _tmp3_; vala_ccode_file_add_function (_tmp2_, _tmp4_); _vala_ccode_node_unref0 (_tmp4_); _tmp5_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp6_ = vala_gvariant_module_generate_enum_to_string_function (self, en); _tmp7_ = _tmp6_; vala_ccode_file_add_function (_tmp5_, _tmp7_); _vala_ccode_node_unref0 (_tmp7_); } } static gboolean vala_gvariant_module_real_generate_enum_declaration (ValaCCodeBaseModule* base, ValaEnum* en, ValaCCodeFile* decl_space) { ValaGVariantModule * self; gboolean result = FALSE; self = (ValaGVariantModule*) base; g_return_val_if_fail (en != NULL, FALSE); g_return_val_if_fail (decl_space != NULL, FALSE); if (VALA_CCODE_BASE_MODULE_CLASS (vala_gvariant_module_parent_class)->generate_enum_declaration ((ValaCCodeBaseModule*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GVALUE_MODULE, ValaGValueModule), en, decl_space)) { if (vala_gvariant_module_is_string_marshalled_enum ((ValaTypeSymbol*) en)) { ValaCCodeFunction* _tmp0_; ValaCCodeFunction* _tmp1_; ValaCCodeFunction* _tmp2_; ValaCCodeFunction* _tmp3_; _tmp0_ = vala_gvariant_module_generate_enum_from_string_function_declaration (self, en); _tmp1_ = _tmp0_; vala_ccode_file_add_function_declaration (decl_space, _tmp1_); _vala_ccode_node_unref0 (_tmp1_); _tmp2_ = vala_gvariant_module_generate_enum_to_string_function_declaration (self, en); _tmp3_ = _tmp2_; vala_ccode_file_add_function_declaration (decl_space, _tmp3_); _vala_ccode_node_unref0 (_tmp3_); } result = TRUE; return result; } result = FALSE; return result; } static gpointer _vala_target_value_ref0 (gpointer self) { return self ? vala_target_value_ref (self) : NULL; } static gpointer _vala_code_node_ref0 (gpointer self) { return self ? vala_code_node_ref (self) : NULL; } static void vala_gvariant_module_real_visit_cast_expression (ValaCodeVisitor* base, ValaCastExpression* expr) { ValaGVariantModule * self; ValaTargetValue* value = NULL; ValaExpression* _tmp0_; ValaExpression* _tmp1_; ValaTargetValue* _tmp2_; ValaTargetValue* _tmp3_; ValaTargetValue* _tmp4_; ValaDataType* target_type = NULL; ValaDataType* _tmp5_; ValaDataType* _tmp6_; ValaDataType* _tmp7_; gboolean _tmp8_ = FALSE; gboolean _tmp9_ = FALSE; gboolean _tmp10_ = FALSE; gboolean _tmp11_; gboolean _tmp12_; ValaDataType* _tmp23_; ValaDataType* _tmp24_; ValaCCodeFile* _tmp25_; gchar* variant_func = NULL; gint _tmp26_; gchar* _tmp27_; ValaTargetValue* variant = NULL; ValaTargetValue* _tmp28_; ValaTargetValue* _tmp29_; ValaTargetValue* _tmp30_; ValaDataType* _tmp31_; ValaDataType* _tmp32_; gboolean _tmp33_; gboolean _tmp34_; ValaCCodeFunctionCall* ccall = NULL; const gchar* _tmp44_; ValaCCodeIdentifier* _tmp45_; ValaCCodeIdentifier* _tmp46_; ValaCCodeFunctionCall* _tmp47_; ValaCCodeFunctionCall* _tmp48_; ValaCCodeFunctionCall* _tmp49_; ValaTargetValue* _tmp50_; ValaCCodeExpression* _tmp51_; gboolean needs_init = FALSE; ValaDataType* _tmp52_; ValaTargetValue* _result_ = NULL; ValaDataType* _tmp53_; ValaTargetValue* _tmp54_; ValaCCodeFunction* cfunc = NULL; const gchar* _tmp55_; ValaCCodeFunction* _tmp56_; ValaCCodeFunction* _tmp57_; ValaCCodeFunction* _tmp58_; ValaCCodeParameter* _tmp59_; ValaCCodeParameter* _tmp60_; ValaDataType* _tmp61_; ValaDataType* _tmp66_; ValaDataType* _tmp103_; ValaCCodeFunction* _tmp112_; ValaCCodeExpression* type_expr = NULL; ValaGVariantModuleBasicTypeInfo basic_type = {0}; ValaGVariantModuleBasicTypeInfo _tmp113_ = {0}; gboolean is_basic_type = FALSE; gboolean _tmp114_; gboolean _tmp115_; ValaCCodeExpression* func_result = NULL; ValaDataType* _tmp180_; ValaCCodeIdentifier* _tmp181_; ValaCCodeIdentifier* _tmp182_; ValaCCodeIdentifier* _tmp183_; ValaCCodeIdentifier* _tmp184_; ValaCCodeExpression* _tmp185_; ValaCCodeExpression* _tmp186_; gboolean _tmp187_; gboolean _tmp188_; ValaCCodeFile* _tmp252_; ValaCCodeFunction* _tmp253_; ValaCCodeFile* _tmp254_; ValaCCodeFunction* _tmp255_; ValaTargetValue* _tmp256_; ValaTargetValue* _tmp257_; ValaTargetValue* _tmp258_; self = (ValaGVariantModule*) base; g_return_if_fail (expr != NULL); _tmp0_ = vala_cast_expression_get_inner (expr); _tmp1_ = _tmp0_; _tmp2_ = vala_expression_get_target_value (_tmp1_); _tmp3_ = _tmp2_; _tmp4_ = _vala_target_value_ref0 (_tmp3_); value = _tmp4_; _tmp5_ = vala_cast_expression_get_type_reference (expr); _tmp6_ = _tmp5_; _tmp7_ = _vala_code_node_ref0 (_tmp6_); target_type = _tmp7_; _tmp11_ = vala_cast_expression_get_is_non_null_cast (expr); _tmp12_ = _tmp11_; if (_tmp12_) { _tmp10_ = TRUE; } else { ValaTargetValue* _tmp13_; ValaDataType* _tmp14_; ValaDataType* _tmp15_; _tmp13_ = value; _tmp14_ = vala_target_value_get_value_type (_tmp13_); _tmp15_ = _tmp14_; _tmp10_ = _tmp15_ == NULL; } if (_tmp10_) { _tmp9_ = TRUE; } else { ValaClass* _tmp16_; _tmp16_ = ((ValaCCodeBaseModule*) self)->gvariant_type; _tmp9_ = _tmp16_ == NULL; } if (_tmp9_) { _tmp8_ = TRUE; } else { ValaTargetValue* _tmp17_; ValaDataType* _tmp18_; ValaDataType* _tmp19_; ValaTypeSymbol* _tmp20_; ValaTypeSymbol* _tmp21_; ValaClass* _tmp22_; _tmp17_ = value; _tmp18_ = vala_target_value_get_value_type (_tmp17_); _tmp19_ = _tmp18_; _tmp20_ = vala_data_type_get_type_symbol (_tmp19_); _tmp21_ = _tmp20_; _tmp22_ = ((ValaCCodeBaseModule*) self)->gvariant_type; _tmp8_ = _tmp21_ != G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol); } if (_tmp8_) { VALA_CODE_VISITOR_CLASS (vala_gvariant_module_parent_class)->visit_cast_expression ((ValaCodeVisitor*) G_TYPE_CHECK_INSTANCE_CAST (self, VALA_TYPE_GVALUE_MODULE, ValaGValueModule), expr); _vala_code_node_unref0 (target_type); _vala_target_value_unref0 (value); return; } _tmp23_ = vala_cast_expression_get_type_reference (expr); _tmp24_ = _tmp23_; _tmp25_ = ((ValaCCodeBaseModule*) self)->cfile; vala_ccode_base_module_generate_type_declaration ((ValaCCodeBaseModule*) self, _tmp24_, _tmp25_); self->priv->next_variant_function_id = self->priv->next_variant_function_id + 1; _tmp26_ = self->priv->next_variant_function_id; _tmp27_ = g_strdup_printf ("_variant_get%d", _tmp26_); variant_func = _tmp27_; _tmp28_ = value; _tmp29_ = _vala_target_value_ref0 (_tmp28_); variant = _tmp29_; _tmp30_ = value; _tmp31_ = vala_target_value_get_value_type (_tmp30_); _tmp32_ = _tmp31_; _tmp33_ = vala_data_type_get_value_owned (_tmp32_); _tmp34_ = _tmp33_; if (_tmp34_) { ValaTargetValue* temp_value = NULL; ValaTargetValue* _tmp35_; ValaTargetValue* _tmp36_; ValaArrayList* _tmp37_; ValaArrayList* _tmp38_; ValaTargetValue* _tmp39_; ValaGLibValue* _tmp40_; ValaGLibValue* _tmp41_; ValaTargetValue* _tmp42_; ValaTargetValue* _tmp43_; _tmp35_ = value; _tmp36_ = vala_ccode_base_module_store_temp_value ((ValaCCodeBaseModule*) self, _tmp35_, (ValaCodeNode*) expr, NULL); temp_value = _tmp36_; _tmp37_ = vala_ccode_base_module_get_temp_ref_values ((ValaCCodeBaseModule*) self); _tmp38_ = _tmp37_; _tmp39_ = temp_value; _tmp40_ = vala_glib_value_copy (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, VALA_TYPE_GLIB_VALUE, ValaGLibValue)); _tmp41_ = _tmp40_; vala_list_insert ((ValaList*) _tmp38_, 0, (ValaTargetValue*) _tmp41_); _vala_target_value_unref0 (_tmp41_); _tmp42_ = temp_value; _tmp43_ = _vala_target_value_ref0 (_tmp42_); _vala_target_value_unref0 (variant); variant = _tmp43_; _vala_target_value_unref0 (temp_value); } _tmp44_ = variant_func; _tmp45_ = vala_ccode_identifier_new (_tmp44_); _tmp46_ = _tmp45_; _tmp47_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp46_); _tmp48_ = _tmp47_; _vala_ccode_node_unref0 (_tmp46_); ccall = _tmp48_; _tmp49_ = ccall; _tmp50_ = variant; _tmp51_ = vala_get_cvalue_ (_tmp50_); vala_ccode_function_call_add_argument (_tmp49_, _tmp51_); _tmp52_ = target_type; needs_init = G_TYPE_CHECK_INSTANCE_TYPE (_tmp52_, VALA_TYPE_ARRAY_TYPE); _tmp53_ = target_type; _tmp54_ = vala_ccode_base_module_create_temp_value ((ValaCCodeBaseModule*) self, _tmp53_, needs_init, (ValaCodeNode*) expr, NULL); _result_ = _tmp54_; _tmp55_ = variant_func; _tmp56_ = vala_ccode_function_new (_tmp55_, "void"); cfunc = _tmp56_; _tmp57_ = cfunc; vala_ccode_node_set_modifiers ((ValaCCodeNode*) _tmp57_, VALA_CCODE_MODIFIERS_STATIC); _tmp58_ = cfunc; _tmp59_ = vala_ccode_parameter_new ("value", "GVariant*"); _tmp60_ = _tmp59_; vala_ccode_function_add_parameter (_tmp58_, _tmp60_); _vala_ccode_node_unref0 (_tmp60_); _tmp61_ = target_type; if (!vala_data_type_is_real_non_null_struct_type (_tmp61_)) { ValaCCodeFunction* _tmp62_; ValaDataType* _tmp63_; gchar* _tmp64_; gchar* _tmp65_; _tmp62_ = cfunc; _tmp63_ = target_type; _tmp64_ = vala_get_ccode_name ((ValaCodeNode*) _tmp63_); _tmp65_ = _tmp64_; vala_ccode_function_set_return_type (_tmp62_, _tmp65_); _g_free0 (_tmp65_); } _tmp66_ = target_type; if (vala_data_type_is_real_non_null_struct_type (_tmp66_)) { ValaCCodeFunction* _tmp67_; ValaDataType* _tmp68_; gchar* _tmp69_; gchar* _tmp70_; gchar* _tmp71_; gchar* _tmp72_; ValaCCodeParameter* _tmp73_; ValaCCodeParameter* _tmp74_; ValaCCodeFunctionCall* _tmp75_; ValaTargetValue* _tmp76_; ValaCCodeExpression* _tmp77_; ValaCCodeUnaryExpression* _tmp78_; ValaCCodeUnaryExpression* _tmp79_; _tmp67_ = cfunc; _tmp68_ = target_type; _tmp69_ = vala_get_ccode_name ((ValaCodeNode*) _tmp68_); _tmp70_ = _tmp69_; _tmp71_ = g_strdup_printf ("%s *", _tmp70_); _tmp72_ = _tmp71_; _tmp73_ = vala_ccode_parameter_new ("result", _tmp72_); _tmp74_ = _tmp73_; vala_ccode_function_add_parameter (_tmp67_, _tmp74_); _vala_ccode_node_unref0 (_tmp74_); _g_free0 (_tmp72_); _g_free0 (_tmp70_); _tmp75_ = ccall; _tmp76_ = _result_; _tmp77_ = vala_get_cvalue_ (_tmp76_); _tmp78_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp77_); _tmp79_ = _tmp78_; vala_ccode_function_call_add_argument (_tmp75_, (ValaCCodeExpression*) _tmp79_); _vala_ccode_node_unref0 (_tmp79_); } else { ValaDataType* _tmp80_; _tmp80_ = target_type; if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp80_, VALA_TYPE_ARRAY_TYPE)) { ValaArrayType* array_type = NULL; ValaDataType* _tmp81_; gchar* length_ctype = NULL; ValaArrayType* _tmp82_; gchar* _tmp83_; _tmp81_ = target_type; array_type = G_TYPE_CHECK_INSTANCE_CAST (_tmp81_, VALA_TYPE_ARRAY_TYPE, ValaArrayType); _tmp82_ = array_type; _tmp83_ = vala_get_ccode_array_length_type ((ValaCodeNode*) _tmp82_); length_ctype = _tmp83_; { gint dim = 0; dim = 1; { gboolean _tmp84_ = FALSE; _tmp84_ = TRUE; while (TRUE) { ValaArrayType* _tmp86_; gint _tmp87_; gint _tmp88_; ValaCCodeFunctionCall* _tmp89_; ValaTargetValue* _tmp90_; ValaCCodeExpression* _tmp91_; ValaCCodeExpression* _tmp92_; ValaCCodeUnaryExpression* _tmp93_; ValaCCodeUnaryExpression* _tmp94_; ValaCCodeFunction* _tmp95_; gchar* _tmp96_; gchar* _tmp97_; const gchar* _tmp98_; gchar* _tmp99_; gchar* _tmp100_; ValaCCodeParameter* _tmp101_; ValaCCodeParameter* _tmp102_; if (!_tmp84_) { gint _tmp85_; _tmp85_ = dim; dim = _tmp85_ + 1; } _tmp84_ = FALSE; _tmp86_ = array_type; _tmp87_ = vala_array_type_get_rank (_tmp86_); _tmp88_ = _tmp87_; if (!(dim <= _tmp88_)) { break; } _tmp89_ = ccall; _tmp90_ = _result_; _tmp91_ = vala_ccode_base_module_get_array_length_cvalue ((ValaCCodeBaseModule*) self, _tmp90_, dim); _tmp92_ = _tmp91_; _tmp93_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp92_); _tmp94_ = _tmp93_; vala_ccode_function_call_add_argument (_tmp89_, (ValaCCodeExpression*) _tmp94_); _vala_ccode_node_unref0 (_tmp94_); _vala_ccode_node_unref0 (_tmp92_); _tmp95_ = cfunc; _tmp96_ = vala_ccode_base_module_get_array_length_cname ((ValaCCodeBaseModule*) self, "result", dim); _tmp97_ = _tmp96_; _tmp98_ = length_ctype; _tmp99_ = g_strconcat (_tmp98_, "*", NULL); _tmp100_ = _tmp99_; _tmp101_ = vala_ccode_parameter_new (_tmp97_, _tmp100_); _tmp102_ = _tmp101_; vala_ccode_function_add_parameter (_tmp95_, _tmp102_); _vala_ccode_node_unref0 (_tmp102_); _g_free0 (_tmp100_); _g_free0 (_tmp97_); } } } _g_free0 (length_ctype); } } _tmp103_ = target_type; if (!vala_data_type_is_real_non_null_struct_type (_tmp103_)) { ValaCCodeFunction* _tmp104_; ValaCCodeFunction* _tmp105_; ValaTargetValue* _tmp106_; ValaCCodeExpression* _tmp107_; ValaCCodeFunctionCall* _tmp108_; _tmp104_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp105_ = _tmp104_; _tmp106_ = _result_; _tmp107_ = vala_get_cvalue_ (_tmp106_); _tmp108_ = ccall; vala_ccode_function_add_assignment (_tmp105_, _tmp107_, (ValaCCodeExpression*) _tmp108_); } else { ValaCCodeFunction* _tmp109_; ValaCCodeFunction* _tmp110_; ValaCCodeFunctionCall* _tmp111_; _tmp109_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp110_ = _tmp109_; _tmp111_ = ccall; vala_ccode_function_add_expression (_tmp110_, (ValaCCodeExpression*) _tmp111_); } _tmp112_ = cfunc; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp112_); type_expr = NULL; basic_type = _tmp113_; is_basic_type = FALSE; _tmp114_ = vala_cast_expression_get_is_silent_cast (expr); _tmp115_ = _tmp114_; if (_tmp115_) { gchar* signature = NULL; ValaDataType* _tmp116_; gchar* _tmp117_; const gchar* _tmp118_; ValaGVariantModuleBasicTypeInfo _tmp119_ = {0}; gboolean _tmp120_; ValaCCodeFunctionCall* ccheck = NULL; ValaCCodeIdentifier* _tmp121_; ValaCCodeIdentifier* _tmp122_; ValaCCodeFunctionCall* _tmp123_; ValaCCodeFunctionCall* _tmp124_; ValaCCodeFunctionCall* _tmp125_; ValaCCodeIdentifier* _tmp126_; ValaCCodeIdentifier* _tmp127_; ValaCCodeFunctionCall* _tmp171_; ValaCCodeExpression* _tmp172_; ValaCCodeFunction* _tmp173_; ValaCCodeFunction* _tmp174_; ValaCCodeIdentifier* _tmp175_; ValaCCodeIdentifier* _tmp176_; ValaCCodeFunctionCall* _tmp177_; ValaCCodeBinaryExpression* _tmp178_; ValaCCodeBinaryExpression* _tmp179_; _tmp116_ = target_type; _tmp117_ = vala_data_type_get_type_signature (_tmp116_, NULL); signature = _tmp117_; _tmp118_ = signature; _tmp120_ = vala_gvariant_module_get_basic_type_info (self, _tmp118_, &_tmp119_); basic_type = _tmp119_; is_basic_type = _tmp120_; _tmp121_ = vala_ccode_identifier_new ("g_variant_is_of_type"); _tmp122_ = _tmp121_; _tmp123_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp122_); _tmp124_ = _tmp123_; _vala_ccode_node_unref0 (_tmp122_); ccheck = _tmp124_; _tmp125_ = ccheck; _tmp126_ = vala_ccode_identifier_new ("value"); _tmp127_ = _tmp126_; vala_ccode_function_call_add_argument (_tmp125_, (ValaCCodeExpression*) _tmp127_); _vala_ccode_node_unref0 (_tmp127_); if (is_basic_type) { ValaGVariantModuleBasicTypeInfo _tmp128_; const gchar* _tmp129_; gchar* _tmp130_; gchar* _tmp131_; gchar* _tmp132_; gchar* _tmp133_; ValaCCodeIdentifier* _tmp134_; _tmp128_ = basic_type; _tmp129_ = _tmp128_.type_name; _tmp130_ = g_ascii_strup (_tmp129_, (gssize) -1); _tmp131_ = _tmp130_; _tmp132_ = g_strconcat ("G_VARIANT_TYPE_", _tmp131_, NULL); _tmp133_ = _tmp132_; _tmp134_ = vala_ccode_identifier_new (_tmp133_); _vala_ccode_node_unref0 (type_expr); type_expr = (ValaCCodeExpression*) _tmp134_; _g_free0 (_tmp133_); _g_free0 (_tmp131_); } else { ValaObjectType* gvariant_type_type = NULL; ValaSymbol* _tmp135_; ValaScope* _tmp136_; ValaScope* _tmp137_; ValaSymbol* _tmp138_; ValaSymbol* _tmp139_; ValaScope* _tmp140_; ValaScope* _tmp141_; ValaSymbol* _tmp142_; ValaClass* _tmp143_; ValaObjectType* _tmp144_; ValaObjectType* _tmp145_; ValaLocalVariable* type_temp = NULL; ValaObjectType* _tmp146_; ValaLocalVariable* _tmp147_; ValaLocalVariable* _tmp148_; ValaCCodeIdentifier* _tmp149_; ValaCCodeIdentifier* _tmp150_; ValaCCodeFunctionCall* _tmp151_; ValaCCodeExpression* _tmp152_; const gchar* _tmp153_; gchar* _tmp154_; gchar* _tmp155_; ValaCCodeIdentifier* _tmp156_; ValaCCodeIdentifier* _tmp157_; ValaLocalVariable* _tmp158_; ValaTargetValue* _tmp159_; ValaTargetValue* _tmp160_; ValaObjectType* _tmp161_; ValaCCodeExpression* _tmp162_; ValaGLibValue* _tmp163_; ValaGLibValue* _tmp164_; ValaSourceReference* _tmp165_; ValaSourceReference* _tmp166_; ValaLocalVariable* _tmp167_; const gchar* _tmp168_; const gchar* _tmp169_; ValaCCodeExpression* _tmp170_; _tmp135_ = ((ValaCCodeBaseModule*) self)->root_symbol; _tmp136_ = vala_symbol_get_scope (_tmp135_); _tmp137_ = _tmp136_; _tmp138_ = vala_scope_lookup (_tmp137_, "GLib"); _tmp139_ = _tmp138_; _tmp140_ = vala_symbol_get_scope (_tmp139_); _tmp141_ = _tmp140_; _tmp142_ = vala_scope_lookup (_tmp141_, "VariantType"); _tmp143_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp142_, VALA_TYPE_CLASS, ValaClass); _tmp144_ = vala_object_type_new ((ValaObjectTypeSymbol*) _tmp143_); _tmp145_ = _tmp144_; _vala_code_node_unref0 (_tmp143_); _vala_code_node_unref0 (_tmp139_); gvariant_type_type = _tmp145_; _tmp146_ = gvariant_type_type; _tmp147_ = vala_ccode_base_module_get_temp_variable ((ValaCCodeBaseModule*) self, (ValaDataType*) _tmp146_, TRUE, (ValaCodeNode*) expr, TRUE); type_temp = _tmp147_; _tmp148_ = type_temp; vala_ccode_base_module_emit_temp_var ((ValaCCodeBaseModule*) self, _tmp148_, FALSE); _tmp149_ = vala_ccode_identifier_new ("g_variant_type_new"); _tmp150_ = _tmp149_; _tmp151_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp150_); _vala_ccode_node_unref0 (type_expr); type_expr = (ValaCCodeExpression*) _tmp151_; _vala_ccode_node_unref0 (_tmp150_); _tmp152_ = type_expr; _tmp153_ = signature; _tmp154_ = g_strdup_printf ("\"%s\"", _tmp153_); _tmp155_ = _tmp154_; _tmp156_ = vala_ccode_identifier_new (_tmp155_); _tmp157_ = _tmp156_; vala_ccode_function_call_add_argument (G_TYPE_CHECK_INSTANCE_CAST (_tmp152_, VALA_TYPE_CCODE_FUNCTION_CALL, ValaCCodeFunctionCall), (ValaCCodeExpression*) _tmp157_); _vala_ccode_node_unref0 (_tmp157_); _g_free0 (_tmp155_); _tmp158_ = type_temp; _tmp159_ = vala_ccode_base_module_get_local_cvalue ((ValaCCodeBaseModule*) self, _tmp158_); _tmp160_ = _tmp159_; _tmp161_ = gvariant_type_type; _tmp162_ = type_expr; _tmp163_ = vala_glib_value_new ((ValaDataType*) _tmp161_, _tmp162_, FALSE); _tmp164_ = _tmp163_; _tmp165_ = vala_code_node_get_source_reference ((ValaCodeNode*) expr); _tmp166_ = _tmp165_; vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp160_, (ValaTargetValue*) _tmp164_, _tmp166_); _vala_target_value_unref0 (_tmp164_); _vala_target_value_unref0 (_tmp160_); _tmp167_ = type_temp; _tmp168_ = vala_symbol_get_name ((ValaSymbol*) _tmp167_); _tmp169_ = _tmp168_; _tmp170_ = vala_ccode_base_module_get_variable_cexpression ((ValaCCodeBaseModule*) self, _tmp169_); _vala_ccode_node_unref0 (type_expr); type_expr = _tmp170_; _vala_code_node_unref0 (type_temp); _vala_code_node_unref0 (gvariant_type_type); } _tmp171_ = ccheck; _tmp172_ = type_expr; vala_ccode_function_call_add_argument (_tmp171_, _tmp172_); _tmp173_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp174_ = _tmp173_; _tmp175_ = vala_ccode_identifier_new ("value"); _tmp176_ = _tmp175_; _tmp177_ = ccheck; _tmp178_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_AND, (ValaCCodeExpression*) _tmp176_, (ValaCCodeExpression*) _tmp177_); _tmp179_ = _tmp178_; vala_ccode_function_open_if (_tmp174_, (ValaCCodeExpression*) _tmp179_); _vala_ccode_node_unref0 (_tmp179_); _vala_ccode_node_unref0 (_tmp176_); _vala_ccode_node_unref0 (ccheck); _g_free0 (signature); } _tmp180_ = target_type; _tmp181_ = vala_ccode_identifier_new ("value"); _tmp182_ = _tmp181_; _tmp183_ = vala_ccode_identifier_new ("*result"); _tmp184_ = _tmp183_; _tmp185_ = vala_ccode_base_module_deserialize_expression ((ValaCCodeBaseModule*) self, _tmp180_, (ValaCCodeExpression*) _tmp182_, (ValaCCodeExpression*) _tmp184_, NULL, NULL); _tmp186_ = _tmp185_; _vala_ccode_node_unref0 (_tmp184_); _vala_ccode_node_unref0 (_tmp182_); func_result = _tmp186_; _tmp187_ = vala_cast_expression_get_is_silent_cast (expr); _tmp188_ = _tmp187_; if (_tmp188_) { gboolean _tmp189_ = FALSE; ValaCCodeFunction* _tmp226_; ValaCCodeFunction* _tmp227_; ValaCCodeFunction* _tmp237_; ValaCCodeFunction* _tmp238_; ValaCCodeConstant* _tmp239_; ValaCCodeConstant* _tmp240_; ValaCCodeFunction* _tmp241_; ValaCCodeFunction* _tmp242_; if (is_basic_type) { ValaGVariantModuleBasicTypeInfo _tmp190_; _tmp190_ = basic_type; _tmp189_ = _tmp190_.is_string; } else { _tmp189_ = FALSE; } if (_tmp189_) { ValaCCodeFunction* _tmp191_; ValaCCodeFunction* _tmp192_; ValaCCodeExpression* _tmp193_; _tmp191_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp192_ = _tmp191_; _tmp193_ = func_result; vala_ccode_function_add_return (_tmp192_, _tmp193_); } else { ValaDataType* temp_type = NULL; ValaDataType* _tmp203_; ValaDataType* _tmp204_; ValaDataType* _tmp205_; ValaDataType* _tmp206_; ValaDataType* _tmp207_; ValaTargetValue* temp_value = NULL; ValaDataType* _tmp209_; ValaTargetValue* _tmp210_; ValaTargetValue* _tmp211_; ValaDataType* _tmp212_; ValaCCodeExpression* _tmp213_; ValaGLibValue* _tmp214_; ValaGLibValue* _tmp215_; ValaSourceReference* _tmp216_; ValaSourceReference* _tmp217_; ValaCCodeFunction* _tmp218_; ValaCCodeFunction* _tmp219_; ValaTargetValue* _tmp220_; ValaDataType* _tmp221_; ValaDataType* _tmp222_; ValaTargetValue* _tmp223_; ValaTargetValue* _tmp224_; ValaCCodeExpression* _tmp225_; if (!is_basic_type) { ValaCCodeFunctionCall* type_free = NULL; ValaCCodeIdentifier* _tmp194_; ValaCCodeIdentifier* _tmp195_; ValaCCodeFunctionCall* _tmp196_; ValaCCodeFunctionCall* _tmp197_; ValaCCodeFunctionCall* _tmp198_; ValaCCodeExpression* _tmp199_; ValaCCodeFunction* _tmp200_; ValaCCodeFunction* _tmp201_; ValaCCodeFunctionCall* _tmp202_; _tmp194_ = vala_ccode_identifier_new ("g_variant_type_free"); _tmp195_ = _tmp194_; _tmp196_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp195_); _tmp197_ = _tmp196_; _vala_ccode_node_unref0 (_tmp195_); type_free = _tmp197_; _tmp198_ = type_free; _tmp199_ = type_expr; vala_ccode_function_call_add_argument (_tmp198_, _tmp199_); _tmp200_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp201_ = _tmp200_; _tmp202_ = type_free; vala_ccode_function_add_expression (_tmp201_, (ValaCCodeExpression*) _tmp202_); _vala_ccode_node_unref0 (type_free); } _tmp203_ = vala_expression_get_target_type ((ValaExpression*) expr); _tmp204_ = _tmp203_; _tmp205_ = vala_data_type_copy (_tmp204_); temp_type = _tmp205_; _tmp206_ = vala_expression_get_target_type ((ValaExpression*) expr); _tmp207_ = _tmp206_; if (!vala_data_type_is_real_struct_type (_tmp207_)) { ValaDataType* _tmp208_; _tmp208_ = temp_type; vala_data_type_set_nullable (_tmp208_, FALSE); } _tmp209_ = temp_type; _tmp210_ = vala_ccode_base_module_create_temp_value ((ValaCCodeBaseModule*) self, _tmp209_, FALSE, (ValaCodeNode*) expr, NULL); temp_value = _tmp210_; _tmp211_ = temp_value; _tmp212_ = temp_type; _tmp213_ = func_result; _tmp214_ = vala_glib_value_new (_tmp212_, _tmp213_, FALSE); _tmp215_ = _tmp214_; _tmp216_ = vala_code_node_get_source_reference ((ValaCodeNode*) expr); _tmp217_ = _tmp216_; vala_ccode_base_module_store_value ((ValaCCodeBaseModule*) self, _tmp211_, (ValaTargetValue*) _tmp215_, _tmp217_); _vala_target_value_unref0 (_tmp215_); _tmp218_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp219_ = _tmp218_; _tmp220_ = temp_value; _tmp221_ = vala_expression_get_target_type ((ValaExpression*) expr); _tmp222_ = _tmp221_; _tmp223_ = vala_ccode_base_module_transform_value ((ValaCCodeBaseModule*) self, _tmp220_, _tmp222_, (ValaCodeNode*) expr); _tmp224_ = _tmp223_; _tmp225_ = vala_get_cvalue_ (_tmp224_); vala_ccode_function_add_return (_tmp219_, _tmp225_); _vala_target_value_unref0 (_tmp224_); _vala_target_value_unref0 (temp_value); _vala_code_node_unref0 (temp_type); } _tmp226_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp227_ = _tmp226_; vala_ccode_function_add_else (_tmp227_); if (!is_basic_type) { ValaCCodeFunctionCall* type_free = NULL; ValaCCodeIdentifier* _tmp228_; ValaCCodeIdentifier* _tmp229_; ValaCCodeFunctionCall* _tmp230_; ValaCCodeFunctionCall* _tmp231_; ValaCCodeFunctionCall* _tmp232_; ValaCCodeExpression* _tmp233_; ValaCCodeFunction* _tmp234_; ValaCCodeFunction* _tmp235_; ValaCCodeFunctionCall* _tmp236_; _tmp228_ = vala_ccode_identifier_new ("g_variant_type_free"); _tmp229_ = _tmp228_; _tmp230_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp229_); _tmp231_ = _tmp230_; _vala_ccode_node_unref0 (_tmp229_); type_free = _tmp231_; _tmp232_ = type_free; _tmp233_ = type_expr; vala_ccode_function_call_add_argument (_tmp232_, _tmp233_); _tmp234_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp235_ = _tmp234_; _tmp236_ = type_free; vala_ccode_function_add_expression (_tmp235_, (ValaCCodeExpression*) _tmp236_); _vala_ccode_node_unref0 (type_free); } _tmp237_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp238_ = _tmp237_; _tmp239_ = vala_ccode_constant_new ("NULL"); _tmp240_ = _tmp239_; vala_ccode_function_add_return (_tmp238_, (ValaCCodeExpression*) _tmp240_); _vala_ccode_node_unref0 (_tmp240_); _tmp241_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp242_ = _tmp241_; vala_ccode_function_close (_tmp242_); } else { ValaDataType* _tmp243_; _tmp243_ = target_type; if (vala_data_type_is_real_non_null_struct_type (_tmp243_)) { ValaCCodeFunction* _tmp244_; ValaCCodeFunction* _tmp245_; ValaCCodeIdentifier* _tmp246_; ValaCCodeIdentifier* _tmp247_; ValaCCodeExpression* _tmp248_; _tmp244_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp245_ = _tmp244_; _tmp246_ = vala_ccode_identifier_new ("*result"); _tmp247_ = _tmp246_; _tmp248_ = func_result; vala_ccode_function_add_assignment (_tmp245_, (ValaCCodeExpression*) _tmp247_, _tmp248_); _vala_ccode_node_unref0 (_tmp247_); } else { ValaCCodeFunction* _tmp249_; ValaCCodeFunction* _tmp250_; ValaCCodeExpression* _tmp251_; _tmp249_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp250_ = _tmp249_; _tmp251_ = func_result; vala_ccode_function_add_return (_tmp250_, _tmp251_); } } vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); _tmp252_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp253_ = cfunc; vala_ccode_file_add_function_declaration (_tmp252_, _tmp253_); _tmp254_ = ((ValaCCodeBaseModule*) self)->cfile; _tmp255_ = cfunc; vala_ccode_file_add_function (_tmp254_, _tmp255_); _tmp256_ = _result_; _tmp257_ = vala_ccode_base_module_load_temp_value ((ValaCCodeBaseModule*) self, _tmp256_); _tmp258_ = _tmp257_; vala_expression_set_target_value ((ValaExpression*) expr, _tmp258_); _vala_target_value_unref0 (_tmp258_); _vala_ccode_node_unref0 (func_result); _vala_ccode_node_unref0 (type_expr); _vala_ccode_node_unref0 (cfunc); _vala_target_value_unref0 (_result_); _vala_ccode_node_unref0 (ccall); _vala_target_value_unref0 (variant); _g_free0 (variant_func); _vala_code_node_unref0 (target_type); _vala_target_value_unref0 (value); } static gpointer _vala_ccode_node_ref0 (gpointer self) { return self ? vala_ccode_node_ref (self) : NULL; } static ValaCCodeExpression* vala_gvariant_module_get_array_length (ValaGVariantModule* self, ValaCCodeExpression* expr, gint dim) { ValaCCodeIdentifier* id = NULL; ValaCCodeIdentifier* _tmp0_; ValaCCodeMemberAccess* ma = NULL; ValaCCodeMemberAccess* _tmp1_; ValaCCodeIdentifier* _tmp2_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (expr != NULL, NULL); _tmp0_ = _vala_ccode_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (expr, VALA_TYPE_CCODE_IDENTIFIER) ? ((ValaCCodeIdentifier*) expr) : NULL); id = _tmp0_; _tmp1_ = _vala_ccode_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (expr, VALA_TYPE_CCODE_MEMBER_ACCESS) ? ((ValaCCodeMemberAccess*) expr) : NULL); ma = _tmp1_; _tmp2_ = id; if (_tmp2_ != NULL) { ValaCCodeIdentifier* _tmp3_; const gchar* _tmp4_; const gchar* _tmp5_; gchar* _tmp6_; gchar* _tmp7_; ValaCCodeIdentifier* _tmp8_; ValaCCodeExpression* _tmp9_; _tmp3_ = id; _tmp4_ = vala_ccode_identifier_get_name (_tmp3_); _tmp5_ = _tmp4_; _tmp6_ = g_strdup_printf ("%s_length%d", _tmp5_, dim); _tmp7_ = _tmp6_; _tmp8_ = vala_ccode_identifier_new (_tmp7_); _tmp9_ = (ValaCCodeExpression*) _tmp8_; _g_free0 (_tmp7_); result = _tmp9_; _vala_ccode_node_unref0 (ma); _vala_ccode_node_unref0 (id); return result; } else { ValaCCodeMemberAccess* _tmp10_; _tmp10_ = ma; if (_tmp10_ != NULL) { ValaCCodeMemberAccess* _tmp11_; gboolean _tmp12_; gboolean _tmp13_; _tmp11_ = ma; _tmp12_ = vala_ccode_member_access_get_is_pointer (_tmp11_); _tmp13_ = _tmp12_; if (_tmp13_) { ValaCCodeMemberAccess* _tmp14_; ValaCCodeExpression* _tmp15_; ValaCCodeExpression* _tmp16_; ValaCCodeMemberAccess* _tmp17_; const gchar* _tmp18_; const gchar* _tmp19_; gchar* _tmp20_; gchar* _tmp21_; ValaCCodeMemberAccess* _tmp22_; ValaCCodeExpression* _tmp23_; _tmp14_ = ma; _tmp15_ = vala_ccode_member_access_get_inner (_tmp14_); _tmp16_ = _tmp15_; _tmp17_ = ma; _tmp18_ = vala_ccode_member_access_get_member_name (_tmp17_); _tmp19_ = _tmp18_; _tmp20_ = g_strdup_printf ("%s_length%d", _tmp19_, dim); _tmp21_ = _tmp20_; _tmp22_ = vala_ccode_member_access_new_pointer (_tmp16_, _tmp21_); _tmp23_ = (ValaCCodeExpression*) _tmp22_; _g_free0 (_tmp21_); result = _tmp23_; _vala_ccode_node_unref0 (ma); _vala_ccode_node_unref0 (id); return result; } else { ValaCCodeMemberAccess* _tmp24_; ValaCCodeExpression* _tmp25_; ValaCCodeExpression* _tmp26_; ValaCCodeMemberAccess* _tmp27_; const gchar* _tmp28_; const gchar* _tmp29_; gchar* _tmp30_; gchar* _tmp31_; ValaCCodeMemberAccess* _tmp32_; ValaCCodeExpression* _tmp33_; _tmp24_ = ma; _tmp25_ = vala_ccode_member_access_get_inner (_tmp24_); _tmp26_ = _tmp25_; _tmp27_ = ma; _tmp28_ = vala_ccode_member_access_get_member_name (_tmp27_); _tmp29_ = _tmp28_; _tmp30_ = g_strdup_printf ("%s_length%d", _tmp29_, dim); _tmp31_ = _tmp30_; _tmp32_ = vala_ccode_member_access_new (_tmp26_, _tmp31_, FALSE); _tmp33_ = (ValaCCodeExpression*) _tmp32_; _g_free0 (_tmp31_); result = _tmp33_; _vala_ccode_node_unref0 (ma); _vala_ccode_node_unref0 (id); return result; } } else { ValaCCodeFunctionCall* len_call = NULL; ValaCCodeIdentifier* _tmp34_; ValaCCodeIdentifier* _tmp35_; ValaCCodeFunctionCall* _tmp36_; ValaCCodeFunctionCall* _tmp37_; ValaCCodeFunctionCall* _tmp38_; _tmp34_ = vala_ccode_identifier_new ("g_strv_length"); _tmp35_ = _tmp34_; _tmp36_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp35_); _tmp37_ = _tmp36_; _vala_ccode_node_unref0 (_tmp35_); len_call = _tmp37_; _tmp38_ = len_call; vala_ccode_function_call_add_argument (_tmp38_, expr); result = (ValaCCodeExpression*) len_call; _vala_ccode_node_unref0 (ma); _vala_ccode_node_unref0 (id); return result; } } _vala_ccode_node_unref0 (ma); _vala_ccode_node_unref0 (id); } static ValaCCodeExpression* vala_gvariant_module_generate_enum_value_from_string (ValaGVariantModule* self, ValaEnumValueType* type, ValaCCodeExpression* expr, ValaCCodeExpression* error_expr) { ValaEnum* en = NULL; ValaTypeSymbol* _tmp0_; ValaTypeSymbol* _tmp1_; ValaEnum* _tmp2_; gchar* from_string_name = NULL; ValaEnum* _tmp3_; gchar* _tmp4_; gchar* _tmp5_; gchar* _tmp6_; gchar* _tmp7_; ValaCCodeFunctionCall* from_string_call = NULL; const gchar* _tmp8_; ValaCCodeIdentifier* _tmp9_; ValaCCodeIdentifier* _tmp10_; ValaCCodeFunctionCall* _tmp11_; ValaCCodeFunctionCall* _tmp12_; ValaCCodeFunctionCall* _tmp13_; ValaCCodeExpression* _tmp14_ = NULL; ValaCCodeFunctionCall* _tmp17_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (type != NULL, NULL); _tmp0_ = vala_data_type_get_type_symbol ((ValaDataType*) type); _tmp1_ = _tmp0_; _tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_ENUM) ? ((ValaEnum*) _tmp1_) : NULL); en = _tmp2_; _tmp3_ = en; _tmp4_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) _tmp3_, NULL); _tmp5_ = _tmp4_; _tmp6_ = g_strdup_printf ("%s_from_string", _tmp5_); _tmp7_ = _tmp6_; _g_free0 (_tmp5_); from_string_name = _tmp7_; _tmp8_ = from_string_name; _tmp9_ = vala_ccode_identifier_new (_tmp8_); _tmp10_ = _tmp9_; _tmp11_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp10_); _tmp12_ = _tmp11_; _vala_ccode_node_unref0 (_tmp10_); from_string_call = _tmp12_; _tmp13_ = from_string_call; vala_ccode_function_call_add_argument (_tmp13_, expr); if (error_expr != NULL) { ValaCCodeExpression* _tmp15_; _tmp15_ = _vala_ccode_node_ref0 (error_expr); _vala_ccode_node_unref0 (_tmp14_); _tmp14_ = _tmp15_; } else { ValaCCodeConstant* _tmp16_; _tmp16_ = vala_ccode_constant_new ("NULL"); _vala_ccode_node_unref0 (_tmp14_); _tmp14_ = (ValaCCodeExpression*) _tmp16_; } _tmp17_ = from_string_call; vala_ccode_function_call_add_argument (_tmp17_, _tmp14_); result = (ValaCCodeExpression*) from_string_call; _vala_ccode_node_unref0 (_tmp14_); _g_free0 (from_string_name); _vala_code_node_unref0 (en); return result; } ValaCCodeFunction* vala_gvariant_module_generate_enum_from_string_function_declaration (ValaGVariantModule* self, ValaEnum* en) { gchar* from_string_name = NULL; gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; ValaCCodeFunction* from_string_func = NULL; gchar* _tmp4_; gchar* _tmp5_; ValaCCodeFunction* _tmp6_; ValaCCodeFunction* _tmp7_; ValaCCodeParameter* _tmp8_; ValaCCodeParameter* _tmp9_; ValaCCodeParameter* _tmp10_; ValaCCodeParameter* _tmp11_; ValaCCodeFunction* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (en != NULL, NULL); _tmp0_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) en, NULL); _tmp1_ = _tmp0_; _tmp2_ = g_strdup_printf ("%s_from_string", _tmp1_); _tmp3_ = _tmp2_; _g_free0 (_tmp1_); from_string_name = _tmp3_; _tmp4_ = vala_get_ccode_name ((ValaCodeNode*) en); _tmp5_ = _tmp4_; _tmp6_ = vala_ccode_function_new (from_string_name, _tmp5_); _tmp7_ = _tmp6_; _g_free0 (_tmp5_); from_string_func = _tmp7_; _tmp8_ = vala_ccode_parameter_new ("str", "const char*"); _tmp9_ = _tmp8_; vala_ccode_function_add_parameter (from_string_func, _tmp9_); _vala_ccode_node_unref0 (_tmp9_); _tmp10_ = vala_ccode_parameter_new ("error", "GError**"); _tmp11_ = _tmp10_; vala_ccode_function_add_parameter (from_string_func, _tmp11_); _vala_ccode_node_unref0 (_tmp11_); result = from_string_func; _g_free0 (from_string_name); return result; } static gpointer _vala_iterable_ref0 (gpointer self) { return self ? vala_iterable_ref (self) : NULL; } ValaCCodeFunction* vala_gvariant_module_generate_enum_from_string_function (ValaGVariantModule* self, ValaEnum* en) { gchar* from_string_name = NULL; gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; ValaCCodeFunction* from_string_func = NULL; const gchar* _tmp4_; gchar* _tmp5_; gchar* _tmp6_; ValaCCodeFunction* _tmp7_; ValaCCodeFunction* _tmp8_; ValaCCodeFunction* _tmp9_; ValaCCodeParameter* _tmp10_; ValaCCodeParameter* _tmp11_; ValaCCodeFunction* _tmp12_; ValaCCodeParameter* _tmp13_; ValaCCodeParameter* _tmp14_; ValaCCodeFunction* _tmp15_; ValaCCodeFunction* _tmp16_; ValaCCodeFunction* _tmp17_; gchar* _tmp18_; gchar* _tmp19_; ValaCCodeConstant* _tmp20_; ValaCCodeConstant* _tmp21_; ValaCCodeVariableDeclarator* _tmp22_; ValaCCodeVariableDeclarator* _tmp23_; gboolean firstif = FALSE; ValaCCodeFunction* _tmp71_; ValaCCodeFunction* _tmp72_; ValaCCodeFunctionCall* set_error = NULL; ValaCCodeIdentifier* _tmp73_; ValaCCodeIdentifier* _tmp74_; ValaCCodeFunctionCall* _tmp75_; ValaCCodeFunctionCall* _tmp76_; ValaCCodeIdentifier* _tmp77_; ValaCCodeIdentifier* _tmp78_; ValaCCodeIdentifier* _tmp79_; ValaCCodeIdentifier* _tmp80_; ValaCCodeIdentifier* _tmp81_; ValaCCodeIdentifier* _tmp82_; gchar* _tmp83_; gchar* _tmp84_; gchar* _tmp85_; gchar* _tmp86_; ValaCCodeConstant* _tmp87_; ValaCCodeConstant* _tmp88_; ValaCCodeFunction* _tmp89_; ValaCCodeFunction* _tmp90_; ValaCCodeFunction* _tmp91_; ValaCCodeFunction* _tmp92_; ValaCCodeFunction* _tmp93_; ValaCCodeFunction* _tmp94_; ValaCCodeIdentifier* _tmp95_; ValaCCodeIdentifier* _tmp96_; ValaCCodeFunction* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (en != NULL, NULL); _tmp0_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) en, NULL); _tmp1_ = _tmp0_; _tmp2_ = g_strdup_printf ("%s_from_string", _tmp1_); _tmp3_ = _tmp2_; _g_free0 (_tmp1_); from_string_name = _tmp3_; _tmp4_ = from_string_name; _tmp5_ = vala_get_ccode_name ((ValaCodeNode*) en); _tmp6_ = _tmp5_; _tmp7_ = vala_ccode_function_new (_tmp4_, _tmp6_); _tmp8_ = _tmp7_; _g_free0 (_tmp6_); from_string_func = _tmp8_; _tmp9_ = from_string_func; _tmp10_ = vala_ccode_parameter_new ("str", "const char*"); _tmp11_ = _tmp10_; vala_ccode_function_add_parameter (_tmp9_, _tmp11_); _vala_ccode_node_unref0 (_tmp11_); _tmp12_ = from_string_func; _tmp13_ = vala_ccode_parameter_new ("error", "GError**"); _tmp14_ = _tmp13_; vala_ccode_function_add_parameter (_tmp12_, _tmp14_); _vala_ccode_node_unref0 (_tmp14_); _tmp15_ = from_string_func; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp15_); _tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp17_ = _tmp16_; _tmp18_ = vala_get_ccode_name ((ValaCodeNode*) en); _tmp19_ = _tmp18_; _tmp20_ = vala_ccode_constant_new ("0"); _tmp21_ = _tmp20_; _tmp22_ = vala_ccode_variable_declarator_new_zero ("value", (ValaCCodeExpression*) _tmp21_, NULL); _tmp23_ = _tmp22_; vala_ccode_function_add_declaration (_tmp17_, _tmp19_, (ValaCCodeDeclarator*) _tmp23_, 0); _vala_ccode_node_unref0 (_tmp23_); _vala_ccode_node_unref0 (_tmp21_); _g_free0 (_tmp19_); firstif = TRUE; { ValaList* _enum_value_list = NULL; ValaList* _tmp24_; ValaList* _tmp25_; gint _enum_value_size = 0; ValaList* _tmp26_; gint _tmp27_; gint _tmp28_; gint _enum_value_index = 0; _tmp24_ = vala_enum_get_values (en); _tmp25_ = _vala_iterable_ref0 (_tmp24_); _enum_value_list = _tmp25_; _tmp26_ = _enum_value_list; _tmp27_ = vala_collection_get_size ((ValaCollection*) _tmp26_); _tmp28_ = _tmp27_; _enum_value_size = _tmp28_; _enum_value_index = -1; while (TRUE) { gint _tmp29_; gint _tmp30_; ValaEnumValue* enum_value = NULL; ValaList* _tmp31_; gpointer _tmp32_; gchar* dbus_value = NULL; ValaEnumValue* _tmp33_; ValaEnumValue* _tmp34_; const gchar* _tmp35_; const gchar* _tmp36_; gchar* _tmp37_; ValaCCodeFunctionCall* string_comparison = NULL; ValaCCodeIdentifier* _tmp38_; ValaCCodeIdentifier* _tmp39_; ValaCCodeFunctionCall* _tmp40_; ValaCCodeFunctionCall* _tmp41_; ValaCCodeFunctionCall* _tmp42_; ValaCCodeIdentifier* _tmp43_; ValaCCodeIdentifier* _tmp44_; ValaCCodeFunctionCall* _tmp45_; const gchar* _tmp46_; gchar* _tmp47_; gchar* _tmp48_; ValaCCodeConstant* _tmp49_; ValaCCodeConstant* _tmp50_; ValaCCodeBinaryExpression* cond = NULL; ValaCCodeFunctionCall* _tmp51_; ValaCCodeConstant* _tmp52_; ValaCCodeConstant* _tmp53_; ValaCCodeBinaryExpression* _tmp54_; ValaCCodeBinaryExpression* _tmp55_; ValaCCodeFunction* _tmp62_; ValaCCodeFunction* _tmp63_; ValaCCodeIdentifier* _tmp64_; ValaCCodeIdentifier* _tmp65_; ValaEnumValue* _tmp66_; gchar* _tmp67_; gchar* _tmp68_; ValaCCodeIdentifier* _tmp69_; ValaCCodeIdentifier* _tmp70_; _enum_value_index = _enum_value_index + 1; _tmp29_ = _enum_value_index; _tmp30_ = _enum_value_size; if (!(_tmp29_ < _tmp30_)) { break; } _tmp31_ = _enum_value_list; _tmp32_ = vala_list_get (_tmp31_, _enum_value_index); enum_value = (ValaEnumValue*) _tmp32_; _tmp33_ = enum_value; _tmp34_ = enum_value; _tmp35_ = vala_symbol_get_name ((ValaSymbol*) _tmp34_); _tmp36_ = _tmp35_; _tmp37_ = vala_gvariant_module_get_dbus_value (self, _tmp33_, _tmp36_); dbus_value = _tmp37_; _tmp38_ = vala_ccode_identifier_new ("strcmp"); _tmp39_ = _tmp38_; _tmp40_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp39_); _tmp41_ = _tmp40_; _vala_ccode_node_unref0 (_tmp39_); string_comparison = _tmp41_; _tmp42_ = string_comparison; _tmp43_ = vala_ccode_identifier_new ("str"); _tmp44_ = _tmp43_; vala_ccode_function_call_add_argument (_tmp42_, (ValaCCodeExpression*) _tmp44_); _vala_ccode_node_unref0 (_tmp44_); _tmp45_ = string_comparison; _tmp46_ = dbus_value; _tmp47_ = g_strdup_printf ("\"%s\"", _tmp46_); _tmp48_ = _tmp47_; _tmp49_ = vala_ccode_constant_new (_tmp48_); _tmp50_ = _tmp49_; vala_ccode_function_call_add_argument (_tmp45_, (ValaCCodeExpression*) _tmp50_); _vala_ccode_node_unref0 (_tmp50_); _g_free0 (_tmp48_); _tmp51_ = string_comparison; _tmp52_ = vala_ccode_constant_new ("0"); _tmp53_ = _tmp52_; _tmp54_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp51_, (ValaCCodeExpression*) _tmp53_); _tmp55_ = _tmp54_; _vala_ccode_node_unref0 (_tmp53_); cond = _tmp55_; if (firstif) { ValaCCodeFunction* _tmp56_; ValaCCodeFunction* _tmp57_; ValaCCodeBinaryExpression* _tmp58_; _tmp56_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp57_ = _tmp56_; _tmp58_ = cond; vala_ccode_function_open_if (_tmp57_, (ValaCCodeExpression*) _tmp58_); firstif = FALSE; } else { ValaCCodeFunction* _tmp59_; ValaCCodeFunction* _tmp60_; ValaCCodeBinaryExpression* _tmp61_; _tmp59_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp60_ = _tmp59_; _tmp61_ = cond; vala_ccode_function_else_if (_tmp60_, (ValaCCodeExpression*) _tmp61_); } _tmp62_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp63_ = _tmp62_; _tmp64_ = vala_ccode_identifier_new ("value"); _tmp65_ = _tmp64_; _tmp66_ = enum_value; _tmp67_ = vala_get_ccode_name ((ValaCodeNode*) _tmp66_); _tmp68_ = _tmp67_; _tmp69_ = vala_ccode_identifier_new (_tmp68_); _tmp70_ = _tmp69_; vala_ccode_function_add_assignment (_tmp63_, (ValaCCodeExpression*) _tmp65_, (ValaCCodeExpression*) _tmp70_); _vala_ccode_node_unref0 (_tmp70_); _g_free0 (_tmp68_); _vala_ccode_node_unref0 (_tmp65_); _vala_ccode_node_unref0 (cond); _vala_ccode_node_unref0 (string_comparison); _g_free0 (dbus_value); _vala_code_node_unref0 (enum_value); } _vala_iterable_unref0 (_enum_value_list); } _tmp71_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp72_ = _tmp71_; vala_ccode_function_add_else (_tmp72_); _tmp73_ = vala_ccode_identifier_new ("g_set_error"); _tmp74_ = _tmp73_; _tmp75_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp74_); _tmp76_ = _tmp75_; _vala_ccode_node_unref0 (_tmp74_); set_error = _tmp76_; _tmp77_ = vala_ccode_identifier_new ("error"); _tmp78_ = _tmp77_; vala_ccode_function_call_add_argument (set_error, (ValaCCodeExpression*) _tmp78_); _vala_ccode_node_unref0 (_tmp78_); _tmp79_ = vala_ccode_identifier_new ("G_DBUS_ERROR"); _tmp80_ = _tmp79_; vala_ccode_function_call_add_argument (set_error, (ValaCCodeExpression*) _tmp80_); _vala_ccode_node_unref0 (_tmp80_); _tmp81_ = vala_ccode_identifier_new ("G_DBUS_ERROR_INVALID_ARGS"); _tmp82_ = _tmp81_; vala_ccode_function_call_add_argument (set_error, (ValaCCodeExpression*) _tmp82_); _vala_ccode_node_unref0 (_tmp82_); _tmp83_ = vala_get_ccode_name ((ValaCodeNode*) en); _tmp84_ = _tmp83_; _tmp85_ = g_strdup_printf ("\"Invalid value for enum `%s'\"", _tmp84_); _tmp86_ = _tmp85_; _tmp87_ = vala_ccode_constant_new (_tmp86_); _tmp88_ = _tmp87_; vala_ccode_function_call_add_argument (set_error, (ValaCCodeExpression*) _tmp88_); _vala_ccode_node_unref0 (_tmp88_); _g_free0 (_tmp86_); _g_free0 (_tmp84_); _tmp89_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp90_ = _tmp89_; vala_ccode_function_add_expression (_tmp90_, (ValaCCodeExpression*) set_error); _tmp91_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp92_ = _tmp91_; vala_ccode_function_close (_tmp92_); _tmp93_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp94_ = _tmp93_; _tmp95_ = vala_ccode_identifier_new ("value"); _tmp96_ = _tmp95_; vala_ccode_function_add_return (_tmp94_, (ValaCCodeExpression*) _tmp96_); _vala_ccode_node_unref0 (_tmp96_); vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); result = from_string_func; _vala_ccode_node_unref0 (set_error); _g_free0 (from_string_name); return result; } static ValaCCodeExpression* vala_gvariant_module_deserialize_basic (ValaGVariantModule* self, ValaGVariantModuleBasicTypeInfo* basic_type, ValaCCodeExpression* variant_expr, gboolean transfer) { ValaCCodeFunctionCall* get_call = NULL; ValaGVariantModuleBasicTypeInfo _tmp0_; const gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; ValaCCodeIdentifier* _tmp4_; ValaCCodeIdentifier* _tmp5_; ValaCCodeFunctionCall* _tmp6_; ValaCCodeFunctionCall* _tmp7_; ValaCCodeFunctionCall* _tmp8_; ValaGVariantModuleBasicTypeInfo _tmp9_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (basic_type != NULL, NULL); g_return_val_if_fail (variant_expr != NULL, NULL); _tmp0_ = *basic_type; _tmp1_ = _tmp0_.type_name; _tmp2_ = g_strconcat ("g_variant_get_", _tmp1_, NULL); _tmp3_ = _tmp2_; _tmp4_ = vala_ccode_identifier_new (_tmp3_); _tmp5_ = _tmp4_; _tmp6_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp5_); _tmp7_ = _tmp6_; _vala_ccode_node_unref0 (_tmp5_); _g_free0 (_tmp3_); get_call = _tmp7_; _tmp8_ = get_call; vala_ccode_function_call_add_argument (_tmp8_, variant_expr); _tmp9_ = *basic_type; if (_tmp9_.is_string) { ValaCCodeFunctionCall* _tmp16_; ValaCCodeConstant* _tmp17_; ValaCCodeConstant* _tmp18_; if (transfer) { ValaCCodeFunctionCall* _tmp10_; ValaCCodeIdentifier* _tmp11_; ValaCCodeIdentifier* _tmp12_; _tmp10_ = get_call; _tmp11_ = vala_ccode_identifier_new ("g_variant_get_string"); _tmp12_ = _tmp11_; vala_ccode_function_call_set_call (_tmp10_, (ValaCCodeExpression*) _tmp12_); _vala_ccode_node_unref0 (_tmp12_); } else { ValaCCodeFunctionCall* _tmp13_; ValaCCodeIdentifier* _tmp14_; ValaCCodeIdentifier* _tmp15_; _tmp13_ = get_call; _tmp14_ = vala_ccode_identifier_new ("g_variant_dup_string"); _tmp15_ = _tmp14_; vala_ccode_function_call_set_call (_tmp13_, (ValaCCodeExpression*) _tmp15_); _vala_ccode_node_unref0 (_tmp15_); } _tmp16_ = get_call; _tmp17_ = vala_ccode_constant_new ("NULL"); _tmp18_ = _tmp17_; vala_ccode_function_call_add_argument (_tmp16_, (ValaCCodeExpression*) _tmp18_); _vala_ccode_node_unref0 (_tmp18_); } result = (ValaCCodeExpression*) get_call; return result; } static ValaCCodeExpression* vala_gvariant_module_deserialize_array (ValaGVariantModule* self, ValaArrayType* array_type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr) { gboolean _tmp0_ = FALSE; gint _tmp1_; gint _tmp2_; gchar* temp_name = NULL; gint _tmp6_; gint _tmp7_; gchar* _tmp8_; ValaCCodeFunctionCall* new_call = NULL; ValaCCodeIdentifier* _tmp9_; ValaCCodeIdentifier* _tmp10_; ValaCCodeFunctionCall* _tmp11_; ValaCCodeFunctionCall* _tmp12_; ValaCCodeFunctionCall* _tmp13_; ValaDataType* _tmp14_; ValaDataType* _tmp15_; gchar* _tmp16_; gchar* _tmp17_; ValaCCodeIdentifier* _tmp18_; ValaCCodeIdentifier* _tmp19_; ValaCCodeFunctionCall* _tmp20_; ValaCCodeConstant* _tmp21_; ValaCCodeConstant* _tmp22_; gchar* length_ctype = NULL; gchar* _tmp23_; ValaCCodeFunction* _tmp24_; ValaCCodeFunction* _tmp25_; gchar* _tmp26_; gchar* _tmp27_; const gchar* _tmp28_; ValaCCodeFunctionCall* _tmp29_; ValaCCodeVariableDeclarator* _tmp30_; ValaCCodeVariableDeclarator* _tmp31_; ValaCCodeFunction* _tmp32_; ValaCCodeFunction* _tmp33_; const gchar* _tmp34_; const gchar* _tmp35_; gchar* _tmp36_; gchar* _tmp37_; ValaCCodeConstant* _tmp38_; ValaCCodeConstant* _tmp39_; ValaCCodeVariableDeclarator* _tmp40_; ValaCCodeVariableDeclarator* _tmp41_; ValaCCodeFunction* _tmp42_; ValaCCodeFunction* _tmp43_; const gchar* _tmp44_; const gchar* _tmp45_; gchar* _tmp46_; gchar* _tmp47_; ValaCCodeConstant* _tmp48_; ValaCCodeConstant* _tmp49_; ValaCCodeVariableDeclarator* _tmp50_; ValaCCodeVariableDeclarator* _tmp51_; const gchar* _tmp52_; ValaDataType* _tmp53_; ValaDataType* _tmp54_; const gchar* _tmp71_; ValaCCodeIdentifier* _tmp72_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (array_type != NULL, NULL); g_return_val_if_fail (variant_expr != NULL, NULL); _tmp1_ = vala_array_type_get_rank (array_type); _tmp2_ = _tmp1_; if (_tmp2_ == 1) { gchar* _tmp3_; gchar* _tmp4_; _tmp3_ = vala_data_type_get_type_signature ((ValaDataType*) array_type, NULL); _tmp4_ = _tmp3_; _tmp0_ = g_strcmp0 (_tmp4_, "ay") == 0; _g_free0 (_tmp4_); } else { _tmp0_ = FALSE; } if (_tmp0_) { ValaCCodeExpression* _tmp5_; _tmp5_ = vala_gvariant_module_deserialize_buffer_array (self, array_type, variant_expr, expr); result = _tmp5_; return result; } _tmp6_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp7_ = _tmp6_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp7_ + 1); _tmp8_ = g_strdup_printf ("_tmp%d_", _tmp7_); temp_name = _tmp8_; _tmp9_ = vala_ccode_identifier_new ("g_new"); _tmp10_ = _tmp9_; _tmp11_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp10_); _tmp12_ = _tmp11_; _vala_ccode_node_unref0 (_tmp10_); new_call = _tmp12_; _tmp13_ = new_call; _tmp14_ = vala_array_type_get_element_type (array_type); _tmp15_ = _tmp14_; _tmp16_ = vala_get_ccode_name ((ValaCodeNode*) _tmp15_); _tmp17_ = _tmp16_; _tmp18_ = vala_ccode_identifier_new (_tmp17_); _tmp19_ = _tmp18_; vala_ccode_function_call_add_argument (_tmp13_, (ValaCCodeExpression*) _tmp19_); _vala_ccode_node_unref0 (_tmp19_); _g_free0 (_tmp17_); _tmp20_ = new_call; _tmp21_ = vala_ccode_constant_new ("5"); _tmp22_ = _tmp21_; vala_ccode_function_call_add_argument (_tmp20_, (ValaCCodeExpression*) _tmp22_); _vala_ccode_node_unref0 (_tmp22_); _tmp23_ = vala_get_ccode_array_length_type ((ValaCodeNode*) array_type); length_ctype = _tmp23_; _tmp24_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp25_ = _tmp24_; _tmp26_ = vala_get_ccode_name ((ValaCodeNode*) array_type); _tmp27_ = _tmp26_; _tmp28_ = temp_name; _tmp29_ = new_call; _tmp30_ = vala_ccode_variable_declarator_new (_tmp28_, (ValaCCodeExpression*) _tmp29_, NULL); _tmp31_ = _tmp30_; vala_ccode_function_add_declaration (_tmp25_, _tmp27_, (ValaCCodeDeclarator*) _tmp31_, 0); _vala_ccode_node_unref0 (_tmp31_); _g_free0 (_tmp27_); _tmp32_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp33_ = _tmp32_; _tmp34_ = length_ctype; _tmp35_ = temp_name; _tmp36_ = g_strconcat (_tmp35_, "_length", NULL); _tmp37_ = _tmp36_; _tmp38_ = vala_ccode_constant_new ("0"); _tmp39_ = _tmp38_; _tmp40_ = vala_ccode_variable_declarator_new (_tmp37_, (ValaCCodeExpression*) _tmp39_, NULL); _tmp41_ = _tmp40_; vala_ccode_function_add_declaration (_tmp33_, _tmp34_, (ValaCCodeDeclarator*) _tmp41_, 0); _vala_ccode_node_unref0 (_tmp41_); _vala_ccode_node_unref0 (_tmp39_); _g_free0 (_tmp37_); _tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp43_ = _tmp42_; _tmp44_ = length_ctype; _tmp45_ = temp_name; _tmp46_ = g_strconcat (_tmp45_, "_size", NULL); _tmp47_ = _tmp46_; _tmp48_ = vala_ccode_constant_new ("4"); _tmp49_ = _tmp48_; _tmp50_ = vala_ccode_variable_declarator_new (_tmp47_, (ValaCCodeExpression*) _tmp49_, NULL); _tmp51_ = _tmp50_; vala_ccode_function_add_declaration (_tmp43_, _tmp44_, (ValaCCodeDeclarator*) _tmp51_, 0); _vala_ccode_node_unref0 (_tmp51_); _vala_ccode_node_unref0 (_tmp49_); _g_free0 (_tmp47_); _tmp52_ = temp_name; vala_gvariant_module_deserialize_array_dim (self, array_type, 1, _tmp52_, variant_expr, expr); _tmp53_ = vala_array_type_get_element_type (array_type); _tmp54_ = _tmp53_; if (vala_data_type_is_reference_type_or_type_parameter (_tmp54_)) { ValaCCodeIdentifier* length = NULL; const gchar* _tmp55_; gchar* _tmp56_; gchar* _tmp57_; ValaCCodeIdentifier* _tmp58_; ValaCCodeIdentifier* _tmp59_; ValaCCodeElementAccess* element_access = NULL; const gchar* _tmp60_; ValaCCodeIdentifier* _tmp61_; ValaCCodeIdentifier* _tmp62_; ValaCCodeIdentifier* _tmp63_; ValaCCodeElementAccess* _tmp64_; ValaCCodeElementAccess* _tmp65_; ValaCCodeFunction* _tmp66_; ValaCCodeFunction* _tmp67_; ValaCCodeElementAccess* _tmp68_; ValaCCodeConstant* _tmp69_; ValaCCodeConstant* _tmp70_; _tmp55_ = temp_name; _tmp56_ = g_strconcat (_tmp55_, "_length", NULL); _tmp57_ = _tmp56_; _tmp58_ = vala_ccode_identifier_new (_tmp57_); _tmp59_ = _tmp58_; _g_free0 (_tmp57_); length = _tmp59_; _tmp60_ = temp_name; _tmp61_ = vala_ccode_identifier_new (_tmp60_); _tmp62_ = _tmp61_; _tmp63_ = length; _tmp64_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp62_, (ValaCCodeExpression*) _tmp63_); _tmp65_ = _tmp64_; _vala_ccode_node_unref0 (_tmp62_); element_access = _tmp65_; _tmp66_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp67_ = _tmp66_; _tmp68_ = element_access; _tmp69_ = vala_ccode_constant_new ("NULL"); _tmp70_ = _tmp69_; vala_ccode_function_add_assignment (_tmp67_, (ValaCCodeExpression*) _tmp68_, (ValaCCodeExpression*) _tmp70_); _vala_ccode_node_unref0 (_tmp70_); _vala_ccode_node_unref0 (element_access); _vala_ccode_node_unref0 (length); } _tmp71_ = temp_name; _tmp72_ = vala_ccode_identifier_new (_tmp71_); result = (ValaCCodeExpression*) _tmp72_; _g_free0 (length_ctype); _vala_ccode_node_unref0 (new_call); _g_free0 (temp_name); return result; } static void vala_gvariant_module_deserialize_array_dim (ValaGVariantModule* self, ValaArrayType* array_type, gint dim, const gchar* temp_name, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr) { gchar* subiter_name = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_; gchar* element_name = NULL; gint _tmp3_; gint _tmp4_; gchar* _tmp5_; ValaCCodeFunction* _tmp6_; ValaCCodeFunction* _tmp7_; gchar* _tmp8_; gchar* _tmp9_; gchar* _tmp10_; gchar* _tmp11_; ValaCCodeConstant* _tmp12_; ValaCCodeConstant* _tmp13_; ValaCCodeVariableDeclarator* _tmp14_; ValaCCodeVariableDeclarator* _tmp15_; ValaCCodeFunction* _tmp16_; ValaCCodeFunction* _tmp17_; const gchar* _tmp18_; ValaCCodeVariableDeclarator* _tmp19_; ValaCCodeVariableDeclarator* _tmp20_; ValaCCodeFunction* _tmp21_; ValaCCodeFunction* _tmp22_; const gchar* _tmp23_; ValaCCodeVariableDeclarator* _tmp24_; ValaCCodeVariableDeclarator* _tmp25_; ValaCCodeFunctionCall* iter_call = NULL; ValaCCodeIdentifier* _tmp26_; ValaCCodeIdentifier* _tmp27_; ValaCCodeFunctionCall* _tmp28_; ValaCCodeFunctionCall* _tmp29_; ValaCCodeFunctionCall* _tmp30_; const gchar* _tmp31_; ValaCCodeIdentifier* _tmp32_; ValaCCodeIdentifier* _tmp33_; ValaCCodeUnaryExpression* _tmp34_; ValaCCodeUnaryExpression* _tmp35_; ValaCCodeFunctionCall* _tmp36_; ValaCCodeFunction* _tmp37_; ValaCCodeFunction* _tmp38_; ValaCCodeFunctionCall* _tmp39_; ValaCCodeIdentifier* _tmp40_; ValaCCodeIdentifier* _tmp41_; ValaCCodeFunctionCall* _tmp42_; ValaCCodeFunctionCall* _tmp43_; const gchar* _tmp44_; ValaCCodeIdentifier* _tmp45_; ValaCCodeIdentifier* _tmp46_; ValaCCodeUnaryExpression* _tmp47_; ValaCCodeUnaryExpression* _tmp48_; ValaCCodeBinaryExpression* cforcond = NULL; const gchar* _tmp49_; ValaCCodeIdentifier* _tmp50_; ValaCCodeIdentifier* _tmp51_; ValaCCodeFunctionCall* _tmp52_; ValaCCodeAssignment* _tmp53_; ValaCCodeAssignment* _tmp54_; ValaCCodeConstant* _tmp55_; ValaCCodeConstant* _tmp56_; ValaCCodeBinaryExpression* _tmp57_; ValaCCodeBinaryExpression* _tmp58_; ValaCCodeUnaryExpression* cforiter = NULL; gchar* _tmp59_; gchar* _tmp60_; ValaCCodeIdentifier* _tmp61_; ValaCCodeIdentifier* _tmp62_; ValaCCodeUnaryExpression* _tmp63_; ValaCCodeUnaryExpression* _tmp64_; ValaCCodeFunction* _tmp65_; ValaCCodeFunction* _tmp66_; ValaCCodeBinaryExpression* _tmp67_; ValaCCodeUnaryExpression* _tmp68_; gint _tmp69_; gint _tmp70_; ValaCCodeFunctionCall* unref = NULL; ValaCCodeIdentifier* _tmp153_; ValaCCodeIdentifier* _tmp154_; ValaCCodeFunctionCall* _tmp155_; ValaCCodeFunctionCall* _tmp156_; ValaCCodeFunctionCall* _tmp157_; const gchar* _tmp158_; ValaCCodeIdentifier* _tmp159_; ValaCCodeIdentifier* _tmp160_; ValaCCodeFunction* _tmp161_; ValaCCodeFunction* _tmp162_; ValaCCodeFunctionCall* _tmp163_; ValaCCodeFunction* _tmp164_; ValaCCodeFunction* _tmp165_; g_return_if_fail (self != NULL); g_return_if_fail (array_type != NULL); g_return_if_fail (temp_name != NULL); g_return_if_fail (variant_expr != NULL); _tmp0_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp1_ = _tmp0_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp1_ + 1); _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_); subiter_name = _tmp2_; _tmp3_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp4_ = _tmp3_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp4_ + 1); _tmp5_ = g_strdup_printf ("_tmp%d_", _tmp4_); element_name = _tmp5_; _tmp6_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp7_ = _tmp6_; _tmp8_ = vala_get_ccode_array_length_type ((ValaCodeNode*) array_type); _tmp9_ = _tmp8_; _tmp10_ = g_strdup_printf ("%s_length%d", temp_name, dim); _tmp11_ = _tmp10_; _tmp12_ = vala_ccode_constant_new ("0"); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_variable_declarator_new (_tmp11_, (ValaCCodeExpression*) _tmp13_, NULL); _tmp15_ = _tmp14_; vala_ccode_function_add_declaration (_tmp7_, _tmp9_, (ValaCCodeDeclarator*) _tmp15_, 0); _vala_ccode_node_unref0 (_tmp15_); _vala_ccode_node_unref0 (_tmp13_); _g_free0 (_tmp11_); _g_free0 (_tmp9_); _tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp17_ = _tmp16_; _tmp18_ = subiter_name; _tmp19_ = vala_ccode_variable_declarator_new (_tmp18_, NULL, NULL); _tmp20_ = _tmp19_; vala_ccode_function_add_declaration (_tmp17_, "GVariantIter", (ValaCCodeDeclarator*) _tmp20_, 0); _vala_ccode_node_unref0 (_tmp20_); _tmp21_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp22_ = _tmp21_; _tmp23_ = element_name; _tmp24_ = vala_ccode_variable_declarator_new (_tmp23_, NULL, NULL); _tmp25_ = _tmp24_; vala_ccode_function_add_declaration (_tmp22_, "GVariant*", (ValaCCodeDeclarator*) _tmp25_, 0); _vala_ccode_node_unref0 (_tmp25_); _tmp26_ = vala_ccode_identifier_new ("g_variant_iter_init"); _tmp27_ = _tmp26_; _tmp28_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp27_); _tmp29_ = _tmp28_; _vala_ccode_node_unref0 (_tmp27_); iter_call = _tmp29_; _tmp30_ = iter_call; _tmp31_ = subiter_name; _tmp32_ = vala_ccode_identifier_new (_tmp31_); _tmp33_ = _tmp32_; _tmp34_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp33_); _tmp35_ = _tmp34_; vala_ccode_function_call_add_argument (_tmp30_, (ValaCCodeExpression*) _tmp35_); _vala_ccode_node_unref0 (_tmp35_); _vala_ccode_node_unref0 (_tmp33_); _tmp36_ = iter_call; vala_ccode_function_call_add_argument (_tmp36_, variant_expr); _tmp37_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp38_ = _tmp37_; _tmp39_ = iter_call; vala_ccode_function_add_expression (_tmp38_, (ValaCCodeExpression*) _tmp39_); _tmp40_ = vala_ccode_identifier_new ("g_variant_iter_next_value"); _tmp41_ = _tmp40_; _tmp42_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp41_); _vala_ccode_node_unref0 (iter_call); iter_call = _tmp42_; _vala_ccode_node_unref0 (_tmp41_); _tmp43_ = iter_call; _tmp44_ = subiter_name; _tmp45_ = vala_ccode_identifier_new (_tmp44_); _tmp46_ = _tmp45_; _tmp47_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp46_); _tmp48_ = _tmp47_; vala_ccode_function_call_add_argument (_tmp43_, (ValaCCodeExpression*) _tmp48_); _vala_ccode_node_unref0 (_tmp48_); _vala_ccode_node_unref0 (_tmp46_); _tmp49_ = element_name; _tmp50_ = vala_ccode_identifier_new (_tmp49_); _tmp51_ = _tmp50_; _tmp52_ = iter_call; _tmp53_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp51_, (ValaCCodeExpression*) _tmp52_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE); _tmp54_ = _tmp53_; _tmp55_ = vala_ccode_constant_new ("NULL"); _tmp56_ = _tmp55_; _tmp57_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_INEQUALITY, (ValaCCodeExpression*) _tmp54_, (ValaCCodeExpression*) _tmp56_); _tmp58_ = _tmp57_; _vala_ccode_node_unref0 (_tmp56_); _vala_ccode_node_unref0 (_tmp54_); _vala_ccode_node_unref0 (_tmp51_); cforcond = _tmp58_; _tmp59_ = g_strdup_printf ("%s_length%d", temp_name, dim); _tmp60_ = _tmp59_; _tmp61_ = vala_ccode_identifier_new (_tmp60_); _tmp62_ = _tmp61_; _tmp63_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp62_); _tmp64_ = _tmp63_; _vala_ccode_node_unref0 (_tmp62_); _g_free0 (_tmp60_); cforiter = _tmp64_; _tmp65_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp66_ = _tmp65_; _tmp67_ = cforcond; _tmp68_ = cforiter; vala_ccode_function_open_for (_tmp66_, NULL, (ValaCCodeExpression*) _tmp67_, (ValaCCodeExpression*) _tmp68_); _tmp69_ = vala_array_type_get_rank (array_type); _tmp70_ = _tmp69_; if (dim < _tmp70_) { const gchar* _tmp71_; ValaCCodeIdentifier* _tmp72_; ValaCCodeIdentifier* _tmp73_; _tmp71_ = element_name; _tmp72_ = vala_ccode_identifier_new (_tmp71_); _tmp73_ = _tmp72_; vala_gvariant_module_deserialize_array_dim (self, array_type, dim + 1, temp_name, (ValaCCodeExpression*) _tmp73_, expr); _vala_ccode_node_unref0 (_tmp73_); } else { ValaCCodeBinaryExpression* size_check = NULL; gchar* _tmp74_; gchar* _tmp75_; ValaCCodeIdentifier* _tmp76_; ValaCCodeIdentifier* _tmp77_; gchar* _tmp78_; gchar* _tmp79_; ValaCCodeIdentifier* _tmp80_; ValaCCodeIdentifier* _tmp81_; ValaCCodeBinaryExpression* _tmp82_; ValaCCodeBinaryExpression* _tmp83_; ValaCCodeFunction* _tmp84_; ValaCCodeFunction* _tmp85_; ValaCCodeBinaryExpression* _tmp86_; ValaCCodeBinaryExpression* new_size = NULL; ValaCCodeConstant* _tmp87_; ValaCCodeConstant* _tmp88_; gchar* _tmp89_; gchar* _tmp90_; ValaCCodeIdentifier* _tmp91_; ValaCCodeIdentifier* _tmp92_; ValaCCodeBinaryExpression* _tmp93_; ValaCCodeBinaryExpression* _tmp94_; ValaCCodeFunction* _tmp95_; ValaCCodeFunction* _tmp96_; gchar* _tmp97_; gchar* _tmp98_; ValaCCodeIdentifier* _tmp99_; ValaCCodeIdentifier* _tmp100_; ValaCCodeBinaryExpression* _tmp101_; ValaCCodeFunctionCall* renew_call = NULL; ValaCCodeIdentifier* _tmp102_; ValaCCodeIdentifier* _tmp103_; ValaCCodeFunctionCall* _tmp104_; ValaCCodeFunctionCall* _tmp105_; ValaCCodeFunctionCall* _tmp106_; ValaDataType* _tmp107_; ValaDataType* _tmp108_; gchar* _tmp109_; gchar* _tmp110_; ValaCCodeIdentifier* _tmp111_; ValaCCodeIdentifier* _tmp112_; ValaCCodeFunctionCall* _tmp113_; ValaCCodeIdentifier* _tmp114_; ValaCCodeIdentifier* _tmp115_; ValaCCodeFunctionCall* _tmp116_; gchar* _tmp117_; gchar* _tmp118_; ValaCCodeIdentifier* _tmp119_; ValaCCodeIdentifier* _tmp120_; ValaCCodeConstant* _tmp121_; ValaCCodeConstant* _tmp122_; ValaCCodeBinaryExpression* _tmp123_; ValaCCodeBinaryExpression* _tmp124_; ValaCCodeFunction* _tmp125_; ValaCCodeFunction* _tmp126_; ValaCCodeIdentifier* _tmp127_; ValaCCodeIdentifier* _tmp128_; ValaCCodeFunctionCall* _tmp129_; ValaCCodeFunction* _tmp130_; ValaCCodeFunction* _tmp131_; ValaCCodeElementAccess* element_access = NULL; ValaCCodeIdentifier* _tmp132_; ValaCCodeIdentifier* _tmp133_; gchar* _tmp134_; gchar* _tmp135_; ValaCCodeIdentifier* _tmp136_; ValaCCodeIdentifier* _tmp137_; ValaCCodeUnaryExpression* _tmp138_; ValaCCodeUnaryExpression* _tmp139_; ValaCCodeElementAccess* _tmp140_; ValaCCodeElementAccess* _tmp141_; ValaCCodeExpression* element_expr = NULL; ValaDataType* _tmp142_; ValaDataType* _tmp143_; const gchar* _tmp144_; ValaCCodeIdentifier* _tmp145_; ValaCCodeIdentifier* _tmp146_; ValaCCodeExpression* _tmp147_; ValaCCodeExpression* _tmp148_; ValaCCodeFunction* _tmp149_; ValaCCodeFunction* _tmp150_; ValaCCodeElementAccess* _tmp151_; ValaCCodeExpression* _tmp152_; _tmp74_ = g_strconcat (temp_name, "_size", NULL); _tmp75_ = _tmp74_; _tmp76_ = vala_ccode_identifier_new (_tmp75_); _tmp77_ = _tmp76_; _tmp78_ = g_strconcat (temp_name, "_length", NULL); _tmp79_ = _tmp78_; _tmp80_ = vala_ccode_identifier_new (_tmp79_); _tmp81_ = _tmp80_; _tmp82_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_EQUALITY, (ValaCCodeExpression*) _tmp77_, (ValaCCodeExpression*) _tmp81_); _tmp83_ = _tmp82_; _vala_ccode_node_unref0 (_tmp81_); _g_free0 (_tmp79_); _vala_ccode_node_unref0 (_tmp77_); _g_free0 (_tmp75_); size_check = _tmp83_; _tmp84_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp85_ = _tmp84_; _tmp86_ = size_check; vala_ccode_function_open_if (_tmp85_, (ValaCCodeExpression*) _tmp86_); _tmp87_ = vala_ccode_constant_new ("2"); _tmp88_ = _tmp87_; _tmp89_ = g_strconcat (temp_name, "_size", NULL); _tmp90_ = _tmp89_; _tmp91_ = vala_ccode_identifier_new (_tmp90_); _tmp92_ = _tmp91_; _tmp93_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_MUL, (ValaCCodeExpression*) _tmp88_, (ValaCCodeExpression*) _tmp92_); _tmp94_ = _tmp93_; _vala_ccode_node_unref0 (_tmp92_); _g_free0 (_tmp90_); _vala_ccode_node_unref0 (_tmp88_); new_size = _tmp94_; _tmp95_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp96_ = _tmp95_; _tmp97_ = g_strconcat (temp_name, "_size", NULL); _tmp98_ = _tmp97_; _tmp99_ = vala_ccode_identifier_new (_tmp98_); _tmp100_ = _tmp99_; _tmp101_ = new_size; vala_ccode_function_add_assignment (_tmp96_, (ValaCCodeExpression*) _tmp100_, (ValaCCodeExpression*) _tmp101_); _vala_ccode_node_unref0 (_tmp100_); _g_free0 (_tmp98_); _tmp102_ = vala_ccode_identifier_new ("g_renew"); _tmp103_ = _tmp102_; _tmp104_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp103_); _tmp105_ = _tmp104_; _vala_ccode_node_unref0 (_tmp103_); renew_call = _tmp105_; _tmp106_ = renew_call; _tmp107_ = vala_array_type_get_element_type (array_type); _tmp108_ = _tmp107_; _tmp109_ = vala_get_ccode_name ((ValaCodeNode*) _tmp108_); _tmp110_ = _tmp109_; _tmp111_ = vala_ccode_identifier_new (_tmp110_); _tmp112_ = _tmp111_; vala_ccode_function_call_add_argument (_tmp106_, (ValaCCodeExpression*) _tmp112_); _vala_ccode_node_unref0 (_tmp112_); _g_free0 (_tmp110_); _tmp113_ = renew_call; _tmp114_ = vala_ccode_identifier_new (temp_name); _tmp115_ = _tmp114_; vala_ccode_function_call_add_argument (_tmp113_, (ValaCCodeExpression*) _tmp115_); _vala_ccode_node_unref0 (_tmp115_); _tmp116_ = renew_call; _tmp117_ = g_strconcat (temp_name, "_size", NULL); _tmp118_ = _tmp117_; _tmp119_ = vala_ccode_identifier_new (_tmp118_); _tmp120_ = _tmp119_; _tmp121_ = vala_ccode_constant_new ("1"); _tmp122_ = _tmp121_; _tmp123_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_PLUS, (ValaCCodeExpression*) _tmp120_, (ValaCCodeExpression*) _tmp122_); _tmp124_ = _tmp123_; vala_ccode_function_call_add_argument (_tmp116_, (ValaCCodeExpression*) _tmp124_); _vala_ccode_node_unref0 (_tmp124_); _vala_ccode_node_unref0 (_tmp122_); _vala_ccode_node_unref0 (_tmp120_); _g_free0 (_tmp118_); _tmp125_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp126_ = _tmp125_; _tmp127_ = vala_ccode_identifier_new (temp_name); _tmp128_ = _tmp127_; _tmp129_ = renew_call; vala_ccode_function_add_assignment (_tmp126_, (ValaCCodeExpression*) _tmp128_, (ValaCCodeExpression*) _tmp129_); _vala_ccode_node_unref0 (_tmp128_); _tmp130_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp131_ = _tmp130_; vala_ccode_function_close (_tmp131_); _tmp132_ = vala_ccode_identifier_new (temp_name); _tmp133_ = _tmp132_; _tmp134_ = g_strconcat (temp_name, "_length", NULL); _tmp135_ = _tmp134_; _tmp136_ = vala_ccode_identifier_new (_tmp135_); _tmp137_ = _tmp136_; _tmp138_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp137_); _tmp139_ = _tmp138_; _tmp140_ = vala_ccode_element_access_new ((ValaCCodeExpression*) _tmp133_, (ValaCCodeExpression*) _tmp139_); _tmp141_ = _tmp140_; _vala_ccode_node_unref0 (_tmp139_); _vala_ccode_node_unref0 (_tmp137_); _g_free0 (_tmp135_); _vala_ccode_node_unref0 (_tmp133_); element_access = _tmp141_; _tmp142_ = vala_array_type_get_element_type (array_type); _tmp143_ = _tmp142_; _tmp144_ = element_name; _tmp145_ = vala_ccode_identifier_new (_tmp144_); _tmp146_ = _tmp145_; _tmp147_ = vala_ccode_base_module_deserialize_expression ((ValaCCodeBaseModule*) self, _tmp143_, (ValaCCodeExpression*) _tmp146_, NULL, NULL, NULL); _tmp148_ = _tmp147_; _vala_ccode_node_unref0 (_tmp146_); element_expr = _tmp148_; _tmp149_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp150_ = _tmp149_; _tmp151_ = element_access; _tmp152_ = element_expr; vala_ccode_function_add_assignment (_tmp150_, (ValaCCodeExpression*) _tmp151_, _tmp152_); _vala_ccode_node_unref0 (element_expr); _vala_ccode_node_unref0 (element_access); _vala_ccode_node_unref0 (renew_call); _vala_ccode_node_unref0 (new_size); _vala_ccode_node_unref0 (size_check); } _tmp153_ = vala_ccode_identifier_new ("g_variant_unref"); _tmp154_ = _tmp153_; _tmp155_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp154_); _tmp156_ = _tmp155_; _vala_ccode_node_unref0 (_tmp154_); unref = _tmp156_; _tmp157_ = unref; _tmp158_ = element_name; _tmp159_ = vala_ccode_identifier_new (_tmp158_); _tmp160_ = _tmp159_; vala_ccode_function_call_add_argument (_tmp157_, (ValaCCodeExpression*) _tmp160_); _vala_ccode_node_unref0 (_tmp160_); _tmp161_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp162_ = _tmp161_; _tmp163_ = unref; vala_ccode_function_add_expression (_tmp162_, (ValaCCodeExpression*) _tmp163_); _tmp164_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp165_ = _tmp164_; vala_ccode_function_close (_tmp165_); if (expr != NULL) { ValaCCodeFunction* _tmp166_; ValaCCodeFunction* _tmp167_; ValaCCodeExpression* _tmp168_; ValaCCodeExpression* _tmp169_; gchar* _tmp170_; gchar* _tmp171_; ValaCCodeIdentifier* _tmp172_; ValaCCodeIdentifier* _tmp173_; _tmp166_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp167_ = _tmp166_; _tmp168_ = vala_gvariant_module_get_array_length (self, expr, dim); _tmp169_ = _tmp168_; _tmp170_ = g_strdup_printf ("%s_length%d", temp_name, dim); _tmp171_ = _tmp170_; _tmp172_ = vala_ccode_identifier_new (_tmp171_); _tmp173_ = _tmp172_; vala_ccode_function_add_assignment (_tmp167_, _tmp169_, (ValaCCodeExpression*) _tmp173_); _vala_ccode_node_unref0 (_tmp173_); _g_free0 (_tmp171_); _vala_ccode_node_unref0 (_tmp169_); } _vala_ccode_node_unref0 (unref); _vala_ccode_node_unref0 (cforiter); _vala_ccode_node_unref0 (cforcond); _vala_ccode_node_unref0 (iter_call); _g_free0 (element_name); _g_free0 (subiter_name); } static ValaCCodeExpression* vala_gvariant_module_deserialize_buffer_array (ValaGVariantModule* self, ValaArrayType* array_type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr) { gchar* temp_name = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_; ValaCCodeFunctionCall* get_data_call = NULL; ValaCCodeIdentifier* _tmp3_; ValaCCodeIdentifier* _tmp4_; ValaCCodeFunctionCall* _tmp5_; ValaCCodeFunctionCall* _tmp6_; ValaCCodeFunctionCall* _tmp7_; ValaCCodeFunctionCall* get_size_call = NULL; ValaCCodeIdentifier* _tmp8_; ValaCCodeIdentifier* _tmp9_; ValaCCodeFunctionCall* _tmp10_; ValaCCodeFunctionCall* _tmp11_; ValaCCodeFunctionCall* _tmp12_; ValaCCodeFunction* _tmp13_; ValaCCodeFunction* _tmp14_; const gchar* _tmp15_; gchar* _tmp16_; gchar* _tmp17_; ValaCCodeFunctionCall* _tmp18_; ValaCCodeVariableDeclarator* _tmp19_; ValaCCodeVariableDeclarator* _tmp20_; ValaCCodeIdentifier* length = NULL; const gchar* _tmp21_; gchar* _tmp22_; gchar* _tmp23_; ValaCCodeIdentifier* _tmp24_; ValaCCodeIdentifier* _tmp25_; ValaCCodeFunctionCall* dup_call = NULL; ValaCCodeIdentifier* _tmp26_; ValaCCodeIdentifier* _tmp27_; ValaCCodeFunctionCall* _tmp28_; ValaCCodeFunctionCall* _tmp29_; ValaCCodeFunctionCall* _tmp30_; ValaCCodeFunctionCall* _tmp31_; ValaCCodeFunctionCall* _tmp32_; ValaCCodeIdentifier* _tmp33_; ValaCCodeFunction* _tmp34_; ValaCCodeFunction* _tmp35_; gchar* _tmp36_; gchar* _tmp37_; const gchar* _tmp38_; ValaCCodeFunctionCall* _tmp39_; ValaCCodeVariableDeclarator* _tmp40_; ValaCCodeVariableDeclarator* _tmp41_; const gchar* _tmp47_; ValaCCodeIdentifier* _tmp48_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (array_type != NULL, NULL); g_return_val_if_fail (variant_expr != NULL, NULL); _tmp0_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp1_ = _tmp0_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp1_ + 1); _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_); temp_name = _tmp2_; _tmp3_ = vala_ccode_identifier_new ("g_variant_get_data"); _tmp4_ = _tmp3_; _tmp5_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp4_); _tmp6_ = _tmp5_; _vala_ccode_node_unref0 (_tmp4_); get_data_call = _tmp6_; _tmp7_ = get_data_call; vala_ccode_function_call_add_argument (_tmp7_, variant_expr); _tmp8_ = vala_ccode_identifier_new ("g_variant_get_size"); _tmp9_ = _tmp8_; _tmp10_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp9_); _tmp11_ = _tmp10_; _vala_ccode_node_unref0 (_tmp9_); get_size_call = _tmp11_; _tmp12_ = get_size_call; vala_ccode_function_call_add_argument (_tmp12_, variant_expr); _tmp13_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp14_ = _tmp13_; _tmp15_ = temp_name; _tmp16_ = g_strconcat (_tmp15_, "_length", NULL); _tmp17_ = _tmp16_; _tmp18_ = get_size_call; _tmp19_ = vala_ccode_variable_declarator_new (_tmp17_, (ValaCCodeExpression*) _tmp18_, NULL); _tmp20_ = _tmp19_; vala_ccode_function_add_declaration (_tmp14_, "gsize", (ValaCCodeDeclarator*) _tmp20_, 0); _vala_ccode_node_unref0 (_tmp20_); _g_free0 (_tmp17_); _tmp21_ = temp_name; _tmp22_ = g_strconcat (_tmp21_, "_length", NULL); _tmp23_ = _tmp22_; _tmp24_ = vala_ccode_identifier_new (_tmp23_); _tmp25_ = _tmp24_; _g_free0 (_tmp23_); length = _tmp25_; _tmp26_ = vala_ccode_identifier_new ("g_memdup"); _tmp27_ = _tmp26_; _tmp28_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp27_); _tmp29_ = _tmp28_; _vala_ccode_node_unref0 (_tmp27_); dup_call = _tmp29_; _tmp30_ = dup_call; _tmp31_ = get_data_call; vala_ccode_function_call_add_argument (_tmp30_, (ValaCCodeExpression*) _tmp31_); _tmp32_ = dup_call; _tmp33_ = length; vala_ccode_function_call_add_argument (_tmp32_, (ValaCCodeExpression*) _tmp33_); _tmp34_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp35_ = _tmp34_; _tmp36_ = vala_get_ccode_name ((ValaCodeNode*) array_type); _tmp37_ = _tmp36_; _tmp38_ = temp_name; _tmp39_ = dup_call; _tmp40_ = vala_ccode_variable_declarator_new (_tmp38_, (ValaCCodeExpression*) _tmp39_, NULL); _tmp41_ = _tmp40_; vala_ccode_function_add_declaration (_tmp35_, _tmp37_, (ValaCCodeDeclarator*) _tmp41_, 0); _vala_ccode_node_unref0 (_tmp41_); _g_free0 (_tmp37_); if (expr != NULL) { ValaCCodeFunction* _tmp42_; ValaCCodeFunction* _tmp43_; ValaCCodeExpression* _tmp44_; ValaCCodeExpression* _tmp45_; ValaCCodeIdentifier* _tmp46_; _tmp42_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp43_ = _tmp42_; _tmp44_ = vala_gvariant_module_get_array_length (self, expr, 1); _tmp45_ = _tmp44_; _tmp46_ = length; vala_ccode_function_add_assignment (_tmp43_, _tmp45_, (ValaCCodeExpression*) _tmp46_); _vala_ccode_node_unref0 (_tmp45_); } _tmp47_ = temp_name; _tmp48_ = vala_ccode_identifier_new (_tmp47_); result = (ValaCCodeExpression*) _tmp48_; _vala_ccode_node_unref0 (dup_call); _vala_ccode_node_unref0 (length); _vala_ccode_node_unref0 (get_size_call); _vala_ccode_node_unref0 (get_data_call); _g_free0 (temp_name); return result; } static ValaCCodeExpression* vala_gvariant_module_deserialize_struct (ValaGVariantModule* self, ValaStruct* st, ValaCCodeExpression* variant_expr) { gchar* temp_name = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_; gchar* subiter_name = NULL; gint _tmp3_; gint _tmp4_; gchar* _tmp5_; ValaCCodeFunction* _tmp6_; ValaCCodeFunction* _tmp7_; gchar* _tmp8_; gchar* _tmp9_; const gchar* _tmp10_; ValaCCodeVariableDeclarator* _tmp11_; ValaCCodeVariableDeclarator* _tmp12_; ValaCCodeFunction* _tmp13_; ValaCCodeFunction* _tmp14_; const gchar* _tmp15_; ValaCCodeVariableDeclarator* _tmp16_; ValaCCodeVariableDeclarator* _tmp17_; ValaCCodeFunctionCall* iter_call = NULL; ValaCCodeIdentifier* _tmp18_; ValaCCodeIdentifier* _tmp19_; ValaCCodeFunctionCall* _tmp20_; ValaCCodeFunctionCall* _tmp21_; ValaCCodeFunctionCall* _tmp22_; const gchar* _tmp23_; ValaCCodeIdentifier* _tmp24_; ValaCCodeIdentifier* _tmp25_; ValaCCodeUnaryExpression* _tmp26_; ValaCCodeUnaryExpression* _tmp27_; ValaCCodeFunctionCall* _tmp28_; ValaCCodeFunction* _tmp29_; ValaCCodeFunction* _tmp30_; ValaCCodeFunctionCall* _tmp31_; gboolean field_found = FALSE; const gchar* _tmp59_; ValaCCodeIdentifier* _tmp60_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (st != NULL, NULL); g_return_val_if_fail (variant_expr != NULL, NULL); _tmp0_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp1_ = _tmp0_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp1_ + 1); _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_); temp_name = _tmp2_; _tmp3_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp4_ = _tmp3_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp4_ + 1); _tmp5_ = g_strdup_printf ("_tmp%d_", _tmp4_); subiter_name = _tmp5_; _tmp6_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp7_ = _tmp6_; _tmp8_ = vala_get_ccode_name ((ValaCodeNode*) st); _tmp9_ = _tmp8_; _tmp10_ = temp_name; _tmp11_ = vala_ccode_variable_declarator_new (_tmp10_, NULL, NULL); _tmp12_ = _tmp11_; vala_ccode_function_add_declaration (_tmp7_, _tmp9_, (ValaCCodeDeclarator*) _tmp12_, 0); _vala_ccode_node_unref0 (_tmp12_); _g_free0 (_tmp9_); _tmp13_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp14_ = _tmp13_; _tmp15_ = subiter_name; _tmp16_ = vala_ccode_variable_declarator_new (_tmp15_, NULL, NULL); _tmp17_ = _tmp16_; vala_ccode_function_add_declaration (_tmp14_, "GVariantIter", (ValaCCodeDeclarator*) _tmp17_, 0); _vala_ccode_node_unref0 (_tmp17_); _tmp18_ = vala_ccode_identifier_new ("g_variant_iter_init"); _tmp19_ = _tmp18_; _tmp20_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp19_); _tmp21_ = _tmp20_; _vala_ccode_node_unref0 (_tmp19_); iter_call = _tmp21_; _tmp22_ = iter_call; _tmp23_ = subiter_name; _tmp24_ = vala_ccode_identifier_new (_tmp23_); _tmp25_ = _tmp24_; _tmp26_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp25_); _tmp27_ = _tmp26_; vala_ccode_function_call_add_argument (_tmp22_, (ValaCCodeExpression*) _tmp27_); _vala_ccode_node_unref0 (_tmp27_); _vala_ccode_node_unref0 (_tmp25_); _tmp28_ = iter_call; vala_ccode_function_call_add_argument (_tmp28_, variant_expr); _tmp29_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp30_ = _tmp29_; _tmp31_ = iter_call; vala_ccode_function_add_expression (_tmp30_, (ValaCCodeExpression*) _tmp31_); field_found = FALSE; { ValaList* _f_list = NULL; ValaList* _tmp32_; ValaList* _tmp33_; gint _f_size = 0; ValaList* _tmp34_; gint _tmp35_; gint _tmp36_; gint _f_index = 0; _tmp32_ = vala_struct_get_fields (st); _tmp33_ = _vala_iterable_ref0 (_tmp32_); _f_list = _tmp33_; _tmp34_ = _f_list; _tmp35_ = vala_collection_get_size ((ValaCollection*) _tmp34_); _tmp36_ = _tmp35_; _f_size = _tmp36_; _f_index = -1; while (TRUE) { gint _tmp37_; gint _tmp38_; ValaField* f = NULL; ValaList* _tmp39_; gpointer _tmp40_; ValaField* _tmp41_; ValaMemberBinding _tmp42_; ValaMemberBinding _tmp43_; ValaField* _tmp44_; ValaDataType* _tmp45_; ValaDataType* _tmp46_; const gchar* _tmp47_; ValaCCodeIdentifier* _tmp48_; ValaCCodeIdentifier* _tmp49_; const gchar* _tmp50_; ValaCCodeIdentifier* _tmp51_; ValaCCodeIdentifier* _tmp52_; ValaField* _tmp53_; gchar* _tmp54_; gchar* _tmp55_; ValaCCodeMemberAccess* _tmp56_; ValaCCodeMemberAccess* _tmp57_; ValaField* _tmp58_; _f_index = _f_index + 1; _tmp37_ = _f_index; _tmp38_ = _f_size; if (!(_tmp37_ < _tmp38_)) { break; } _tmp39_ = _f_list; _tmp40_ = vala_list_get (_tmp39_, _f_index); f = (ValaField*) _tmp40_; _tmp41_ = f; _tmp42_ = vala_field_get_binding (_tmp41_); _tmp43_ = _tmp42_; if (_tmp43_ != VALA_MEMBER_BINDING_INSTANCE) { _vala_code_node_unref0 (f); continue; } field_found = TRUE; _tmp44_ = f; _tmp45_ = vala_variable_get_variable_type ((ValaVariable*) _tmp44_); _tmp46_ = _tmp45_; _tmp47_ = subiter_name; _tmp48_ = vala_ccode_identifier_new (_tmp47_); _tmp49_ = _tmp48_; _tmp50_ = temp_name; _tmp51_ = vala_ccode_identifier_new (_tmp50_); _tmp52_ = _tmp51_; _tmp53_ = f; _tmp54_ = vala_get_ccode_name ((ValaCodeNode*) _tmp53_); _tmp55_ = _tmp54_; _tmp56_ = vala_ccode_member_access_new ((ValaCCodeExpression*) _tmp52_, _tmp55_, FALSE); _tmp57_ = _tmp56_; _tmp58_ = f; vala_gvariant_module_read_expression (self, _tmp46_, (ValaCCodeExpression*) _tmp49_, (ValaCCodeExpression*) _tmp57_, (ValaSymbol*) _tmp58_, NULL, NULL); _vala_ccode_node_unref0 (_tmp57_); _g_free0 (_tmp55_); _vala_ccode_node_unref0 (_tmp52_); _vala_ccode_node_unref0 (_tmp49_); _vala_code_node_unref0 (f); } _vala_iterable_unref0 (_f_list); } if (!field_found) { result = NULL; _vala_ccode_node_unref0 (iter_call); _g_free0 (subiter_name); _g_free0 (temp_name); return result; } _tmp59_ = temp_name; _tmp60_ = vala_ccode_identifier_new (_tmp59_); result = (ValaCCodeExpression*) _tmp60_; _vala_ccode_node_unref0 (iter_call); _g_free0 (subiter_name); _g_free0 (temp_name); return result; } static ValaCCodeExpression* vala_gvariant_module_deserialize_hash_table (ValaGVariantModule* self, ValaObjectType* type, ValaCCodeExpression* variant_expr) { gchar* temp_name = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_; gchar* subiter_name = NULL; gint _tmp3_; gint _tmp4_; gchar* _tmp5_; gchar* key_name = NULL; gint _tmp6_; gint _tmp7_; gchar* _tmp8_; gchar* value_name = NULL; gint _tmp9_; gint _tmp10_; gchar* _tmp11_; ValaList* type_args = NULL; ValaList* _tmp12_; ValaList* _tmp13_; ValaList* _tmp14_; gint _tmp15_; gint _tmp16_; ValaDataType* key_type = NULL; ValaList* _tmp26_; gpointer _tmp27_; ValaDataType* value_type = NULL; ValaList* _tmp28_; gpointer _tmp29_; ValaCCodeFunction* _tmp30_; ValaCCodeFunction* _tmp31_; const gchar* _tmp32_; ValaCCodeVariableDeclarator* _tmp33_; ValaCCodeVariableDeclarator* _tmp34_; ValaCCodeFunction* _tmp35_; ValaCCodeFunction* _tmp36_; const gchar* _tmp37_; ValaCCodeVariableDeclarator* _tmp38_; ValaCCodeVariableDeclarator* _tmp39_; ValaCCodeFunction* _tmp40_; ValaCCodeFunction* _tmp41_; const gchar* _tmp42_; ValaCCodeVariableDeclarator* _tmp43_; ValaCCodeVariableDeclarator* _tmp44_; ValaCCodeFunction* _tmp45_; ValaCCodeFunction* _tmp46_; const gchar* _tmp47_; ValaCCodeVariableDeclarator* _tmp48_; ValaCCodeVariableDeclarator* _tmp49_; ValaCCodeFunctionCall* hash_table_new = NULL; ValaCCodeIdentifier* _tmp50_; ValaCCodeIdentifier* _tmp51_; ValaCCodeFunctionCall* _tmp52_; ValaCCodeFunctionCall* _tmp53_; ValaDataType* _tmp54_; ValaTypeSymbol* _tmp55_; ValaTypeSymbol* _tmp56_; ValaDataType* _tmp57_; ValaTypeSymbol* _tmp58_; ValaTypeSymbol* _tmp59_; ValaDataType* _tmp82_; ValaTypeSymbol* _tmp83_; ValaTypeSymbol* _tmp84_; ValaDataType* _tmp85_; ValaTypeSymbol* _tmp86_; ValaTypeSymbol* _tmp87_; ValaDataType* _tmp114_; ValaTypeSymbol* _tmp115_; ValaTypeSymbol* _tmp116_; ValaDataType* _tmp117_; ValaTypeSymbol* _tmp118_; ValaTypeSymbol* _tmp119_; ValaCCodeFunction* _tmp146_; ValaCCodeFunction* _tmp147_; const gchar* _tmp148_; ValaCCodeIdentifier* _tmp149_; ValaCCodeIdentifier* _tmp150_; ValaCCodeFunctionCall* _tmp151_; ValaCCodeFunctionCall* iter_call = NULL; ValaCCodeIdentifier* _tmp152_; ValaCCodeIdentifier* _tmp153_; ValaCCodeFunctionCall* _tmp154_; ValaCCodeFunctionCall* _tmp155_; ValaCCodeFunctionCall* _tmp156_; const gchar* _tmp157_; ValaCCodeIdentifier* _tmp158_; ValaCCodeIdentifier* _tmp159_; ValaCCodeUnaryExpression* _tmp160_; ValaCCodeUnaryExpression* _tmp161_; ValaCCodeFunctionCall* _tmp162_; ValaCCodeFunction* _tmp163_; ValaCCodeFunction* _tmp164_; ValaCCodeFunctionCall* _tmp165_; ValaCCodeIdentifier* _tmp166_; ValaCCodeIdentifier* _tmp167_; ValaCCodeFunctionCall* _tmp168_; ValaCCodeFunctionCall* _tmp169_; const gchar* _tmp170_; ValaCCodeIdentifier* _tmp171_; ValaCCodeIdentifier* _tmp172_; ValaCCodeUnaryExpression* _tmp173_; ValaCCodeUnaryExpression* _tmp174_; ValaCCodeFunctionCall* _tmp175_; ValaCCodeConstant* _tmp176_; ValaCCodeConstant* _tmp177_; ValaCCodeFunctionCall* _tmp178_; const gchar* _tmp179_; ValaCCodeIdentifier* _tmp180_; ValaCCodeIdentifier* _tmp181_; ValaCCodeUnaryExpression* _tmp182_; ValaCCodeUnaryExpression* _tmp183_; ValaCCodeFunctionCall* _tmp184_; const gchar* _tmp185_; ValaCCodeIdentifier* _tmp186_; ValaCCodeIdentifier* _tmp187_; ValaCCodeUnaryExpression* _tmp188_; ValaCCodeUnaryExpression* _tmp189_; ValaCCodeFunction* _tmp190_; ValaCCodeFunction* _tmp191_; ValaCCodeFunctionCall* _tmp192_; ValaCCodeExpression* key_expr = NULL; ValaDataType* _tmp193_; const gchar* _tmp194_; ValaCCodeIdentifier* _tmp195_; ValaCCodeIdentifier* _tmp196_; ValaCCodeExpression* _tmp197_; ValaCCodeExpression* _tmp198_; ValaCCodeExpression* value_expr = NULL; ValaDataType* _tmp199_; const gchar* _tmp200_; ValaCCodeIdentifier* _tmp201_; ValaCCodeIdentifier* _tmp202_; ValaCCodeExpression* _tmp203_; ValaCCodeExpression* _tmp204_; gboolean _tmp205_ = FALSE; ValaCCodeExpression* _tmp206_; ValaCCodeFunctionCall* hash_table_insert = NULL; ValaCCodeIdentifier* _tmp208_; ValaCCodeIdentifier* _tmp209_; ValaCCodeFunctionCall* _tmp210_; ValaCCodeFunctionCall* _tmp211_; ValaCCodeFunctionCall* _tmp212_; const gchar* _tmp213_; ValaCCodeIdentifier* _tmp214_; ValaCCodeIdentifier* _tmp215_; ValaCCodeFunctionCall* _tmp216_; ValaCCodeExpression* _tmp217_; ValaDataType* _tmp218_; ValaCCodeExpression* _tmp219_; ValaCCodeExpression* _tmp220_; ValaCCodeFunctionCall* _tmp221_; ValaCCodeExpression* _tmp222_; ValaDataType* _tmp223_; ValaCCodeExpression* _tmp224_; ValaCCodeExpression* _tmp225_; ValaCCodeFunction* _tmp226_; ValaCCodeFunction* _tmp227_; ValaCCodeFunctionCall* _tmp228_; ValaCCodeFunction* _tmp229_; ValaCCodeFunction* _tmp230_; const gchar* _tmp231_; ValaCCodeIdentifier* _tmp232_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (type != NULL, NULL); g_return_val_if_fail (variant_expr != NULL, NULL); _tmp0_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp1_ = _tmp0_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp1_ + 1); _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_); temp_name = _tmp2_; _tmp3_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp4_ = _tmp3_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp4_ + 1); _tmp5_ = g_strdup_printf ("_tmp%d_", _tmp4_); subiter_name = _tmp5_; _tmp6_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp7_ = _tmp6_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp7_ + 1); _tmp8_ = g_strdup_printf ("_tmp%d_", _tmp7_); key_name = _tmp8_; _tmp9_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp10_ = _tmp9_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp10_ + 1); _tmp11_ = g_strdup_printf ("_tmp%d_", _tmp10_); value_name = _tmp11_; _tmp12_ = vala_data_type_get_type_arguments ((ValaDataType*) type); _tmp13_ = _vala_iterable_ref0 (_tmp12_); type_args = _tmp13_; _tmp14_ = type_args; _tmp15_ = vala_collection_get_size ((ValaCollection*) _tmp14_); _tmp16_ = _tmp15_; if (_tmp16_ != 2) { ValaSourceReference* _tmp17_; ValaSourceReference* _tmp18_; ValaTypeSymbol* _tmp19_; ValaTypeSymbol* _tmp20_; gchar* _tmp21_; gchar* _tmp22_; gchar* _tmp23_; gchar* _tmp24_; ValaCCodeInvalidExpression* _tmp25_; _tmp17_ = vala_code_node_get_source_reference ((ValaCodeNode*) type); _tmp18_ = _tmp17_; _tmp19_ = vala_data_type_get_type_symbol ((ValaDataType*) type); _tmp20_ = _tmp19_; _tmp21_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp20_); _tmp22_ = _tmp21_; _tmp23_ = g_strdup_printf ("Missing type-arguments for GVariant deserialization of `%s'", _tmp22_); _tmp24_ = _tmp23_; vala_report_error (_tmp18_, _tmp24_); _g_free0 (_tmp24_); _g_free0 (_tmp22_); _tmp25_ = vala_ccode_invalid_expression_new (); result = (ValaCCodeExpression*) _tmp25_; _vala_iterable_unref0 (type_args); _g_free0 (value_name); _g_free0 (key_name); _g_free0 (subiter_name); _g_free0 (temp_name); return result; } _tmp26_ = type_args; _tmp27_ = vala_list_get (_tmp26_, 0); key_type = (ValaDataType*) _tmp27_; _tmp28_ = type_args; _tmp29_ = vala_list_get (_tmp28_, 1); value_type = (ValaDataType*) _tmp29_; _tmp30_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp31_ = _tmp30_; _tmp32_ = temp_name; _tmp33_ = vala_ccode_variable_declarator_new (_tmp32_, NULL, NULL); _tmp34_ = _tmp33_; vala_ccode_function_add_declaration (_tmp31_, "GHashTable*", (ValaCCodeDeclarator*) _tmp34_, 0); _vala_ccode_node_unref0 (_tmp34_); _tmp35_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp36_ = _tmp35_; _tmp37_ = subiter_name; _tmp38_ = vala_ccode_variable_declarator_new (_tmp37_, NULL, NULL); _tmp39_ = _tmp38_; vala_ccode_function_add_declaration (_tmp36_, "GVariantIter", (ValaCCodeDeclarator*) _tmp39_, 0); _vala_ccode_node_unref0 (_tmp39_); _tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp41_ = _tmp40_; _tmp42_ = key_name; _tmp43_ = vala_ccode_variable_declarator_new (_tmp42_, NULL, NULL); _tmp44_ = _tmp43_; vala_ccode_function_add_declaration (_tmp41_, "GVariant*", (ValaCCodeDeclarator*) _tmp44_, 0); _vala_ccode_node_unref0 (_tmp44_); _tmp45_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp46_ = _tmp45_; _tmp47_ = value_name; _tmp48_ = vala_ccode_variable_declarator_new (_tmp47_, NULL, NULL); _tmp49_ = _tmp48_; vala_ccode_function_add_declaration (_tmp46_, "GVariant*", (ValaCCodeDeclarator*) _tmp49_, 0); _vala_ccode_node_unref0 (_tmp49_); _tmp50_ = vala_ccode_identifier_new ("g_hash_table_new_full"); _tmp51_ = _tmp50_; _tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp51_); _tmp53_ = _tmp52_; _vala_ccode_node_unref0 (_tmp51_); hash_table_new = _tmp53_; _tmp54_ = key_type; _tmp55_ = vala_data_type_get_type_symbol (_tmp54_); _tmp56_ = _tmp55_; _tmp57_ = ((ValaCCodeBaseModule*) self)->string_type; _tmp58_ = vala_data_type_get_type_symbol (_tmp57_); _tmp59_ = _tmp58_; if (vala_typesymbol_is_subtype_of (_tmp56_, _tmp59_)) { ValaCCodeFunctionCall* _tmp60_; ValaCCodeIdentifier* _tmp61_; ValaCCodeIdentifier* _tmp62_; ValaCCodeFunctionCall* _tmp63_; ValaCCodeIdentifier* _tmp64_; ValaCCodeIdentifier* _tmp65_; _tmp60_ = hash_table_new; _tmp61_ = vala_ccode_identifier_new ("g_str_hash"); _tmp62_ = _tmp61_; vala_ccode_function_call_add_argument (_tmp60_, (ValaCCodeExpression*) _tmp62_); _vala_ccode_node_unref0 (_tmp62_); _tmp63_ = hash_table_new; _tmp64_ = vala_ccode_identifier_new ("g_str_equal"); _tmp65_ = _tmp64_; vala_ccode_function_call_add_argument (_tmp63_, (ValaCCodeExpression*) _tmp65_); _vala_ccode_node_unref0 (_tmp65_); } else { ValaDataType* _tmp66_; ValaTypeSymbol* _tmp67_; ValaTypeSymbol* _tmp68_; ValaClass* _tmp69_; _tmp66_ = key_type; _tmp67_ = vala_data_type_get_type_symbol (_tmp66_); _tmp68_ = _tmp67_; _tmp69_ = ((ValaCCodeBaseModule*) self)->gvariant_type; if (_tmp68_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp69_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol)) { ValaCCodeFunctionCall* _tmp70_; ValaCCodeIdentifier* _tmp71_; ValaCCodeIdentifier* _tmp72_; ValaCCodeFunctionCall* _tmp73_; ValaCCodeIdentifier* _tmp74_; ValaCCodeIdentifier* _tmp75_; _tmp70_ = hash_table_new; _tmp71_ = vala_ccode_identifier_new ("g_variant_hash"); _tmp72_ = _tmp71_; vala_ccode_function_call_add_argument (_tmp70_, (ValaCCodeExpression*) _tmp72_); _vala_ccode_node_unref0 (_tmp72_); _tmp73_ = hash_table_new; _tmp74_ = vala_ccode_identifier_new ("g_variant_equal"); _tmp75_ = _tmp74_; vala_ccode_function_call_add_argument (_tmp73_, (ValaCCodeExpression*) _tmp75_); _vala_ccode_node_unref0 (_tmp75_); } else { ValaCCodeFunctionCall* _tmp76_; ValaCCodeIdentifier* _tmp77_; ValaCCodeIdentifier* _tmp78_; ValaCCodeFunctionCall* _tmp79_; ValaCCodeIdentifier* _tmp80_; ValaCCodeIdentifier* _tmp81_; _tmp76_ = hash_table_new; _tmp77_ = vala_ccode_identifier_new ("g_direct_hash"); _tmp78_ = _tmp77_; vala_ccode_function_call_add_argument (_tmp76_, (ValaCCodeExpression*) _tmp78_); _vala_ccode_node_unref0 (_tmp78_); _tmp79_ = hash_table_new; _tmp80_ = vala_ccode_identifier_new ("g_direct_equal"); _tmp81_ = _tmp80_; vala_ccode_function_call_add_argument (_tmp79_, (ValaCCodeExpression*) _tmp81_); _vala_ccode_node_unref0 (_tmp81_); } } _tmp82_ = key_type; _tmp83_ = vala_data_type_get_type_symbol (_tmp82_); _tmp84_ = _tmp83_; _tmp85_ = ((ValaCCodeBaseModule*) self)->string_type; _tmp86_ = vala_data_type_get_type_symbol (_tmp85_); _tmp87_ = _tmp86_; if (vala_typesymbol_is_subtype_of (_tmp84_, _tmp87_)) { ValaCCodeFunctionCall* _tmp88_; ValaCCodeIdentifier* _tmp89_; ValaCCodeIdentifier* _tmp90_; _tmp88_ = hash_table_new; _tmp89_ = vala_ccode_identifier_new ("g_free"); _tmp90_ = _tmp89_; vala_ccode_function_call_add_argument (_tmp88_, (ValaCCodeExpression*) _tmp90_); _vala_ccode_node_unref0 (_tmp90_); } else { ValaDataType* _tmp91_; ValaTypeSymbol* _tmp92_; ValaTypeSymbol* _tmp93_; ValaClass* _tmp94_; _tmp91_ = key_type; _tmp92_ = vala_data_type_get_type_symbol (_tmp91_); _tmp93_ = _tmp92_; _tmp94_ = ((ValaCCodeBaseModule*) self)->gvariant_type; if (_tmp93_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp94_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol)) { ValaCCodeFunctionCall* _tmp95_; ValaCCodeIdentifier* _tmp96_; ValaCCodeIdentifier* _tmp97_; ValaCCodeCastExpression* _tmp98_; ValaCCodeCastExpression* _tmp99_; _tmp95_ = hash_table_new; _tmp96_ = vala_ccode_identifier_new ("g_variant_unref"); _tmp97_ = _tmp96_; _tmp98_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp97_, "GDestroyNotify"); _tmp99_ = _tmp98_; vala_ccode_function_call_add_argument (_tmp95_, (ValaCCodeExpression*) _tmp99_); _vala_ccode_node_unref0 (_tmp99_); _vala_ccode_node_unref0 (_tmp97_); } else { ValaDataType* _tmp100_; ValaTypeSymbol* _tmp101_; ValaTypeSymbol* _tmp102_; gchar* _tmp103_; gchar* _tmp104_; gboolean _tmp105_; _tmp100_ = key_type; _tmp101_ = vala_data_type_get_type_symbol (_tmp100_); _tmp102_ = _tmp101_; _tmp103_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp102_); _tmp104_ = _tmp103_; _tmp105_ = g_strcmp0 (_tmp104_, "GLib.HashTable") == 0; _g_free0 (_tmp104_); if (_tmp105_) { ValaCCodeFunctionCall* _tmp106_; ValaCCodeIdentifier* _tmp107_; ValaCCodeIdentifier* _tmp108_; ValaCCodeCastExpression* _tmp109_; ValaCCodeCastExpression* _tmp110_; _tmp106_ = hash_table_new; _tmp107_ = vala_ccode_identifier_new ("g_hash_table_unref"); _tmp108_ = _tmp107_; _tmp109_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp108_, "GDestroyNotify"); _tmp110_ = _tmp109_; vala_ccode_function_call_add_argument (_tmp106_, (ValaCCodeExpression*) _tmp110_); _vala_ccode_node_unref0 (_tmp110_); _vala_ccode_node_unref0 (_tmp108_); } else { ValaCCodeFunctionCall* _tmp111_; ValaCCodeConstant* _tmp112_; ValaCCodeConstant* _tmp113_; _tmp111_ = hash_table_new; _tmp112_ = vala_ccode_constant_new ("NULL"); _tmp113_ = _tmp112_; vala_ccode_function_call_add_argument (_tmp111_, (ValaCCodeExpression*) _tmp113_); _vala_ccode_node_unref0 (_tmp113_); } } } _tmp114_ = value_type; _tmp115_ = vala_data_type_get_type_symbol (_tmp114_); _tmp116_ = _tmp115_; _tmp117_ = ((ValaCCodeBaseModule*) self)->string_type; _tmp118_ = vala_data_type_get_type_symbol (_tmp117_); _tmp119_ = _tmp118_; if (vala_typesymbol_is_subtype_of (_tmp116_, _tmp119_)) { ValaCCodeFunctionCall* _tmp120_; ValaCCodeIdentifier* _tmp121_; ValaCCodeIdentifier* _tmp122_; _tmp120_ = hash_table_new; _tmp121_ = vala_ccode_identifier_new ("g_free"); _tmp122_ = _tmp121_; vala_ccode_function_call_add_argument (_tmp120_, (ValaCCodeExpression*) _tmp122_); _vala_ccode_node_unref0 (_tmp122_); } else { ValaDataType* _tmp123_; ValaTypeSymbol* _tmp124_; ValaTypeSymbol* _tmp125_; ValaClass* _tmp126_; _tmp123_ = value_type; _tmp124_ = vala_data_type_get_type_symbol (_tmp123_); _tmp125_ = _tmp124_; _tmp126_ = ((ValaCCodeBaseModule*) self)->gvariant_type; if (_tmp125_ == G_TYPE_CHECK_INSTANCE_CAST (_tmp126_, VALA_TYPE_TYPESYMBOL, ValaTypeSymbol)) { ValaCCodeFunctionCall* _tmp127_; ValaCCodeIdentifier* _tmp128_; ValaCCodeIdentifier* _tmp129_; ValaCCodeCastExpression* _tmp130_; ValaCCodeCastExpression* _tmp131_; _tmp127_ = hash_table_new; _tmp128_ = vala_ccode_identifier_new ("g_variant_unref"); _tmp129_ = _tmp128_; _tmp130_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp129_, "GDestroyNotify"); _tmp131_ = _tmp130_; vala_ccode_function_call_add_argument (_tmp127_, (ValaCCodeExpression*) _tmp131_); _vala_ccode_node_unref0 (_tmp131_); _vala_ccode_node_unref0 (_tmp129_); } else { ValaDataType* _tmp132_; ValaTypeSymbol* _tmp133_; ValaTypeSymbol* _tmp134_; gchar* _tmp135_; gchar* _tmp136_; gboolean _tmp137_; _tmp132_ = value_type; _tmp133_ = vala_data_type_get_type_symbol (_tmp132_); _tmp134_ = _tmp133_; _tmp135_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp134_); _tmp136_ = _tmp135_; _tmp137_ = g_strcmp0 (_tmp136_, "GLib.HashTable") == 0; _g_free0 (_tmp136_); if (_tmp137_) { ValaCCodeFunctionCall* _tmp138_; ValaCCodeIdentifier* _tmp139_; ValaCCodeIdentifier* _tmp140_; ValaCCodeCastExpression* _tmp141_; ValaCCodeCastExpression* _tmp142_; _tmp138_ = hash_table_new; _tmp139_ = vala_ccode_identifier_new ("g_hash_table_unref"); _tmp140_ = _tmp139_; _tmp141_ = vala_ccode_cast_expression_new ((ValaCCodeExpression*) _tmp140_, "GDestroyNotify"); _tmp142_ = _tmp141_; vala_ccode_function_call_add_argument (_tmp138_, (ValaCCodeExpression*) _tmp142_); _vala_ccode_node_unref0 (_tmp142_); _vala_ccode_node_unref0 (_tmp140_); } else { ValaCCodeFunctionCall* _tmp143_; ValaCCodeConstant* _tmp144_; ValaCCodeConstant* _tmp145_; _tmp143_ = hash_table_new; _tmp144_ = vala_ccode_constant_new ("NULL"); _tmp145_ = _tmp144_; vala_ccode_function_call_add_argument (_tmp143_, (ValaCCodeExpression*) _tmp145_); _vala_ccode_node_unref0 (_tmp145_); } } } _tmp146_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp147_ = _tmp146_; _tmp148_ = temp_name; _tmp149_ = vala_ccode_identifier_new (_tmp148_); _tmp150_ = _tmp149_; _tmp151_ = hash_table_new; vala_ccode_function_add_assignment (_tmp147_, (ValaCCodeExpression*) _tmp150_, (ValaCCodeExpression*) _tmp151_); _vala_ccode_node_unref0 (_tmp150_); _tmp152_ = vala_ccode_identifier_new ("g_variant_iter_init"); _tmp153_ = _tmp152_; _tmp154_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp153_); _tmp155_ = _tmp154_; _vala_ccode_node_unref0 (_tmp153_); iter_call = _tmp155_; _tmp156_ = iter_call; _tmp157_ = subiter_name; _tmp158_ = vala_ccode_identifier_new (_tmp157_); _tmp159_ = _tmp158_; _tmp160_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp159_); _tmp161_ = _tmp160_; vala_ccode_function_call_add_argument (_tmp156_, (ValaCCodeExpression*) _tmp161_); _vala_ccode_node_unref0 (_tmp161_); _vala_ccode_node_unref0 (_tmp159_); _tmp162_ = iter_call; vala_ccode_function_call_add_argument (_tmp162_, variant_expr); _tmp163_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp164_ = _tmp163_; _tmp165_ = iter_call; vala_ccode_function_add_expression (_tmp164_, (ValaCCodeExpression*) _tmp165_); _tmp166_ = vala_ccode_identifier_new ("g_variant_iter_loop"); _tmp167_ = _tmp166_; _tmp168_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp167_); _vala_ccode_node_unref0 (iter_call); iter_call = _tmp168_; _vala_ccode_node_unref0 (_tmp167_); _tmp169_ = iter_call; _tmp170_ = subiter_name; _tmp171_ = vala_ccode_identifier_new (_tmp170_); _tmp172_ = _tmp171_; _tmp173_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp172_); _tmp174_ = _tmp173_; vala_ccode_function_call_add_argument (_tmp169_, (ValaCCodeExpression*) _tmp174_); _vala_ccode_node_unref0 (_tmp174_); _vala_ccode_node_unref0 (_tmp172_); _tmp175_ = iter_call; _tmp176_ = vala_ccode_constant_new ("\"{?*}\""); _tmp177_ = _tmp176_; vala_ccode_function_call_add_argument (_tmp175_, (ValaCCodeExpression*) _tmp177_); _vala_ccode_node_unref0 (_tmp177_); _tmp178_ = iter_call; _tmp179_ = key_name; _tmp180_ = vala_ccode_identifier_new (_tmp179_); _tmp181_ = _tmp180_; _tmp182_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp181_); _tmp183_ = _tmp182_; vala_ccode_function_call_add_argument (_tmp178_, (ValaCCodeExpression*) _tmp183_); _vala_ccode_node_unref0 (_tmp183_); _vala_ccode_node_unref0 (_tmp181_); _tmp184_ = iter_call; _tmp185_ = value_name; _tmp186_ = vala_ccode_identifier_new (_tmp185_); _tmp187_ = _tmp186_; _tmp188_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp187_); _tmp189_ = _tmp188_; vala_ccode_function_call_add_argument (_tmp184_, (ValaCCodeExpression*) _tmp189_); _vala_ccode_node_unref0 (_tmp189_); _vala_ccode_node_unref0 (_tmp187_); _tmp190_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp191_ = _tmp190_; _tmp192_ = iter_call; vala_ccode_function_open_while (_tmp191_, (ValaCCodeExpression*) _tmp192_); _tmp193_ = key_type; _tmp194_ = key_name; _tmp195_ = vala_ccode_identifier_new (_tmp194_); _tmp196_ = _tmp195_; _tmp197_ = vala_ccode_base_module_deserialize_expression ((ValaCCodeBaseModule*) self, _tmp193_, (ValaCCodeExpression*) _tmp196_, NULL, NULL, NULL); _tmp198_ = _tmp197_; _vala_ccode_node_unref0 (_tmp196_); key_expr = _tmp198_; _tmp199_ = value_type; _tmp200_ = value_name; _tmp201_ = vala_ccode_identifier_new (_tmp200_); _tmp202_ = _tmp201_; _tmp203_ = vala_ccode_base_module_deserialize_expression ((ValaCCodeBaseModule*) self, _tmp199_, (ValaCCodeExpression*) _tmp202_, NULL, NULL, NULL); _tmp204_ = _tmp203_; _vala_ccode_node_unref0 (_tmp202_); value_expr = _tmp204_; _tmp206_ = key_expr; if (_tmp206_ == NULL) { _tmp205_ = TRUE; } else { ValaCCodeExpression* _tmp207_; _tmp207_ = value_expr; _tmp205_ = _tmp207_ == NULL; } if (_tmp205_) { result = NULL; _vala_ccode_node_unref0 (value_expr); _vala_ccode_node_unref0 (key_expr); _vala_ccode_node_unref0 (iter_call); _vala_ccode_node_unref0 (hash_table_new); _vala_code_node_unref0 (value_type); _vala_code_node_unref0 (key_type); _vala_iterable_unref0 (type_args); _g_free0 (value_name); _g_free0 (key_name); _g_free0 (subiter_name); _g_free0 (temp_name); return result; } _tmp208_ = vala_ccode_identifier_new ("g_hash_table_insert"); _tmp209_ = _tmp208_; _tmp210_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp209_); _tmp211_ = _tmp210_; _vala_ccode_node_unref0 (_tmp209_); hash_table_insert = _tmp211_; _tmp212_ = hash_table_insert; _tmp213_ = temp_name; _tmp214_ = vala_ccode_identifier_new (_tmp213_); _tmp215_ = _tmp214_; vala_ccode_function_call_add_argument (_tmp212_, (ValaCCodeExpression*) _tmp215_); _vala_ccode_node_unref0 (_tmp215_); _tmp216_ = hash_table_insert; _tmp217_ = key_expr; _tmp218_ = key_type; _tmp219_ = vala_ccode_base_module_convert_to_generic_pointer ((ValaCCodeBaseModule*) self, _tmp217_, _tmp218_); _tmp220_ = _tmp219_; vala_ccode_function_call_add_argument (_tmp216_, _tmp220_); _vala_ccode_node_unref0 (_tmp220_); _tmp221_ = hash_table_insert; _tmp222_ = value_expr; _tmp223_ = value_type; _tmp224_ = vala_ccode_base_module_convert_to_generic_pointer ((ValaCCodeBaseModule*) self, _tmp222_, _tmp223_); _tmp225_ = _tmp224_; vala_ccode_function_call_add_argument (_tmp221_, _tmp225_); _vala_ccode_node_unref0 (_tmp225_); _tmp226_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp227_ = _tmp226_; _tmp228_ = hash_table_insert; vala_ccode_function_add_expression (_tmp227_, (ValaCCodeExpression*) _tmp228_); _tmp229_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp230_ = _tmp229_; vala_ccode_function_close (_tmp230_); _tmp231_ = temp_name; _tmp232_ = vala_ccode_identifier_new (_tmp231_); result = (ValaCCodeExpression*) _tmp232_; _vala_ccode_node_unref0 (hash_table_insert); _vala_ccode_node_unref0 (value_expr); _vala_ccode_node_unref0 (key_expr); _vala_ccode_node_unref0 (iter_call); _vala_ccode_node_unref0 (hash_table_new); _vala_code_node_unref0 (value_type); _vala_code_node_unref0 (key_type); _vala_iterable_unref0 (type_args); _g_free0 (value_name); _g_free0 (key_name); _g_free0 (subiter_name); _g_free0 (temp_name); return result; } static ValaCCodeExpression* vala_gvariant_module_real_deserialize_expression (ValaCCodeBaseModule* base, ValaDataType* type, ValaCCodeExpression* variant_expr, ValaCCodeExpression* expr, ValaCCodeExpression* error_expr, gboolean* may_fail) { ValaGVariantModule * self; gboolean _vala_may_fail = FALSE; ValaGVariantModuleBasicTypeInfo basic_type = {0}; ValaCCodeExpression* _result_ = NULL; ValaTypeSymbol* _tmp0_; ValaTypeSymbol* _tmp1_; ValaCCodeExpression* _tmp65_; ValaCCodeExpression* result = NULL; self = (ValaGVariantModule*) base; g_return_val_if_fail (type != NULL, NULL); g_return_val_if_fail (variant_expr != NULL, NULL); _result_ = NULL; _vala_may_fail = FALSE; _tmp0_ = vala_data_type_get_type_symbol (type); _tmp1_ = _tmp0_; if (vala_gvariant_module_is_string_marshalled_enum (_tmp1_)) { ValaGVariantModuleBasicTypeInfo _tmp2_ = {0}; ValaGVariantModuleBasicTypeInfo _tmp3_; ValaCCodeExpression* _tmp4_; ValaCCodeExpression* _tmp5_; ValaCCodeExpression* _tmp6_; vala_gvariant_module_get_basic_type_info (self, "s", &_tmp2_); basic_type = _tmp2_; _tmp3_ = basic_type; _tmp4_ = vala_gvariant_module_deserialize_basic (self, &_tmp3_, variant_expr, TRUE); _vala_ccode_node_unref0 (_result_); _result_ = _tmp4_; _tmp5_ = _result_; _tmp6_ = vala_gvariant_module_generate_enum_value_from_string (self, G_TYPE_CHECK_INSTANCE_TYPE (type, VALA_TYPE_ENUM_VALUE_TYPE) ? ((ValaEnumValueType*) type) : NULL, _tmp5_, error_expr); _vala_ccode_node_unref0 (_result_); _result_ = _tmp6_; _vala_may_fail = TRUE; } else { gchar* _tmp7_; gchar* _tmp8_; ValaGVariantModuleBasicTypeInfo _tmp9_ = {0}; gboolean _tmp10_; gboolean _tmp11_; _tmp7_ = vala_data_type_get_type_signature (type, NULL); _tmp8_ = _tmp7_; _tmp10_ = vala_gvariant_module_get_basic_type_info (self, _tmp8_, &_tmp9_); basic_type = _tmp9_; _tmp11_ = _tmp10_; _g_free0 (_tmp8_); if (_tmp11_) { ValaGVariantModuleBasicTypeInfo _tmp12_; ValaCCodeExpression* _tmp13_; _tmp12_ = basic_type; _tmp13_ = vala_gvariant_module_deserialize_basic (self, &_tmp12_, variant_expr, FALSE); _vala_ccode_node_unref0 (_result_); _result_ = _tmp13_; } else { if (G_TYPE_CHECK_INSTANCE_TYPE (type, VALA_TYPE_ARRAY_TYPE)) { ValaCCodeExpression* _tmp14_; _tmp14_ = vala_gvariant_module_deserialize_array (self, G_TYPE_CHECK_INSTANCE_CAST (type, VALA_TYPE_ARRAY_TYPE, ValaArrayType), variant_expr, expr); _vala_ccode_node_unref0 (_result_); _result_ = _tmp14_; } else { ValaTypeSymbol* _tmp15_; ValaTypeSymbol* _tmp16_; _tmp15_ = vala_data_type_get_type_symbol (type); _tmp16_ = _tmp15_; if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, VALA_TYPE_STRUCT)) { ValaStruct* st = NULL; ValaTypeSymbol* _tmp17_; ValaTypeSymbol* _tmp18_; ValaStruct* _tmp19_; ValaCCodeExpression* _tmp20_; gboolean _tmp21_ = FALSE; ValaCCodeExpression* _tmp22_; _tmp17_ = vala_data_type_get_type_symbol (type); _tmp18_ = _tmp17_; st = G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, VALA_TYPE_STRUCT, ValaStruct); _tmp19_ = st; _tmp20_ = vala_gvariant_module_deserialize_struct (self, _tmp19_, variant_expr); _vala_ccode_node_unref0 (_result_); _result_ = _tmp20_; _tmp22_ = _result_; if (_tmp22_ != NULL) { gboolean _tmp23_; gboolean _tmp24_; _tmp23_ = vala_data_type_get_nullable (type); _tmp24_ = _tmp23_; _tmp21_ = _tmp24_; } else { _tmp21_ = FALSE; } if (_tmp21_) { ValaCCodeFunctionCall* csizeof = NULL; ValaCCodeIdentifier* _tmp25_; ValaCCodeIdentifier* _tmp26_; ValaCCodeFunctionCall* _tmp27_; ValaCCodeFunctionCall* _tmp28_; ValaCCodeFunctionCall* _tmp29_; ValaStruct* _tmp30_; gchar* _tmp31_; gchar* _tmp32_; ValaCCodeIdentifier* _tmp33_; ValaCCodeIdentifier* _tmp34_; ValaCCodeFunctionCall* cdup = NULL; ValaCCodeIdentifier* _tmp35_; ValaCCodeIdentifier* _tmp36_; ValaCCodeFunctionCall* _tmp37_; ValaCCodeFunctionCall* _tmp38_; ValaCCodeFunctionCall* _tmp39_; ValaCCodeExpression* _tmp40_; ValaCCodeUnaryExpression* _tmp41_; ValaCCodeUnaryExpression* _tmp42_; ValaCCodeFunctionCall* _tmp43_; ValaCCodeFunctionCall* _tmp44_; ValaCCodeFunctionCall* _tmp45_; ValaCCodeExpression* _tmp46_; _tmp25_ = vala_ccode_identifier_new ("sizeof"); _tmp26_ = _tmp25_; _tmp27_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp26_); _tmp28_ = _tmp27_; _vala_ccode_node_unref0 (_tmp26_); csizeof = _tmp28_; _tmp29_ = csizeof; _tmp30_ = st; _tmp31_ = vala_get_ccode_name ((ValaCodeNode*) _tmp30_); _tmp32_ = _tmp31_; _tmp33_ = vala_ccode_identifier_new (_tmp32_); _tmp34_ = _tmp33_; vala_ccode_function_call_add_argument (_tmp29_, (ValaCCodeExpression*) _tmp34_); _vala_ccode_node_unref0 (_tmp34_); _g_free0 (_tmp32_); _tmp35_ = vala_ccode_identifier_new ("g_memdup"); _tmp36_ = _tmp35_; _tmp37_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp36_); _tmp38_ = _tmp37_; _vala_ccode_node_unref0 (_tmp36_); cdup = _tmp38_; _tmp39_ = cdup; _tmp40_ = _result_; _tmp41_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, _tmp40_); _tmp42_ = _tmp41_; vala_ccode_function_call_add_argument (_tmp39_, (ValaCCodeExpression*) _tmp42_); _vala_ccode_node_unref0 (_tmp42_); _tmp43_ = cdup; _tmp44_ = csizeof; vala_ccode_function_call_add_argument (_tmp43_, (ValaCCodeExpression*) _tmp44_); _tmp45_ = cdup; _tmp46_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp45_); _vala_ccode_node_unref0 (_result_); _result_ = _tmp46_; _vala_ccode_node_unref0 (cdup); _vala_ccode_node_unref0 (csizeof); } } else { if (G_TYPE_CHECK_INSTANCE_TYPE (type, VALA_TYPE_OBJECT_TYPE)) { ValaTypeSymbol* _tmp47_; ValaTypeSymbol* _tmp48_; gchar* _tmp49_; gchar* _tmp50_; gboolean _tmp51_; _tmp47_ = vala_data_type_get_type_symbol (type); _tmp48_ = _tmp47_; _tmp49_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp48_); _tmp50_ = _tmp49_; _tmp51_ = g_strcmp0 (_tmp50_, "GLib.Variant") == 0; _g_free0 (_tmp50_); if (_tmp51_) { ValaCCodeFunctionCall* variant_get = NULL; ValaCCodeIdentifier* _tmp52_; ValaCCodeIdentifier* _tmp53_; ValaCCodeFunctionCall* _tmp54_; ValaCCodeFunctionCall* _tmp55_; ValaCCodeFunctionCall* _tmp56_; ValaCCodeFunctionCall* _tmp57_; ValaCCodeExpression* _tmp58_; _tmp52_ = vala_ccode_identifier_new ("g_variant_get_variant"); _tmp53_ = _tmp52_; _tmp54_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp53_); _tmp55_ = _tmp54_; _vala_ccode_node_unref0 (_tmp53_); variant_get = _tmp55_; _tmp56_ = variant_get; vala_ccode_function_call_add_argument (_tmp56_, variant_expr); _tmp57_ = variant_get; _tmp58_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp57_); _vala_ccode_node_unref0 (_result_); _result_ = _tmp58_; _vala_ccode_node_unref0 (variant_get); } else { ValaTypeSymbol* _tmp59_; ValaTypeSymbol* _tmp60_; gchar* _tmp61_; gchar* _tmp62_; gboolean _tmp63_; _tmp59_ = vala_data_type_get_type_symbol (type); _tmp60_ = _tmp59_; _tmp61_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp60_); _tmp62_ = _tmp61_; _tmp63_ = g_strcmp0 (_tmp62_, "GLib.HashTable") == 0; _g_free0 (_tmp62_); if (_tmp63_) { ValaCCodeExpression* _tmp64_; _tmp64_ = vala_gvariant_module_deserialize_hash_table (self, G_TYPE_CHECK_INSTANCE_CAST (type, VALA_TYPE_OBJECT_TYPE, ValaObjectType), variant_expr); _vala_ccode_node_unref0 (_result_); _result_ = _tmp64_; } } } } } } } _tmp65_ = _result_; if (_tmp65_ == NULL) { ValaSourceReference* _tmp66_; ValaSourceReference* _tmp67_; gchar* _tmp68_; gchar* _tmp69_; gchar* _tmp70_; gchar* _tmp71_; ValaCCodeInvalidExpression* _tmp72_; _tmp66_ = vala_code_node_get_source_reference ((ValaCodeNode*) type); _tmp67_ = _tmp66_; _tmp68_ = vala_code_node_to_string ((ValaCodeNode*) type); _tmp69_ = _tmp68_; _tmp70_ = g_strdup_printf ("GVariant deserialization of type `%s' is not supported", _tmp69_); _tmp71_ = _tmp70_; vala_report_error (_tmp67_, _tmp71_); _g_free0 (_tmp71_); _g_free0 (_tmp69_); _tmp72_ = vala_ccode_invalid_expression_new (); result = (ValaCCodeExpression*) _tmp72_; _vala_ccode_node_unref0 (_result_); if (may_fail) { *may_fail = _vala_may_fail; } return result; } result = _result_; if (may_fail) { *may_fail = _vala_may_fail; } return result; } void vala_gvariant_module_read_expression (ValaGVariantModule* self, ValaDataType* type, ValaCCodeExpression* iter_expr, ValaCCodeExpression* target_expr, ValaSymbol* sym, ValaCCodeExpression* error_expr, gboolean* may_fail) { gboolean _vala_may_fail = FALSE; ValaCCodeFunctionCall* iter_call = NULL; ValaCCodeIdentifier* _tmp0_; ValaCCodeIdentifier* _tmp1_; ValaCCodeFunctionCall* _tmp2_; ValaCCodeFunctionCall* _tmp3_; ValaCCodeFunctionCall* _tmp4_; ValaCCodeUnaryExpression* _tmp5_; ValaCCodeUnaryExpression* _tmp6_; gboolean _tmp7_ = FALSE; gchar* temp_name = NULL; gint _tmp13_; gint _tmp14_; gchar* _tmp15_; ValaCCodeFunction* _tmp16_; ValaCCodeFunction* _tmp17_; const gchar* _tmp18_; ValaCCodeVariableDeclarator* _tmp19_; ValaCCodeVariableDeclarator* _tmp20_; ValaCCodeIdentifier* variant_expr = NULL; const gchar* _tmp21_; ValaCCodeIdentifier* _tmp22_; ValaCCodeFunction* _tmp23_; ValaCCodeFunction* _tmp24_; ValaCCodeIdentifier* _tmp25_; ValaCCodeFunctionCall* _tmp26_; ValaCCodeExpression* _result_ = NULL; ValaCCodeIdentifier* _tmp27_; gboolean _tmp28_ = FALSE; ValaCCodeExpression* _tmp29_; ValaCCodeExpression* _tmp30_; ValaCCodeFunction* _tmp31_; ValaCCodeFunction* _tmp32_; ValaCCodeExpression* _tmp33_; ValaCCodeFunctionCall* unref = NULL; ValaCCodeIdentifier* _tmp34_; ValaCCodeIdentifier* _tmp35_; ValaCCodeFunctionCall* _tmp36_; ValaCCodeFunctionCall* _tmp37_; ValaCCodeFunctionCall* _tmp38_; ValaCCodeIdentifier* _tmp39_; ValaCCodeFunction* _tmp40_; ValaCCodeFunction* _tmp41_; ValaCCodeFunctionCall* _tmp42_; g_return_if_fail (self != NULL); g_return_if_fail (type != NULL); g_return_if_fail (iter_expr != NULL); g_return_if_fail (target_expr != NULL); _tmp0_ = vala_ccode_identifier_new ("g_variant_iter_next_value"); _tmp1_ = _tmp0_; _tmp2_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp1_); _tmp3_ = _tmp2_; _vala_ccode_node_unref0 (_tmp1_); iter_call = _tmp3_; _tmp4_ = iter_call; _tmp5_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, iter_expr); _tmp6_ = _tmp5_; vala_ccode_function_call_add_argument (_tmp4_, (ValaCCodeExpression*) _tmp6_); _vala_ccode_node_unref0 (_tmp6_); if (sym != NULL) { gchar* _tmp8_; gchar* _tmp9_; _tmp8_ = vala_gvariant_module_get_dbus_signature (sym); _tmp9_ = _tmp8_; _tmp7_ = _tmp9_ != NULL; _g_free0 (_tmp9_); } else { _tmp7_ = FALSE; } if (_tmp7_) { ValaCCodeFunction* _tmp10_; ValaCCodeFunction* _tmp11_; ValaCCodeFunctionCall* _tmp12_; _tmp10_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp11_ = _tmp10_; _tmp12_ = iter_call; vala_ccode_function_add_assignment (_tmp11_, target_expr, (ValaCCodeExpression*) _tmp12_); _vala_may_fail = FALSE; _vala_ccode_node_unref0 (iter_call); if (may_fail) { *may_fail = _vala_may_fail; } return; } _tmp13_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp14_ = _tmp13_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp14_ + 1); _tmp15_ = g_strdup_printf ("_tmp%d_", _tmp14_); temp_name = _tmp15_; _tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp17_ = _tmp16_; _tmp18_ = temp_name; _tmp19_ = vala_ccode_variable_declarator_new (_tmp18_, NULL, NULL); _tmp20_ = _tmp19_; vala_ccode_function_add_declaration (_tmp17_, "GVariant*", (ValaCCodeDeclarator*) _tmp20_, 0); _vala_ccode_node_unref0 (_tmp20_); _tmp21_ = temp_name; _tmp22_ = vala_ccode_identifier_new (_tmp21_); variant_expr = _tmp22_; _tmp23_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp24_ = _tmp23_; _tmp25_ = variant_expr; _tmp26_ = iter_call; vala_ccode_function_add_assignment (_tmp24_, (ValaCCodeExpression*) _tmp25_, (ValaCCodeExpression*) _tmp26_); _tmp27_ = variant_expr; _tmp29_ = vala_ccode_base_module_deserialize_expression ((ValaCCodeBaseModule*) self, type, (ValaCCodeExpression*) _tmp27_, target_expr, error_expr, &_tmp28_); _vala_may_fail = _tmp28_; _result_ = _tmp29_; _tmp30_ = _result_; if (_tmp30_ == NULL) { _vala_ccode_node_unref0 (_result_); _vala_ccode_node_unref0 (variant_expr); _g_free0 (temp_name); _vala_ccode_node_unref0 (iter_call); if (may_fail) { *may_fail = _vala_may_fail; } return; } _tmp31_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp32_ = _tmp31_; _tmp33_ = _result_; vala_ccode_function_add_assignment (_tmp32_, target_expr, _tmp33_); _tmp34_ = vala_ccode_identifier_new ("g_variant_unref"); _tmp35_ = _tmp34_; _tmp36_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp35_); _tmp37_ = _tmp36_; _vala_ccode_node_unref0 (_tmp35_); unref = _tmp37_; _tmp38_ = unref; _tmp39_ = variant_expr; vala_ccode_function_call_add_argument (_tmp38_, (ValaCCodeExpression*) _tmp39_); _tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp41_ = _tmp40_; _tmp42_ = unref; vala_ccode_function_add_expression (_tmp41_, (ValaCCodeExpression*) _tmp42_); _vala_ccode_node_unref0 (unref); _vala_ccode_node_unref0 (_result_); _vala_ccode_node_unref0 (variant_expr); _g_free0 (temp_name); _vala_ccode_node_unref0 (iter_call); if (may_fail) { *may_fail = _vala_may_fail; } } static ValaCCodeExpression* vala_gvariant_module_generate_enum_value_to_string (ValaGVariantModule* self, ValaEnumValueType* type, ValaCCodeExpression* expr) { ValaEnum* en = NULL; ValaTypeSymbol* _tmp0_; ValaTypeSymbol* _tmp1_; ValaEnum* _tmp2_; gchar* to_string_name = NULL; gchar* _tmp3_; gchar* _tmp4_; gchar* _tmp5_; gchar* _tmp6_; ValaCCodeFunctionCall* to_string_call = NULL; ValaCCodeIdentifier* _tmp7_; ValaCCodeIdentifier* _tmp8_; ValaCCodeFunctionCall* _tmp9_; ValaCCodeFunctionCall* _tmp10_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (type != NULL, NULL); _tmp0_ = vala_data_type_get_type_symbol ((ValaDataType*) type); _tmp1_ = _tmp0_; _tmp2_ = _vala_code_node_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, VALA_TYPE_ENUM) ? ((ValaEnum*) _tmp1_) : NULL); en = _tmp2_; _tmp3_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) en, NULL); _tmp4_ = _tmp3_; _tmp5_ = g_strdup_printf ("%s_to_string", _tmp4_); _tmp6_ = _tmp5_; _g_free0 (_tmp4_); to_string_name = _tmp6_; _tmp7_ = vala_ccode_identifier_new (to_string_name); _tmp8_ = _tmp7_; _tmp9_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp8_); _tmp10_ = _tmp9_; _vala_ccode_node_unref0 (_tmp8_); to_string_call = _tmp10_; vala_ccode_function_call_add_argument (to_string_call, expr); result = (ValaCCodeExpression*) to_string_call; _g_free0 (to_string_name); _vala_code_node_unref0 (en); return result; } ValaCCodeFunction* vala_gvariant_module_generate_enum_to_string_function_declaration (ValaGVariantModule* self, ValaEnum* en) { gchar* to_string_name = NULL; gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; ValaCCodeFunction* to_string_func = NULL; ValaCCodeFunction* _tmp4_; gchar* _tmp5_; gchar* _tmp6_; ValaCCodeParameter* _tmp7_; ValaCCodeParameter* _tmp8_; ValaCCodeFunction* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (en != NULL, NULL); _tmp0_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) en, NULL); _tmp1_ = _tmp0_; _tmp2_ = g_strdup_printf ("%s_to_string", _tmp1_); _tmp3_ = _tmp2_; _g_free0 (_tmp1_); to_string_name = _tmp3_; _tmp4_ = vala_ccode_function_new (to_string_name, "const char*"); to_string_func = _tmp4_; _tmp5_ = vala_get_ccode_name ((ValaCodeNode*) en); _tmp6_ = _tmp5_; _tmp7_ = vala_ccode_parameter_new ("value", _tmp6_); _tmp8_ = _tmp7_; vala_ccode_function_add_parameter (to_string_func, _tmp8_); _vala_ccode_node_unref0 (_tmp8_); _g_free0 (_tmp6_); result = to_string_func; _g_free0 (to_string_name); return result; } ValaCCodeFunction* vala_gvariant_module_generate_enum_to_string_function (ValaGVariantModule* self, ValaEnum* en) { gchar* to_string_name = NULL; gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; ValaCCodeFunction* to_string_func = NULL; const gchar* _tmp4_; ValaCCodeFunction* _tmp5_; ValaCCodeFunction* _tmp6_; gchar* _tmp7_; gchar* _tmp8_; ValaCCodeParameter* _tmp9_; ValaCCodeParameter* _tmp10_; ValaCCodeFunction* _tmp11_; ValaCCodeFunction* _tmp12_; ValaCCodeFunction* _tmp13_; ValaCCodeVariableDeclarator* _tmp14_; ValaCCodeVariableDeclarator* _tmp15_; ValaCCodeFunction* _tmp16_; ValaCCodeFunction* _tmp17_; ValaCCodeIdentifier* _tmp18_; ValaCCodeIdentifier* _tmp19_; ValaCCodeFunction* _tmp52_; ValaCCodeFunction* _tmp53_; ValaCCodeFunction* _tmp54_; ValaCCodeFunction* _tmp55_; ValaCCodeIdentifier* _tmp56_; ValaCCodeIdentifier* _tmp57_; ValaCCodeFunction* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (en != NULL, NULL); _tmp0_ = vala_get_ccode_lower_case_name ((ValaCodeNode*) en, NULL); _tmp1_ = _tmp0_; _tmp2_ = g_strdup_printf ("%s_to_string", _tmp1_); _tmp3_ = _tmp2_; _g_free0 (_tmp1_); to_string_name = _tmp3_; _tmp4_ = to_string_name; _tmp5_ = vala_ccode_function_new (_tmp4_, "const char*"); to_string_func = _tmp5_; _tmp6_ = to_string_func; _tmp7_ = vala_get_ccode_name ((ValaCodeNode*) en); _tmp8_ = _tmp7_; _tmp9_ = vala_ccode_parameter_new ("value", _tmp8_); _tmp10_ = _tmp9_; vala_ccode_function_add_parameter (_tmp6_, _tmp10_); _vala_ccode_node_unref0 (_tmp10_); _g_free0 (_tmp8_); _tmp11_ = to_string_func; vala_ccode_base_module_push_function ((ValaCCodeBaseModule*) self, _tmp11_); _tmp12_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp13_ = _tmp12_; _tmp14_ = vala_ccode_variable_declarator_new ("str", NULL, NULL); _tmp15_ = _tmp14_; vala_ccode_function_add_declaration (_tmp13_, "const char *", (ValaCCodeDeclarator*) _tmp15_, 0); _vala_ccode_node_unref0 (_tmp15_); _tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp17_ = _tmp16_; _tmp18_ = vala_ccode_identifier_new ("value"); _tmp19_ = _tmp18_; vala_ccode_function_open_switch (_tmp17_, (ValaCCodeExpression*) _tmp19_); _vala_ccode_node_unref0 (_tmp19_); { ValaList* _enum_value_list = NULL; ValaList* _tmp20_; ValaList* _tmp21_; gint _enum_value_size = 0; ValaList* _tmp22_; gint _tmp23_; gint _tmp24_; gint _enum_value_index = 0; _tmp20_ = vala_enum_get_values (en); _tmp21_ = _vala_iterable_ref0 (_tmp20_); _enum_value_list = _tmp21_; _tmp22_ = _enum_value_list; _tmp23_ = vala_collection_get_size ((ValaCollection*) _tmp22_); _tmp24_ = _tmp23_; _enum_value_size = _tmp24_; _enum_value_index = -1; while (TRUE) { gint _tmp25_; gint _tmp26_; ValaEnumValue* enum_value = NULL; ValaList* _tmp27_; gpointer _tmp28_; gchar* dbus_value = NULL; ValaEnumValue* _tmp29_; ValaEnumValue* _tmp30_; const gchar* _tmp31_; const gchar* _tmp32_; gchar* _tmp33_; ValaCCodeFunction* _tmp34_; ValaCCodeFunction* _tmp35_; ValaEnumValue* _tmp36_; gchar* _tmp37_; gchar* _tmp38_; ValaCCodeIdentifier* _tmp39_; ValaCCodeIdentifier* _tmp40_; ValaCCodeFunction* _tmp41_; ValaCCodeFunction* _tmp42_; ValaCCodeIdentifier* _tmp43_; ValaCCodeIdentifier* _tmp44_; const gchar* _tmp45_; gchar* _tmp46_; gchar* _tmp47_; ValaCCodeConstant* _tmp48_; ValaCCodeConstant* _tmp49_; ValaCCodeFunction* _tmp50_; ValaCCodeFunction* _tmp51_; _enum_value_index = _enum_value_index + 1; _tmp25_ = _enum_value_index; _tmp26_ = _enum_value_size; if (!(_tmp25_ < _tmp26_)) { break; } _tmp27_ = _enum_value_list; _tmp28_ = vala_list_get (_tmp27_, _enum_value_index); enum_value = (ValaEnumValue*) _tmp28_; _tmp29_ = enum_value; _tmp30_ = enum_value; _tmp31_ = vala_symbol_get_name ((ValaSymbol*) _tmp30_); _tmp32_ = _tmp31_; _tmp33_ = vala_gvariant_module_get_dbus_value (self, _tmp29_, _tmp32_); dbus_value = _tmp33_; _tmp34_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp35_ = _tmp34_; _tmp36_ = enum_value; _tmp37_ = vala_get_ccode_name ((ValaCodeNode*) _tmp36_); _tmp38_ = _tmp37_; _tmp39_ = vala_ccode_identifier_new (_tmp38_); _tmp40_ = _tmp39_; vala_ccode_function_add_case (_tmp35_, (ValaCCodeExpression*) _tmp40_); _vala_ccode_node_unref0 (_tmp40_); _g_free0 (_tmp38_); _tmp41_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp42_ = _tmp41_; _tmp43_ = vala_ccode_identifier_new ("str"); _tmp44_ = _tmp43_; _tmp45_ = dbus_value; _tmp46_ = g_strdup_printf ("\"%s\"", _tmp45_); _tmp47_ = _tmp46_; _tmp48_ = vala_ccode_constant_new (_tmp47_); _tmp49_ = _tmp48_; vala_ccode_function_add_assignment (_tmp42_, (ValaCCodeExpression*) _tmp44_, (ValaCCodeExpression*) _tmp49_); _vala_ccode_node_unref0 (_tmp49_); _g_free0 (_tmp47_); _vala_ccode_node_unref0 (_tmp44_); _tmp50_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp51_ = _tmp50_; vala_ccode_function_add_break (_tmp51_); _g_free0 (dbus_value); _vala_code_node_unref0 (enum_value); } _vala_iterable_unref0 (_enum_value_list); } _tmp52_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp53_ = _tmp52_; vala_ccode_function_close (_tmp53_); _tmp54_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp55_ = _tmp54_; _tmp56_ = vala_ccode_identifier_new ("str"); _tmp57_ = _tmp56_; vala_ccode_function_add_return (_tmp55_, (ValaCCodeExpression*) _tmp57_); _vala_ccode_node_unref0 (_tmp57_); vala_ccode_base_module_pop_function ((ValaCCodeBaseModule*) self); result = to_string_func; _g_free0 (to_string_name); return result; } static ValaCCodeExpression* vala_gvariant_module_serialize_basic (ValaGVariantModule* self, ValaGVariantModuleBasicTypeInfo* basic_type, ValaCCodeExpression* expr) { ValaCCodeFunctionCall* new_call = NULL; ValaGVariantModuleBasicTypeInfo _tmp0_; const gchar* _tmp1_; gchar* _tmp2_; gchar* _tmp3_; ValaCCodeIdentifier* _tmp4_; ValaCCodeIdentifier* _tmp5_; ValaCCodeFunctionCall* _tmp6_; ValaCCodeFunctionCall* _tmp7_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (basic_type != NULL, NULL); g_return_val_if_fail (expr != NULL, NULL); _tmp0_ = *basic_type; _tmp1_ = _tmp0_.type_name; _tmp2_ = g_strconcat ("g_variant_new_", _tmp1_, NULL); _tmp3_ = _tmp2_; _tmp4_ = vala_ccode_identifier_new (_tmp3_); _tmp5_ = _tmp4_; _tmp6_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp5_); _tmp7_ = _tmp6_; _vala_ccode_node_unref0 (_tmp5_); _g_free0 (_tmp3_); new_call = _tmp7_; vala_ccode_function_call_add_argument (new_call, expr); result = (ValaCCodeExpression*) new_call; return result; } static ValaCCodeExpression* vala_gvariant_module_serialize_array (ValaGVariantModule* self, ValaArrayType* array_type, ValaCCodeExpression* array_expr) { gboolean _tmp0_ = FALSE; gint _tmp1_; gint _tmp2_; gchar* array_iter_name = NULL; gint _tmp6_; gint _tmp7_; gchar* _tmp8_; ValaCCodeFunction* _tmp9_; ValaCCodeFunction* _tmp10_; gchar* _tmp11_; gchar* _tmp12_; const gchar* _tmp13_; ValaCCodeVariableDeclarator* _tmp14_; ValaCCodeVariableDeclarator* _tmp15_; ValaCCodeFunction* _tmp16_; ValaCCodeFunction* _tmp17_; const gchar* _tmp18_; ValaCCodeIdentifier* _tmp19_; ValaCCodeIdentifier* _tmp20_; const gchar* _tmp21_; ValaCCodeIdentifier* _tmp22_; ValaCCodeIdentifier* _tmp23_; ValaCCodeExpression* _tmp24_; ValaCCodeExpression* _tmp25_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (array_type != NULL, NULL); g_return_val_if_fail (array_expr != NULL, NULL); _tmp1_ = vala_array_type_get_rank (array_type); _tmp2_ = _tmp1_; if (_tmp2_ == 1) { gchar* _tmp3_; gchar* _tmp4_; _tmp3_ = vala_data_type_get_type_signature ((ValaDataType*) array_type, NULL); _tmp4_ = _tmp3_; _tmp0_ = g_strcmp0 (_tmp4_, "ay") == 0; _g_free0 (_tmp4_); } else { _tmp0_ = FALSE; } if (_tmp0_) { ValaCCodeExpression* _tmp5_; _tmp5_ = vala_gvariant_module_serialize_buffer_array (self, array_type, array_expr); result = _tmp5_; return result; } _tmp6_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp7_ = _tmp6_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp7_ + 1); _tmp8_ = g_strdup_printf ("_tmp%d_", _tmp7_); array_iter_name = _tmp8_; _tmp9_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp10_ = _tmp9_; _tmp11_ = vala_get_ccode_name ((ValaCodeNode*) array_type); _tmp12_ = _tmp11_; _tmp13_ = array_iter_name; _tmp14_ = vala_ccode_variable_declarator_new (_tmp13_, NULL, NULL); _tmp15_ = _tmp14_; vala_ccode_function_add_declaration (_tmp10_, _tmp12_, (ValaCCodeDeclarator*) _tmp15_, 0); _vala_ccode_node_unref0 (_tmp15_); _g_free0 (_tmp12_); _tmp16_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp17_ = _tmp16_; _tmp18_ = array_iter_name; _tmp19_ = vala_ccode_identifier_new (_tmp18_); _tmp20_ = _tmp19_; vala_ccode_function_add_assignment (_tmp17_, (ValaCCodeExpression*) _tmp20_, array_expr); _vala_ccode_node_unref0 (_tmp20_); _tmp21_ = array_iter_name; _tmp22_ = vala_ccode_identifier_new (_tmp21_); _tmp23_ = _tmp22_; _tmp24_ = vala_gvariant_module_serialize_array_dim (self, array_type, 1, array_expr, (ValaCCodeExpression*) _tmp23_); _tmp25_ = _tmp24_; _vala_ccode_node_unref0 (_tmp23_); result = _tmp25_; _g_free0 (array_iter_name); return result; } static ValaCCodeExpression* vala_gvariant_module_serialize_array_dim (ValaGVariantModule* self, ValaArrayType* array_type, gint dim, ValaCCodeExpression* array_expr, ValaCCodeExpression* array_iter_expr) { gchar* builder_name = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_; gchar* index_name = NULL; gint _tmp3_; gint _tmp4_; gchar* _tmp5_; ValaCCodeFunction* _tmp6_; ValaCCodeFunction* _tmp7_; const gchar* _tmp8_; ValaCCodeVariableDeclarator* _tmp9_; ValaCCodeVariableDeclarator* _tmp10_; ValaCCodeFunction* _tmp11_; ValaCCodeFunction* _tmp12_; gchar* _tmp13_; gchar* _tmp14_; const gchar* _tmp15_; ValaCCodeVariableDeclarator* _tmp16_; ValaCCodeVariableDeclarator* _tmp17_; ValaCCodeFunctionCall* gvariant_type = NULL; ValaCCodeIdentifier* _tmp18_; ValaCCodeIdentifier* _tmp19_; ValaCCodeFunctionCall* _tmp20_; ValaCCodeFunctionCall* _tmp21_; ValaArrayType* array_type_copy = NULL; ValaDataType* _tmp22_; ValaArrayType* _tmp23_; ValaArrayType* _tmp24_; gint _tmp25_; gint _tmp26_; ValaCCodeFunctionCall* _tmp27_; ValaArrayType* _tmp28_; gchar* _tmp29_; gchar* _tmp30_; gchar* _tmp31_; gchar* _tmp32_; ValaCCodeConstant* _tmp33_; ValaCCodeConstant* _tmp34_; ValaCCodeFunctionCall* builder_init = NULL; ValaCCodeIdentifier* _tmp35_; ValaCCodeIdentifier* _tmp36_; ValaCCodeFunctionCall* _tmp37_; ValaCCodeFunctionCall* _tmp38_; ValaCCodeFunctionCall* _tmp39_; const gchar* _tmp40_; ValaCCodeIdentifier* _tmp41_; ValaCCodeIdentifier* _tmp42_; ValaCCodeUnaryExpression* _tmp43_; ValaCCodeUnaryExpression* _tmp44_; ValaCCodeFunctionCall* _tmp45_; ValaCCodeFunctionCall* _tmp46_; ValaCCodeFunction* _tmp47_; ValaCCodeFunction* _tmp48_; ValaCCodeFunctionCall* _tmp49_; ValaCCodeAssignment* cforinit = NULL; const gchar* _tmp50_; ValaCCodeIdentifier* _tmp51_; ValaCCodeIdentifier* _tmp52_; ValaCCodeConstant* _tmp53_; ValaCCodeConstant* _tmp54_; ValaCCodeAssignment* _tmp55_; ValaCCodeAssignment* _tmp56_; ValaCCodeBinaryExpression* cforcond = NULL; const gchar* _tmp57_; ValaCCodeIdentifier* _tmp58_; ValaCCodeIdentifier* _tmp59_; ValaCCodeExpression* _tmp60_; ValaCCodeExpression* _tmp61_; ValaCCodeBinaryExpression* _tmp62_; ValaCCodeBinaryExpression* _tmp63_; ValaCCodeUnaryExpression* cforiter = NULL; const gchar* _tmp64_; ValaCCodeIdentifier* _tmp65_; ValaCCodeIdentifier* _tmp66_; ValaCCodeUnaryExpression* _tmp67_; ValaCCodeUnaryExpression* _tmp68_; ValaCCodeFunction* _tmp69_; ValaCCodeFunction* _tmp70_; ValaCCodeAssignment* _tmp71_; ValaCCodeBinaryExpression* _tmp72_; ValaCCodeUnaryExpression* _tmp73_; ValaCCodeExpression* element_variant = NULL; gint _tmp74_; gint _tmp75_; ValaCCodeFunctionCall* builder_add = NULL; ValaCCodeIdentifier* _tmp82_; ValaCCodeIdentifier* _tmp83_; ValaCCodeFunctionCall* _tmp84_; ValaCCodeFunctionCall* _tmp85_; ValaCCodeFunctionCall* _tmp86_; const gchar* _tmp87_; ValaCCodeIdentifier* _tmp88_; ValaCCodeIdentifier* _tmp89_; ValaCCodeUnaryExpression* _tmp90_; ValaCCodeUnaryExpression* _tmp91_; ValaCCodeFunctionCall* _tmp92_; ValaCCodeExpression* _tmp93_; ValaCCodeFunction* _tmp94_; ValaCCodeFunction* _tmp95_; ValaCCodeFunctionCall* _tmp96_; gint _tmp97_; gint _tmp98_; ValaCCodeFunction* _tmp103_; ValaCCodeFunction* _tmp104_; ValaCCodeFunctionCall* builder_end = NULL; ValaCCodeIdentifier* _tmp105_; ValaCCodeIdentifier* _tmp106_; ValaCCodeFunctionCall* _tmp107_; ValaCCodeFunctionCall* _tmp108_; const gchar* _tmp109_; ValaCCodeIdentifier* _tmp110_; ValaCCodeIdentifier* _tmp111_; ValaCCodeUnaryExpression* _tmp112_; ValaCCodeUnaryExpression* _tmp113_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (array_type != NULL, NULL); g_return_val_if_fail (array_expr != NULL, NULL); g_return_val_if_fail (array_iter_expr != NULL, NULL); _tmp0_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp1_ = _tmp0_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp1_ + 1); _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_); builder_name = _tmp2_; _tmp3_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp4_ = _tmp3_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp4_ + 1); _tmp5_ = g_strdup_printf ("_tmp%d_", _tmp4_); index_name = _tmp5_; _tmp6_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp7_ = _tmp6_; _tmp8_ = builder_name; _tmp9_ = vala_ccode_variable_declarator_new (_tmp8_, NULL, NULL); _tmp10_ = _tmp9_; vala_ccode_function_add_declaration (_tmp7_, "GVariantBuilder", (ValaCCodeDeclarator*) _tmp10_, 0); _vala_ccode_node_unref0 (_tmp10_); _tmp11_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp12_ = _tmp11_; _tmp13_ = vala_get_ccode_array_length_type ((ValaCodeNode*) array_type); _tmp14_ = _tmp13_; _tmp15_ = index_name; _tmp16_ = vala_ccode_variable_declarator_new (_tmp15_, NULL, NULL); _tmp17_ = _tmp16_; vala_ccode_function_add_declaration (_tmp12_, _tmp14_, (ValaCCodeDeclarator*) _tmp17_, 0); _vala_ccode_node_unref0 (_tmp17_); _g_free0 (_tmp14_); _tmp18_ = vala_ccode_identifier_new ("G_VARIANT_TYPE"); _tmp19_ = _tmp18_; _tmp20_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp19_); _tmp21_ = _tmp20_; _vala_ccode_node_unref0 (_tmp19_); gvariant_type = _tmp21_; _tmp22_ = vala_data_type_copy ((ValaDataType*) array_type); array_type_copy = G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, VALA_TYPE_ARRAY_TYPE, ValaArrayType); _tmp23_ = array_type_copy; _tmp24_ = array_type_copy; _tmp25_ = vala_array_type_get_rank (_tmp24_); _tmp26_ = _tmp25_; vala_array_type_set_rank (_tmp24_, _tmp26_ - (dim - 1)); _tmp27_ = gvariant_type; _tmp28_ = array_type_copy; _tmp29_ = vala_data_type_get_type_signature ((ValaDataType*) _tmp28_, NULL); _tmp30_ = _tmp29_; _tmp31_ = g_strdup_printf ("\"%s\"", _tmp30_); _tmp32_ = _tmp31_; _tmp33_ = vala_ccode_constant_new (_tmp32_); _tmp34_ = _tmp33_; vala_ccode_function_call_add_argument (_tmp27_, (ValaCCodeExpression*) _tmp34_); _vala_ccode_node_unref0 (_tmp34_); _g_free0 (_tmp32_); _g_free0 (_tmp30_); _tmp35_ = vala_ccode_identifier_new ("g_variant_builder_init"); _tmp36_ = _tmp35_; _tmp37_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp36_); _tmp38_ = _tmp37_; _vala_ccode_node_unref0 (_tmp36_); builder_init = _tmp38_; _tmp39_ = builder_init; _tmp40_ = builder_name; _tmp41_ = vala_ccode_identifier_new (_tmp40_); _tmp42_ = _tmp41_; _tmp43_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp42_); _tmp44_ = _tmp43_; vala_ccode_function_call_add_argument (_tmp39_, (ValaCCodeExpression*) _tmp44_); _vala_ccode_node_unref0 (_tmp44_); _vala_ccode_node_unref0 (_tmp42_); _tmp45_ = builder_init; _tmp46_ = gvariant_type; vala_ccode_function_call_add_argument (_tmp45_, (ValaCCodeExpression*) _tmp46_); _tmp47_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp48_ = _tmp47_; _tmp49_ = builder_init; vala_ccode_function_add_expression (_tmp48_, (ValaCCodeExpression*) _tmp49_); _tmp50_ = index_name; _tmp51_ = vala_ccode_identifier_new (_tmp50_); _tmp52_ = _tmp51_; _tmp53_ = vala_ccode_constant_new ("0"); _tmp54_ = _tmp53_; _tmp55_ = vala_ccode_assignment_new ((ValaCCodeExpression*) _tmp52_, (ValaCCodeExpression*) _tmp54_, VALA_CCODE_ASSIGNMENT_OPERATOR_SIMPLE); _tmp56_ = _tmp55_; _vala_ccode_node_unref0 (_tmp54_); _vala_ccode_node_unref0 (_tmp52_); cforinit = _tmp56_; _tmp57_ = index_name; _tmp58_ = vala_ccode_identifier_new (_tmp57_); _tmp59_ = _tmp58_; _tmp60_ = vala_gvariant_module_get_array_length (self, array_expr, dim); _tmp61_ = _tmp60_; _tmp62_ = vala_ccode_binary_expression_new (VALA_CCODE_BINARY_OPERATOR_LESS_THAN, (ValaCCodeExpression*) _tmp59_, _tmp61_); _tmp63_ = _tmp62_; _vala_ccode_node_unref0 (_tmp61_); _vala_ccode_node_unref0 (_tmp59_); cforcond = _tmp63_; _tmp64_ = index_name; _tmp65_ = vala_ccode_identifier_new (_tmp64_); _tmp66_ = _tmp65_; _tmp67_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, (ValaCCodeExpression*) _tmp66_); _tmp68_ = _tmp67_; _vala_ccode_node_unref0 (_tmp66_); cforiter = _tmp68_; _tmp69_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp70_ = _tmp69_; _tmp71_ = cforinit; _tmp72_ = cforcond; _tmp73_ = cforiter; vala_ccode_function_open_for (_tmp70_, (ValaCCodeExpression*) _tmp71_, (ValaCCodeExpression*) _tmp72_, (ValaCCodeExpression*) _tmp73_); _tmp74_ = vala_array_type_get_rank (array_type); _tmp75_ = _tmp74_; if (dim < _tmp75_) { ValaCCodeExpression* _tmp76_; _tmp76_ = vala_gvariant_module_serialize_array_dim (self, array_type, dim + 1, array_expr, array_iter_expr); _vala_ccode_node_unref0 (element_variant); element_variant = _tmp76_; } else { ValaCCodeUnaryExpression* element_expr = NULL; ValaCCodeUnaryExpression* _tmp77_; ValaDataType* _tmp78_; ValaDataType* _tmp79_; ValaCCodeUnaryExpression* _tmp80_; ValaCCodeExpression* _tmp81_; _tmp77_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, array_iter_expr); element_expr = _tmp77_; _tmp78_ = vala_array_type_get_element_type (array_type); _tmp79_ = _tmp78_; _tmp80_ = element_expr; _tmp81_ = vala_ccode_base_module_serialize_expression ((ValaCCodeBaseModule*) self, _tmp79_, (ValaCCodeExpression*) _tmp80_); _vala_ccode_node_unref0 (element_variant); element_variant = _tmp81_; _vala_ccode_node_unref0 (element_expr); } _tmp82_ = vala_ccode_identifier_new ("g_variant_builder_add_value"); _tmp83_ = _tmp82_; _tmp84_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp83_); _tmp85_ = _tmp84_; _vala_ccode_node_unref0 (_tmp83_); builder_add = _tmp85_; _tmp86_ = builder_add; _tmp87_ = builder_name; _tmp88_ = vala_ccode_identifier_new (_tmp87_); _tmp89_ = _tmp88_; _tmp90_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp89_); _tmp91_ = _tmp90_; vala_ccode_function_call_add_argument (_tmp86_, (ValaCCodeExpression*) _tmp91_); _vala_ccode_node_unref0 (_tmp91_); _vala_ccode_node_unref0 (_tmp89_); _tmp92_ = builder_add; _tmp93_ = element_variant; vala_ccode_function_call_add_argument (_tmp92_, _tmp93_); _tmp94_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp95_ = _tmp94_; _tmp96_ = builder_add; vala_ccode_function_add_expression (_tmp95_, (ValaCCodeExpression*) _tmp96_); _tmp97_ = vala_array_type_get_rank (array_type); _tmp98_ = _tmp97_; if (dim == _tmp98_) { ValaCCodeUnaryExpression* array_iter_incr = NULL; ValaCCodeUnaryExpression* _tmp99_; ValaCCodeFunction* _tmp100_; ValaCCodeFunction* _tmp101_; ValaCCodeUnaryExpression* _tmp102_; _tmp99_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POSTFIX_INCREMENT, array_iter_expr); array_iter_incr = _tmp99_; _tmp100_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp101_ = _tmp100_; _tmp102_ = array_iter_incr; vala_ccode_function_add_expression (_tmp101_, (ValaCCodeExpression*) _tmp102_); _vala_ccode_node_unref0 (array_iter_incr); } _tmp103_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp104_ = _tmp103_; vala_ccode_function_close (_tmp104_); _tmp105_ = vala_ccode_identifier_new ("g_variant_builder_end"); _tmp106_ = _tmp105_; _tmp107_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp106_); _tmp108_ = _tmp107_; _vala_ccode_node_unref0 (_tmp106_); builder_end = _tmp108_; _tmp109_ = builder_name; _tmp110_ = vala_ccode_identifier_new (_tmp109_); _tmp111_ = _tmp110_; _tmp112_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp111_); _tmp113_ = _tmp112_; vala_ccode_function_call_add_argument (builder_end, (ValaCCodeExpression*) _tmp113_); _vala_ccode_node_unref0 (_tmp113_); _vala_ccode_node_unref0 (_tmp111_); result = (ValaCCodeExpression*) builder_end; _vala_ccode_node_unref0 (builder_add); _vala_ccode_node_unref0 (element_variant); _vala_ccode_node_unref0 (cforiter); _vala_ccode_node_unref0 (cforcond); _vala_ccode_node_unref0 (cforinit); _vala_ccode_node_unref0 (builder_init); _vala_code_node_unref0 (array_type_copy); _vala_ccode_node_unref0 (gvariant_type); _g_free0 (index_name); _g_free0 (builder_name); return result; } static ValaCCodeExpression* vala_gvariant_module_serialize_buffer_array (ValaGVariantModule* self, ValaArrayType* array_type, ValaCCodeExpression* array_expr) { gchar* buffer_name = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_; ValaCCodeFunctionCall* gvariant_type = NULL; ValaCCodeIdentifier* _tmp3_; ValaCCodeIdentifier* _tmp4_; ValaCCodeFunctionCall* _tmp5_; ValaCCodeFunctionCall* _tmp6_; gchar* _tmp7_; gchar* _tmp8_; gchar* _tmp9_; gchar* _tmp10_; ValaCCodeConstant* _tmp11_; ValaCCodeConstant* _tmp12_; ValaCCodeFunctionCall* dup_call = NULL; ValaCCodeIdentifier* _tmp13_; ValaCCodeIdentifier* _tmp14_; ValaCCodeFunctionCall* _tmp15_; ValaCCodeFunctionCall* _tmp16_; ValaCCodeExpression* _tmp17_; ValaCCodeExpression* _tmp18_; ValaCCodeFunction* _tmp19_; ValaCCodeFunction* _tmp20_; gchar* _tmp21_; gchar* _tmp22_; ValaCCodeVariableDeclarator* _tmp23_; ValaCCodeVariableDeclarator* _tmp24_; ValaCCodeFunctionCall* new_call = NULL; ValaCCodeIdentifier* _tmp25_; ValaCCodeIdentifier* _tmp26_; ValaCCodeFunctionCall* _tmp27_; ValaCCodeFunctionCall* _tmp28_; ValaCCodeIdentifier* _tmp29_; ValaCCodeIdentifier* _tmp30_; ValaCCodeExpression* _tmp31_; ValaCCodeExpression* _tmp32_; ValaCCodeConstant* _tmp33_; ValaCCodeConstant* _tmp34_; ValaCCodeIdentifier* _tmp35_; ValaCCodeIdentifier* _tmp36_; ValaCCodeIdentifier* _tmp37_; ValaCCodeIdentifier* _tmp38_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (array_type != NULL, NULL); g_return_val_if_fail (array_expr != NULL, NULL); _tmp0_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp1_ = _tmp0_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp1_ + 1); _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_); buffer_name = _tmp2_; _tmp3_ = vala_ccode_identifier_new ("G_VARIANT_TYPE"); _tmp4_ = _tmp3_; _tmp5_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp4_); _tmp6_ = _tmp5_; _vala_ccode_node_unref0 (_tmp4_); gvariant_type = _tmp6_; _tmp7_ = vala_data_type_get_type_signature ((ValaDataType*) array_type, NULL); _tmp8_ = _tmp7_; _tmp9_ = g_strdup_printf ("\"%s\"", _tmp8_); _tmp10_ = _tmp9_; _tmp11_ = vala_ccode_constant_new (_tmp10_); _tmp12_ = _tmp11_; vala_ccode_function_call_add_argument (gvariant_type, (ValaCCodeExpression*) _tmp12_); _vala_ccode_node_unref0 (_tmp12_); _g_free0 (_tmp10_); _g_free0 (_tmp8_); _tmp13_ = vala_ccode_identifier_new ("g_memdup"); _tmp14_ = _tmp13_; _tmp15_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp14_); _tmp16_ = _tmp15_; _vala_ccode_node_unref0 (_tmp14_); dup_call = _tmp16_; vala_ccode_function_call_add_argument (dup_call, array_expr); _tmp17_ = vala_gvariant_module_get_array_length (self, array_expr, 1); _tmp18_ = _tmp17_; vala_ccode_function_call_add_argument (dup_call, _tmp18_); _vala_ccode_node_unref0 (_tmp18_); _tmp19_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp20_ = _tmp19_; _tmp21_ = vala_get_ccode_name ((ValaCodeNode*) array_type); _tmp22_ = _tmp21_; _tmp23_ = vala_ccode_variable_declarator_new (buffer_name, (ValaCCodeExpression*) dup_call, NULL); _tmp24_ = _tmp23_; vala_ccode_function_add_declaration (_tmp20_, _tmp22_, (ValaCCodeDeclarator*) _tmp24_, 0); _vala_ccode_node_unref0 (_tmp24_); _g_free0 (_tmp22_); _tmp25_ = vala_ccode_identifier_new ("g_variant_new_from_data"); _tmp26_ = _tmp25_; _tmp27_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp26_); _tmp28_ = _tmp27_; _vala_ccode_node_unref0 (_tmp26_); new_call = _tmp28_; vala_ccode_function_call_add_argument (new_call, (ValaCCodeExpression*) gvariant_type); _tmp29_ = vala_ccode_identifier_new (buffer_name); _tmp30_ = _tmp29_; vala_ccode_function_call_add_argument (new_call, (ValaCCodeExpression*) _tmp30_); _vala_ccode_node_unref0 (_tmp30_); _tmp31_ = vala_gvariant_module_get_array_length (self, array_expr, 1); _tmp32_ = _tmp31_; vala_ccode_function_call_add_argument (new_call, _tmp32_); _vala_ccode_node_unref0 (_tmp32_); _tmp33_ = vala_ccode_constant_new ("TRUE"); _tmp34_ = _tmp33_; vala_ccode_function_call_add_argument (new_call, (ValaCCodeExpression*) _tmp34_); _vala_ccode_node_unref0 (_tmp34_); _tmp35_ = vala_ccode_identifier_new ("g_free"); _tmp36_ = _tmp35_; vala_ccode_function_call_add_argument (new_call, (ValaCCodeExpression*) _tmp36_); _vala_ccode_node_unref0 (_tmp36_); _tmp37_ = vala_ccode_identifier_new (buffer_name); _tmp38_ = _tmp37_; vala_ccode_function_call_add_argument (new_call, (ValaCCodeExpression*) _tmp38_); _vala_ccode_node_unref0 (_tmp38_); result = (ValaCCodeExpression*) new_call; _vala_ccode_node_unref0 (dup_call); _vala_ccode_node_unref0 (gvariant_type); _g_free0 (buffer_name); return result; } static ValaCCodeExpression* vala_gvariant_module_serialize_struct (ValaGVariantModule* self, ValaStruct* st, ValaCCodeExpression* struct_expr) { gchar* builder_name = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_; ValaCCodeFunction* _tmp3_; ValaCCodeFunction* _tmp4_; const gchar* _tmp5_; ValaCCodeVariableDeclarator* _tmp6_; ValaCCodeVariableDeclarator* _tmp7_; ValaCCodeFunctionCall* iter_call = NULL; ValaCCodeIdentifier* _tmp8_; ValaCCodeIdentifier* _tmp9_; ValaCCodeFunctionCall* _tmp10_; ValaCCodeFunctionCall* _tmp11_; ValaCCodeFunctionCall* _tmp12_; const gchar* _tmp13_; ValaCCodeIdentifier* _tmp14_; ValaCCodeIdentifier* _tmp15_; ValaCCodeUnaryExpression* _tmp16_; ValaCCodeUnaryExpression* _tmp17_; ValaCCodeFunctionCall* _tmp18_; ValaCCodeIdentifier* _tmp19_; ValaCCodeIdentifier* _tmp20_; ValaCCodeFunction* _tmp21_; ValaCCodeFunction* _tmp22_; ValaCCodeFunctionCall* _tmp23_; gboolean field_found = FALSE; ValaCCodeFunctionCall* builder_end = NULL; ValaCCodeIdentifier* _tmp48_; ValaCCodeIdentifier* _tmp49_; ValaCCodeFunctionCall* _tmp50_; ValaCCodeFunctionCall* _tmp51_; ValaCCodeFunctionCall* _tmp52_; const gchar* _tmp53_; ValaCCodeIdentifier* _tmp54_; ValaCCodeIdentifier* _tmp55_; ValaCCodeUnaryExpression* _tmp56_; ValaCCodeUnaryExpression* _tmp57_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (st != NULL, NULL); g_return_val_if_fail (struct_expr != NULL, NULL); _tmp0_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp1_ = _tmp0_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp1_ + 1); _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_); builder_name = _tmp2_; _tmp3_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp4_ = _tmp3_; _tmp5_ = builder_name; _tmp6_ = vala_ccode_variable_declarator_new (_tmp5_, NULL, NULL); _tmp7_ = _tmp6_; vala_ccode_function_add_declaration (_tmp4_, "GVariantBuilder", (ValaCCodeDeclarator*) _tmp7_, 0); _vala_ccode_node_unref0 (_tmp7_); _tmp8_ = vala_ccode_identifier_new ("g_variant_builder_init"); _tmp9_ = _tmp8_; _tmp10_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp9_); _tmp11_ = _tmp10_; _vala_ccode_node_unref0 (_tmp9_); iter_call = _tmp11_; _tmp12_ = iter_call; _tmp13_ = builder_name; _tmp14_ = vala_ccode_identifier_new (_tmp13_); _tmp15_ = _tmp14_; _tmp16_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp15_); _tmp17_ = _tmp16_; vala_ccode_function_call_add_argument (_tmp12_, (ValaCCodeExpression*) _tmp17_); _vala_ccode_node_unref0 (_tmp17_); _vala_ccode_node_unref0 (_tmp15_); _tmp18_ = iter_call; _tmp19_ = vala_ccode_identifier_new ("G_VARIANT_TYPE_TUPLE"); _tmp20_ = _tmp19_; vala_ccode_function_call_add_argument (_tmp18_, (ValaCCodeExpression*) _tmp20_); _vala_ccode_node_unref0 (_tmp20_); _tmp21_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp22_ = _tmp21_; _tmp23_ = iter_call; vala_ccode_function_add_expression (_tmp22_, (ValaCCodeExpression*) _tmp23_); field_found = FALSE; { ValaList* _f_list = NULL; ValaList* _tmp24_; ValaList* _tmp25_; gint _f_size = 0; ValaList* _tmp26_; gint _tmp27_; gint _tmp28_; gint _f_index = 0; _tmp24_ = vala_struct_get_fields (st); _tmp25_ = _vala_iterable_ref0 (_tmp24_); _f_list = _tmp25_; _tmp26_ = _f_list; _tmp27_ = vala_collection_get_size ((ValaCollection*) _tmp26_); _tmp28_ = _tmp27_; _f_size = _tmp28_; _f_index = -1; while (TRUE) { gint _tmp29_; gint _tmp30_; ValaField* f = NULL; ValaList* _tmp31_; gpointer _tmp32_; ValaField* _tmp33_; ValaMemberBinding _tmp34_; ValaMemberBinding _tmp35_; ValaField* _tmp36_; ValaDataType* _tmp37_; ValaDataType* _tmp38_; const gchar* _tmp39_; ValaCCodeIdentifier* _tmp40_; ValaCCodeIdentifier* _tmp41_; ValaField* _tmp42_; gchar* _tmp43_; gchar* _tmp44_; ValaCCodeMemberAccess* _tmp45_; ValaCCodeMemberAccess* _tmp46_; ValaField* _tmp47_; _f_index = _f_index + 1; _tmp29_ = _f_index; _tmp30_ = _f_size; if (!(_tmp29_ < _tmp30_)) { break; } _tmp31_ = _f_list; _tmp32_ = vala_list_get (_tmp31_, _f_index); f = (ValaField*) _tmp32_; _tmp33_ = f; _tmp34_ = vala_field_get_binding (_tmp33_); _tmp35_ = _tmp34_; if (_tmp35_ != VALA_MEMBER_BINDING_INSTANCE) { _vala_code_node_unref0 (f); continue; } field_found = TRUE; _tmp36_ = f; _tmp37_ = vala_variable_get_variable_type ((ValaVariable*) _tmp36_); _tmp38_ = _tmp37_; _tmp39_ = builder_name; _tmp40_ = vala_ccode_identifier_new (_tmp39_); _tmp41_ = _tmp40_; _tmp42_ = f; _tmp43_ = vala_get_ccode_name ((ValaCodeNode*) _tmp42_); _tmp44_ = _tmp43_; _tmp45_ = vala_ccode_member_access_new (struct_expr, _tmp44_, FALSE); _tmp46_ = _tmp45_; _tmp47_ = f; vala_gvariant_module_write_expression (self, _tmp38_, (ValaCCodeExpression*) _tmp41_, (ValaCCodeExpression*) _tmp46_, (ValaSymbol*) _tmp47_); _vala_ccode_node_unref0 (_tmp46_); _g_free0 (_tmp44_); _vala_ccode_node_unref0 (_tmp41_); _vala_code_node_unref0 (f); } _vala_iterable_unref0 (_f_list); } if (!field_found) { result = NULL; _vala_ccode_node_unref0 (iter_call); _g_free0 (builder_name); return result; } _tmp48_ = vala_ccode_identifier_new ("g_variant_builder_end"); _tmp49_ = _tmp48_; _tmp50_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp49_); _tmp51_ = _tmp50_; _vala_ccode_node_unref0 (_tmp49_); builder_end = _tmp51_; _tmp52_ = builder_end; _tmp53_ = builder_name; _tmp54_ = vala_ccode_identifier_new (_tmp53_); _tmp55_ = _tmp54_; _tmp56_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp55_); _tmp57_ = _tmp56_; vala_ccode_function_call_add_argument (_tmp52_, (ValaCCodeExpression*) _tmp57_); _vala_ccode_node_unref0 (_tmp57_); _vala_ccode_node_unref0 (_tmp55_); result = (ValaCCodeExpression*) builder_end; _vala_ccode_node_unref0 (iter_call); _g_free0 (builder_name); return result; } static ValaCCodeExpression* vala_gvariant_module_serialize_hash_table (ValaGVariantModule* self, ValaObjectType* type, ValaCCodeExpression* hash_table_expr) { gchar* subiter_name = NULL; gint _tmp0_; gint _tmp1_; gchar* _tmp2_; gchar* tableiter_name = NULL; gint _tmp3_; gint _tmp4_; gchar* _tmp5_; gchar* key_name = NULL; gint _tmp6_; gint _tmp7_; gchar* _tmp8_; gchar* value_name = NULL; gint _tmp9_; gint _tmp10_; gchar* _tmp11_; ValaList* type_args = NULL; ValaList* _tmp12_; ValaList* _tmp13_; ValaList* _tmp14_; gint _tmp15_; gint _tmp16_; ValaDataType* key_type = NULL; ValaList* _tmp26_; gpointer _tmp27_; ValaDataType* value_type = NULL; ValaList* _tmp28_; gpointer _tmp29_; ValaCCodeFunction* _tmp30_; ValaCCodeFunction* _tmp31_; const gchar* _tmp32_; ValaCCodeVariableDeclarator* _tmp33_; ValaCCodeVariableDeclarator* _tmp34_; ValaCCodeFunction* _tmp35_; ValaCCodeFunction* _tmp36_; const gchar* _tmp37_; ValaCCodeVariableDeclarator* _tmp38_; ValaCCodeVariableDeclarator* _tmp39_; ValaCCodeFunction* _tmp40_; ValaCCodeFunction* _tmp41_; const gchar* _tmp42_; ValaCCodeVariableDeclarator* _tmp43_; ValaCCodeVariableDeclarator* _tmp44_; ValaCCodeFunction* _tmp45_; ValaCCodeFunction* _tmp46_; const gchar* _tmp47_; ValaCCodeVariableDeclarator* _tmp48_; ValaCCodeVariableDeclarator* _tmp49_; ValaCCodeFunctionCall* iter_init_call = NULL; ValaCCodeIdentifier* _tmp50_; ValaCCodeIdentifier* _tmp51_; ValaCCodeFunctionCall* _tmp52_; ValaCCodeFunctionCall* _tmp53_; ValaCCodeFunctionCall* _tmp54_; const gchar* _tmp55_; ValaCCodeIdentifier* _tmp56_; ValaCCodeIdentifier* _tmp57_; ValaCCodeUnaryExpression* _tmp58_; ValaCCodeUnaryExpression* _tmp59_; ValaCCodeFunctionCall* _tmp60_; ValaCCodeFunction* _tmp61_; ValaCCodeFunction* _tmp62_; ValaCCodeFunctionCall* _tmp63_; ValaCCodeFunctionCall* gvariant_type = NULL; ValaCCodeIdentifier* _tmp64_; ValaCCodeIdentifier* _tmp65_; ValaCCodeFunctionCall* _tmp66_; ValaCCodeFunctionCall* _tmp67_; ValaCCodeFunctionCall* _tmp68_; gchar* _tmp69_; gchar* _tmp70_; gchar* _tmp71_; gchar* _tmp72_; ValaCCodeConstant* _tmp73_; ValaCCodeConstant* _tmp74_; ValaCCodeFunctionCall* iter_call = NULL; ValaCCodeIdentifier* _tmp75_; ValaCCodeIdentifier* _tmp76_; ValaCCodeFunctionCall* _tmp77_; ValaCCodeFunctionCall* _tmp78_; ValaCCodeFunctionCall* _tmp79_; const gchar* _tmp80_; ValaCCodeIdentifier* _tmp81_; ValaCCodeIdentifier* _tmp82_; ValaCCodeUnaryExpression* _tmp83_; ValaCCodeUnaryExpression* _tmp84_; ValaCCodeFunctionCall* _tmp85_; ValaCCodeFunctionCall* _tmp86_; ValaCCodeFunction* _tmp87_; ValaCCodeFunction* _tmp88_; ValaCCodeFunctionCall* _tmp89_; ValaCCodeFunctionCall* iter_next_call = NULL; ValaCCodeIdentifier* _tmp90_; ValaCCodeIdentifier* _tmp91_; ValaCCodeFunctionCall* _tmp92_; ValaCCodeFunctionCall* _tmp93_; ValaCCodeFunctionCall* _tmp94_; const gchar* _tmp95_; ValaCCodeIdentifier* _tmp96_; ValaCCodeIdentifier* _tmp97_; ValaCCodeUnaryExpression* _tmp98_; ValaCCodeUnaryExpression* _tmp99_; ValaCCodeFunctionCall* _tmp100_; const gchar* _tmp101_; ValaCCodeIdentifier* _tmp102_; ValaCCodeIdentifier* _tmp103_; ValaCCodeUnaryExpression* _tmp104_; ValaCCodeUnaryExpression* _tmp105_; ValaCCodeFunctionCall* _tmp106_; const gchar* _tmp107_; ValaCCodeIdentifier* _tmp108_; ValaCCodeIdentifier* _tmp109_; ValaCCodeUnaryExpression* _tmp110_; ValaCCodeUnaryExpression* _tmp111_; ValaCCodeFunction* _tmp112_; ValaCCodeFunction* _tmp113_; ValaCCodeFunctionCall* _tmp114_; ValaCCodeFunction* _tmp115_; ValaCCodeFunction* _tmp116_; ValaDataType* _tmp117_; gchar* _tmp118_; gchar* _tmp119_; ValaCCodeVariableDeclarator* _tmp120_; ValaCCodeVariableDeclarator* _tmp121_; ValaCCodeFunction* _tmp122_; ValaCCodeFunction* _tmp123_; ValaDataType* _tmp124_; gchar* _tmp125_; gchar* _tmp126_; ValaCCodeVariableDeclarator* _tmp127_; ValaCCodeVariableDeclarator* _tmp128_; ValaCCodeFunction* _tmp129_; ValaCCodeFunction* _tmp130_; ValaCCodeIdentifier* _tmp131_; ValaCCodeIdentifier* _tmp132_; const gchar* _tmp133_; ValaCCodeIdentifier* _tmp134_; ValaCCodeIdentifier* _tmp135_; ValaDataType* _tmp136_; ValaCCodeExpression* _tmp137_; ValaCCodeExpression* _tmp138_; ValaCCodeFunction* _tmp139_; ValaCCodeFunction* _tmp140_; ValaCCodeIdentifier* _tmp141_; ValaCCodeIdentifier* _tmp142_; const gchar* _tmp143_; ValaCCodeIdentifier* _tmp144_; ValaCCodeIdentifier* _tmp145_; ValaDataType* _tmp146_; ValaCCodeExpression* _tmp147_; ValaCCodeExpression* _tmp148_; ValaCCodeExpression* serialized_key = NULL; ValaDataType* _tmp149_; ValaCCodeIdentifier* _tmp150_; ValaCCodeIdentifier* _tmp151_; ValaCCodeExpression* _tmp152_; ValaCCodeExpression* _tmp153_; ValaCCodeExpression* serialized_value = NULL; ValaDataType* _tmp154_; ValaCCodeIdentifier* _tmp155_; ValaCCodeIdentifier* _tmp156_; ValaCCodeExpression* _tmp157_; ValaCCodeExpression* _tmp158_; gboolean _tmp159_ = FALSE; ValaCCodeExpression* _tmp160_; ValaCCodeIdentifier* _tmp162_; ValaCCodeIdentifier* _tmp163_; ValaCCodeFunctionCall* _tmp164_; ValaCCodeFunctionCall* _tmp165_; const gchar* _tmp166_; ValaCCodeIdentifier* _tmp167_; ValaCCodeIdentifier* _tmp168_; ValaCCodeUnaryExpression* _tmp169_; ValaCCodeUnaryExpression* _tmp170_; ValaCCodeFunctionCall* _tmp171_; ValaCCodeConstant* _tmp172_; ValaCCodeConstant* _tmp173_; ValaCCodeFunctionCall* _tmp174_; ValaCCodeExpression* _tmp175_; ValaCCodeFunctionCall* _tmp176_; ValaCCodeExpression* _tmp177_; ValaCCodeFunction* _tmp178_; ValaCCodeFunction* _tmp179_; ValaCCodeFunctionCall* _tmp180_; ValaCCodeFunction* _tmp181_; ValaCCodeFunction* _tmp182_; ValaCCodeIdentifier* _tmp183_; ValaCCodeIdentifier* _tmp184_; ValaCCodeFunctionCall* _tmp185_; ValaCCodeFunctionCall* _tmp186_; const gchar* _tmp187_; ValaCCodeIdentifier* _tmp188_; ValaCCodeIdentifier* _tmp189_; ValaCCodeUnaryExpression* _tmp190_; ValaCCodeUnaryExpression* _tmp191_; ValaCCodeExpression* result = NULL; g_return_val_if_fail (self != NULL, NULL); g_return_val_if_fail (type != NULL, NULL); g_return_val_if_fail (hash_table_expr != NULL, NULL); _tmp0_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp1_ = _tmp0_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp1_ + 1); _tmp2_ = g_strdup_printf ("_tmp%d_", _tmp1_); subiter_name = _tmp2_; _tmp3_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp4_ = _tmp3_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp4_ + 1); _tmp5_ = g_strdup_printf ("_tmp%d_", _tmp4_); tableiter_name = _tmp5_; _tmp6_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp7_ = _tmp6_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp7_ + 1); _tmp8_ = g_strdup_printf ("_tmp%d_", _tmp7_); key_name = _tmp8_; _tmp9_ = vala_ccode_base_module_get_next_temp_var_id ((ValaCCodeBaseModule*) self); _tmp10_ = _tmp9_; vala_ccode_base_module_set_next_temp_var_id ((ValaCCodeBaseModule*) self, _tmp10_ + 1); _tmp11_ = g_strdup_printf ("_tmp%d_", _tmp10_); value_name = _tmp11_; _tmp12_ = vala_data_type_get_type_arguments ((ValaDataType*) type); _tmp13_ = _vala_iterable_ref0 (_tmp12_); type_args = _tmp13_; _tmp14_ = type_args; _tmp15_ = vala_collection_get_size ((ValaCollection*) _tmp14_); _tmp16_ = _tmp15_; if (_tmp16_ != 2) { ValaSourceReference* _tmp17_; ValaSourceReference* _tmp18_; ValaTypeSymbol* _tmp19_; ValaTypeSymbol* _tmp20_; gchar* _tmp21_; gchar* _tmp22_; gchar* _tmp23_; gchar* _tmp24_; ValaCCodeInvalidExpression* _tmp25_; _tmp17_ = vala_code_node_get_source_reference ((ValaCodeNode*) type); _tmp18_ = _tmp17_; _tmp19_ = vala_data_type_get_type_symbol ((ValaDataType*) type); _tmp20_ = _tmp19_; _tmp21_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp20_); _tmp22_ = _tmp21_; _tmp23_ = g_strdup_printf ("Missing type-arguments for GVariant serialization of `%s'", _tmp22_); _tmp24_ = _tmp23_; vala_report_error (_tmp18_, _tmp24_); _g_free0 (_tmp24_); _g_free0 (_tmp22_); _tmp25_ = vala_ccode_invalid_expression_new (); result = (ValaCCodeExpression*) _tmp25_; _vala_iterable_unref0 (type_args); _g_free0 (value_name); _g_free0 (key_name); _g_free0 (tableiter_name); _g_free0 (subiter_name); return result; } _tmp26_ = type_args; _tmp27_ = vala_list_get (_tmp26_, 0); key_type = (ValaDataType*) _tmp27_; _tmp28_ = type_args; _tmp29_ = vala_list_get (_tmp28_, 1); value_type = (ValaDataType*) _tmp29_; _tmp30_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp31_ = _tmp30_; _tmp32_ = subiter_name; _tmp33_ = vala_ccode_variable_declarator_new (_tmp32_, NULL, NULL); _tmp34_ = _tmp33_; vala_ccode_function_add_declaration (_tmp31_, "GVariantBuilder", (ValaCCodeDeclarator*) _tmp34_, 0); _vala_ccode_node_unref0 (_tmp34_); _tmp35_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp36_ = _tmp35_; _tmp37_ = tableiter_name; _tmp38_ = vala_ccode_variable_declarator_new (_tmp37_, NULL, NULL); _tmp39_ = _tmp38_; vala_ccode_function_add_declaration (_tmp36_, "GHashTableIter", (ValaCCodeDeclarator*) _tmp39_, 0); _vala_ccode_node_unref0 (_tmp39_); _tmp40_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp41_ = _tmp40_; _tmp42_ = key_name; _tmp43_ = vala_ccode_variable_declarator_new (_tmp42_, NULL, NULL); _tmp44_ = _tmp43_; vala_ccode_function_add_declaration (_tmp41_, "gpointer", (ValaCCodeDeclarator*) _tmp44_, 0); _vala_ccode_node_unref0 (_tmp44_); _tmp45_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp46_ = _tmp45_; _tmp47_ = value_name; _tmp48_ = vala_ccode_variable_declarator_new (_tmp47_, NULL, NULL); _tmp49_ = _tmp48_; vala_ccode_function_add_declaration (_tmp46_, "gpointer", (ValaCCodeDeclarator*) _tmp49_, 0); _vala_ccode_node_unref0 (_tmp49_); _tmp50_ = vala_ccode_identifier_new ("g_hash_table_iter_init"); _tmp51_ = _tmp50_; _tmp52_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp51_); _tmp53_ = _tmp52_; _vala_ccode_node_unref0 (_tmp51_); iter_init_call = _tmp53_; _tmp54_ = iter_init_call; _tmp55_ = tableiter_name; _tmp56_ = vala_ccode_identifier_new (_tmp55_); _tmp57_ = _tmp56_; _tmp58_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp57_); _tmp59_ = _tmp58_; vala_ccode_function_call_add_argument (_tmp54_, (ValaCCodeExpression*) _tmp59_); _vala_ccode_node_unref0 (_tmp59_); _vala_ccode_node_unref0 (_tmp57_); _tmp60_ = iter_init_call; vala_ccode_function_call_add_argument (_tmp60_, hash_table_expr); _tmp61_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp62_ = _tmp61_; _tmp63_ = iter_init_call; vala_ccode_function_add_expression (_tmp62_, (ValaCCodeExpression*) _tmp63_); _tmp64_ = vala_ccode_identifier_new ("G_VARIANT_TYPE"); _tmp65_ = _tmp64_; _tmp66_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp65_); _tmp67_ = _tmp66_; _vala_ccode_node_unref0 (_tmp65_); gvariant_type = _tmp67_; _tmp68_ = gvariant_type; _tmp69_ = vala_data_type_get_type_signature ((ValaDataType*) type, NULL); _tmp70_ = _tmp69_; _tmp71_ = g_strdup_printf ("\"%s\"", _tmp70_); _tmp72_ = _tmp71_; _tmp73_ = vala_ccode_constant_new (_tmp72_); _tmp74_ = _tmp73_; vala_ccode_function_call_add_argument (_tmp68_, (ValaCCodeExpression*) _tmp74_); _vala_ccode_node_unref0 (_tmp74_); _g_free0 (_tmp72_); _g_free0 (_tmp70_); _tmp75_ = vala_ccode_identifier_new ("g_variant_builder_init"); _tmp76_ = _tmp75_; _tmp77_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp76_); _tmp78_ = _tmp77_; _vala_ccode_node_unref0 (_tmp76_); iter_call = _tmp78_; _tmp79_ = iter_call; _tmp80_ = subiter_name; _tmp81_ = vala_ccode_identifier_new (_tmp80_); _tmp82_ = _tmp81_; _tmp83_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp82_); _tmp84_ = _tmp83_; vala_ccode_function_call_add_argument (_tmp79_, (ValaCCodeExpression*) _tmp84_); _vala_ccode_node_unref0 (_tmp84_); _vala_ccode_node_unref0 (_tmp82_); _tmp85_ = iter_call; _tmp86_ = gvariant_type; vala_ccode_function_call_add_argument (_tmp85_, (ValaCCodeExpression*) _tmp86_); _tmp87_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp88_ = _tmp87_; _tmp89_ = iter_call; vala_ccode_function_add_expression (_tmp88_, (ValaCCodeExpression*) _tmp89_); _tmp90_ = vala_ccode_identifier_new ("g_hash_table_iter_next"); _tmp91_ = _tmp90_; _tmp92_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp91_); _tmp93_ = _tmp92_; _vala_ccode_node_unref0 (_tmp91_); iter_next_call = _tmp93_; _tmp94_ = iter_next_call; _tmp95_ = tableiter_name; _tmp96_ = vala_ccode_identifier_new (_tmp95_); _tmp97_ = _tmp96_; _tmp98_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp97_); _tmp99_ = _tmp98_; vala_ccode_function_call_add_argument (_tmp94_, (ValaCCodeExpression*) _tmp99_); _vala_ccode_node_unref0 (_tmp99_); _vala_ccode_node_unref0 (_tmp97_); _tmp100_ = iter_next_call; _tmp101_ = key_name; _tmp102_ = vala_ccode_identifier_new (_tmp101_); _tmp103_ = _tmp102_; _tmp104_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp103_); _tmp105_ = _tmp104_; vala_ccode_function_call_add_argument (_tmp100_, (ValaCCodeExpression*) _tmp105_); _vala_ccode_node_unref0 (_tmp105_); _vala_ccode_node_unref0 (_tmp103_); _tmp106_ = iter_next_call; _tmp107_ = value_name; _tmp108_ = vala_ccode_identifier_new (_tmp107_); _tmp109_ = _tmp108_; _tmp110_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp109_); _tmp111_ = _tmp110_; vala_ccode_function_call_add_argument (_tmp106_, (ValaCCodeExpression*) _tmp111_); _vala_ccode_node_unref0 (_tmp111_); _vala_ccode_node_unref0 (_tmp109_); _tmp112_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp113_ = _tmp112_; _tmp114_ = iter_next_call; vala_ccode_function_open_while (_tmp113_, (ValaCCodeExpression*) _tmp114_); _tmp115_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp116_ = _tmp115_; _tmp117_ = key_type; _tmp118_ = vala_get_ccode_name ((ValaCodeNode*) _tmp117_); _tmp119_ = _tmp118_; _tmp120_ = vala_ccode_variable_declarator_new ("_key", NULL, NULL); _tmp121_ = _tmp120_; vala_ccode_function_add_declaration (_tmp116_, _tmp119_, (ValaCCodeDeclarator*) _tmp121_, 0); _vala_ccode_node_unref0 (_tmp121_); _g_free0 (_tmp119_); _tmp122_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp123_ = _tmp122_; _tmp124_ = value_type; _tmp125_ = vala_get_ccode_name ((ValaCodeNode*) _tmp124_); _tmp126_ = _tmp125_; _tmp127_ = vala_ccode_variable_declarator_new ("_value", NULL, NULL); _tmp128_ = _tmp127_; vala_ccode_function_add_declaration (_tmp123_, _tmp126_, (ValaCCodeDeclarator*) _tmp128_, 0); _vala_ccode_node_unref0 (_tmp128_); _g_free0 (_tmp126_); _tmp129_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp130_ = _tmp129_; _tmp131_ = vala_ccode_identifier_new ("_key"); _tmp132_ = _tmp131_; _tmp133_ = key_name; _tmp134_ = vala_ccode_identifier_new (_tmp133_); _tmp135_ = _tmp134_; _tmp136_ = key_type; _tmp137_ = vala_ccode_base_module_convert_from_generic_pointer ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) _tmp135_, _tmp136_); _tmp138_ = _tmp137_; vala_ccode_function_add_assignment (_tmp130_, (ValaCCodeExpression*) _tmp132_, _tmp138_); _vala_ccode_node_unref0 (_tmp138_); _vala_ccode_node_unref0 (_tmp135_); _vala_ccode_node_unref0 (_tmp132_); _tmp139_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp140_ = _tmp139_; _tmp141_ = vala_ccode_identifier_new ("_value"); _tmp142_ = _tmp141_; _tmp143_ = value_name; _tmp144_ = vala_ccode_identifier_new (_tmp143_); _tmp145_ = _tmp144_; _tmp146_ = value_type; _tmp147_ = vala_ccode_base_module_convert_from_generic_pointer ((ValaCCodeBaseModule*) self, (ValaCCodeExpression*) _tmp145_, _tmp146_); _tmp148_ = _tmp147_; vala_ccode_function_add_assignment (_tmp140_, (ValaCCodeExpression*) _tmp142_, _tmp148_); _vala_ccode_node_unref0 (_tmp148_); _vala_ccode_node_unref0 (_tmp145_); _vala_ccode_node_unref0 (_tmp142_); _tmp149_ = key_type; _tmp150_ = vala_ccode_identifier_new ("_key"); _tmp151_ = _tmp150_; _tmp152_ = vala_ccode_base_module_serialize_expression ((ValaCCodeBaseModule*) self, _tmp149_, (ValaCCodeExpression*) _tmp151_); _tmp153_ = _tmp152_; _vala_ccode_node_unref0 (_tmp151_); serialized_key = _tmp153_; _tmp154_ = value_type; _tmp155_ = vala_ccode_identifier_new ("_value"); _tmp156_ = _tmp155_; _tmp157_ = vala_ccode_base_module_serialize_expression ((ValaCCodeBaseModule*) self, _tmp154_, (ValaCCodeExpression*) _tmp156_); _tmp158_ = _tmp157_; _vala_ccode_node_unref0 (_tmp156_); serialized_value = _tmp158_; _tmp160_ = serialized_key; if (_tmp160_ == NULL) { _tmp159_ = TRUE; } else { ValaCCodeExpression* _tmp161_; _tmp161_ = serialized_value; _tmp159_ = _tmp161_ == NULL; } if (_tmp159_) { result = NULL; _vala_ccode_node_unref0 (serialized_value); _vala_ccode_node_unref0 (serialized_key); _vala_ccode_node_unref0 (iter_next_call); _vala_ccode_node_unref0 (iter_call); _vala_ccode_node_unref0 (gvariant_type); _vala_ccode_node_unref0 (iter_init_call); _vala_code_node_unref0 (value_type); _vala_code_node_unref0 (key_type); _vala_iterable_unref0 (type_args); _g_free0 (value_name); _g_free0 (key_name); _g_free0 (tableiter_name); _g_free0 (subiter_name); return result; } _tmp162_ = vala_ccode_identifier_new ("g_variant_builder_add"); _tmp163_ = _tmp162_; _tmp164_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp163_); _vala_ccode_node_unref0 (iter_call); iter_call = _tmp164_; _vala_ccode_node_unref0 (_tmp163_); _tmp165_ = iter_call; _tmp166_ = subiter_name; _tmp167_ = vala_ccode_identifier_new (_tmp166_); _tmp168_ = _tmp167_; _tmp169_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp168_); _tmp170_ = _tmp169_; vala_ccode_function_call_add_argument (_tmp165_, (ValaCCodeExpression*) _tmp170_); _vala_ccode_node_unref0 (_tmp170_); _vala_ccode_node_unref0 (_tmp168_); _tmp171_ = iter_call; _tmp172_ = vala_ccode_constant_new ("\"{?*}\""); _tmp173_ = _tmp172_; vala_ccode_function_call_add_argument (_tmp171_, (ValaCCodeExpression*) _tmp173_); _vala_ccode_node_unref0 (_tmp173_); _tmp174_ = iter_call; _tmp175_ = serialized_key; vala_ccode_function_call_add_argument (_tmp174_, _tmp175_); _tmp176_ = iter_call; _tmp177_ = serialized_value; vala_ccode_function_call_add_argument (_tmp176_, _tmp177_); _tmp178_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp179_ = _tmp178_; _tmp180_ = iter_call; vala_ccode_function_add_expression (_tmp179_, (ValaCCodeExpression*) _tmp180_); _tmp181_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp182_ = _tmp181_; vala_ccode_function_close (_tmp182_); _tmp183_ = vala_ccode_identifier_new ("g_variant_builder_end"); _tmp184_ = _tmp183_; _tmp185_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp184_); _vala_ccode_node_unref0 (iter_call); iter_call = _tmp185_; _vala_ccode_node_unref0 (_tmp184_); _tmp186_ = iter_call; _tmp187_ = subiter_name; _tmp188_ = vala_ccode_identifier_new (_tmp187_); _tmp189_ = _tmp188_; _tmp190_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, (ValaCCodeExpression*) _tmp189_); _tmp191_ = _tmp190_; vala_ccode_function_call_add_argument (_tmp186_, (ValaCCodeExpression*) _tmp191_); _vala_ccode_node_unref0 (_tmp191_); _vala_ccode_node_unref0 (_tmp189_); result = (ValaCCodeExpression*) iter_call; _vala_ccode_node_unref0 (serialized_value); _vala_ccode_node_unref0 (serialized_key); _vala_ccode_node_unref0 (iter_next_call); _vala_ccode_node_unref0 (gvariant_type); _vala_ccode_node_unref0 (iter_init_call); _vala_code_node_unref0 (value_type); _vala_code_node_unref0 (key_type); _vala_iterable_unref0 (type_args); _g_free0 (value_name); _g_free0 (key_name); _g_free0 (tableiter_name); _g_free0 (subiter_name); return result; } static ValaCCodeExpression* vala_gvariant_module_real_serialize_expression (ValaCCodeBaseModule* base, ValaDataType* type, ValaCCodeExpression* expr) { ValaGVariantModule * self; ValaGVariantModuleBasicTypeInfo basic_type = {0}; ValaCCodeExpression* _result_ = NULL; ValaTypeSymbol* _tmp0_; ValaTypeSymbol* _tmp1_; ValaCCodeExpression* _tmp44_; ValaCCodeExpression* result = NULL; self = (ValaGVariantModule*) base; g_return_val_if_fail (type != NULL, NULL); g_return_val_if_fail (expr != NULL, NULL); _result_ = NULL; _tmp0_ = vala_data_type_get_type_symbol (type); _tmp1_ = _tmp0_; if (vala_gvariant_module_is_string_marshalled_enum (_tmp1_)) { ValaGVariantModuleBasicTypeInfo _tmp2_ = {0}; ValaCCodeExpression* _tmp3_; ValaGVariantModuleBasicTypeInfo _tmp4_; ValaCCodeExpression* _tmp5_; ValaCCodeExpression* _tmp6_; vala_gvariant_module_get_basic_type_info (self, "s", &_tmp2_); basic_type = _tmp2_; _tmp3_ = vala_gvariant_module_generate_enum_value_to_string (self, G_TYPE_CHECK_INSTANCE_TYPE (type, VALA_TYPE_ENUM_VALUE_TYPE) ? ((ValaEnumValueType*) type) : NULL, expr); _vala_ccode_node_unref0 (_result_); _result_ = _tmp3_; _tmp4_ = basic_type; _tmp5_ = _result_; _tmp6_ = vala_gvariant_module_serialize_basic (self, &_tmp4_, _tmp5_); _vala_ccode_node_unref0 (_result_); _result_ = _tmp6_; } else { gchar* _tmp7_; gchar* _tmp8_; ValaGVariantModuleBasicTypeInfo _tmp9_ = {0}; gboolean _tmp10_; gboolean _tmp11_; _tmp7_ = vala_data_type_get_type_signature (type, NULL); _tmp8_ = _tmp7_; _tmp10_ = vala_gvariant_module_get_basic_type_info (self, _tmp8_, &_tmp9_); basic_type = _tmp9_; _tmp11_ = _tmp10_; _g_free0 (_tmp8_); if (_tmp11_) { ValaGVariantModuleBasicTypeInfo _tmp12_; ValaCCodeExpression* _tmp13_; _tmp12_ = basic_type; _tmp13_ = vala_gvariant_module_serialize_basic (self, &_tmp12_, expr); _vala_ccode_node_unref0 (_result_); _result_ = _tmp13_; } else { if (G_TYPE_CHECK_INSTANCE_TYPE (type, VALA_TYPE_ARRAY_TYPE)) { ValaCCodeExpression* _tmp14_; _tmp14_ = vala_gvariant_module_serialize_array (self, G_TYPE_CHECK_INSTANCE_CAST (type, VALA_TYPE_ARRAY_TYPE, ValaArrayType), expr); _vala_ccode_node_unref0 (_result_); _result_ = _tmp14_; } else { ValaTypeSymbol* _tmp15_; ValaTypeSymbol* _tmp16_; _tmp15_ = vala_data_type_get_type_symbol (type); _tmp16_ = _tmp15_; if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp16_, VALA_TYPE_STRUCT)) { ValaCCodeExpression* st_expr = NULL; ValaCCodeExpression* _tmp17_; gboolean _tmp18_; gboolean _tmp19_; ValaTypeSymbol* _tmp22_; ValaTypeSymbol* _tmp23_; ValaCCodeExpression* _tmp24_; ValaCCodeExpression* _tmp25_; _tmp17_ = _vala_ccode_node_ref0 (expr); st_expr = _tmp17_; _tmp18_ = vala_data_type_get_nullable (type); _tmp19_ = _tmp18_; if (_tmp19_) { ValaCCodeExpression* _tmp20_; ValaCCodeUnaryExpression* _tmp21_; _tmp20_ = st_expr; _tmp21_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_POINTER_INDIRECTION, _tmp20_); _vala_ccode_node_unref0 (st_expr); st_expr = (ValaCCodeExpression*) _tmp21_; } _tmp22_ = vala_data_type_get_type_symbol (type); _tmp23_ = _tmp22_; _tmp24_ = st_expr; _tmp25_ = vala_gvariant_module_serialize_struct (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, VALA_TYPE_STRUCT, ValaStruct), _tmp24_); _vala_ccode_node_unref0 (_result_); _result_ = _tmp25_; _vala_ccode_node_unref0 (st_expr); } else { if (G_TYPE_CHECK_INSTANCE_TYPE (type, VALA_TYPE_OBJECT_TYPE)) { ValaTypeSymbol* _tmp26_; ValaTypeSymbol* _tmp27_; gchar* _tmp28_; gchar* _tmp29_; gboolean _tmp30_; _tmp26_ = vala_data_type_get_type_symbol (type); _tmp27_ = _tmp26_; _tmp28_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp27_); _tmp29_ = _tmp28_; _tmp30_ = g_strcmp0 (_tmp29_, "GLib.Variant") == 0; _g_free0 (_tmp29_); if (_tmp30_) { ValaCCodeFunctionCall* variant_new = NULL; ValaCCodeIdentifier* _tmp31_; ValaCCodeIdentifier* _tmp32_; ValaCCodeFunctionCall* _tmp33_; ValaCCodeFunctionCall* _tmp34_; ValaCCodeFunctionCall* _tmp35_; ValaCCodeFunctionCall* _tmp36_; ValaCCodeExpression* _tmp37_; _tmp31_ = vala_ccode_identifier_new ("g_variant_new_variant"); _tmp32_ = _tmp31_; _tmp33_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp32_); _tmp34_ = _tmp33_; _vala_ccode_node_unref0 (_tmp32_); variant_new = _tmp34_; _tmp35_ = variant_new; vala_ccode_function_call_add_argument (_tmp35_, expr); _tmp36_ = variant_new; _tmp37_ = _vala_ccode_node_ref0 ((ValaCCodeExpression*) _tmp36_); _vala_ccode_node_unref0 (_result_); _result_ = _tmp37_; _vala_ccode_node_unref0 (variant_new); } else { ValaTypeSymbol* _tmp38_; ValaTypeSymbol* _tmp39_; gchar* _tmp40_; gchar* _tmp41_; gboolean _tmp42_; _tmp38_ = vala_data_type_get_type_symbol (type); _tmp39_ = _tmp38_; _tmp40_ = vala_symbol_get_full_name ((ValaSymbol*) _tmp39_); _tmp41_ = _tmp40_; _tmp42_ = g_strcmp0 (_tmp41_, "GLib.HashTable") == 0; _g_free0 (_tmp41_); if (_tmp42_) { ValaCCodeExpression* _tmp43_; _tmp43_ = vala_gvariant_module_serialize_hash_table (self, G_TYPE_CHECK_INSTANCE_CAST (type, VALA_TYPE_OBJECT_TYPE, ValaObjectType), expr); _vala_ccode_node_unref0 (_result_); _result_ = _tmp43_; } } } } } } } _tmp44_ = _result_; if (_tmp44_ == NULL) { ValaSourceReference* _tmp45_; ValaSourceReference* _tmp46_; gchar* _tmp47_; gchar* _tmp48_; gchar* _tmp49_; gchar* _tmp50_; ValaCCodeInvalidExpression* _tmp51_; _tmp45_ = vala_code_node_get_source_reference ((ValaCodeNode*) type); _tmp46_ = _tmp45_; _tmp47_ = vala_code_node_to_string ((ValaCodeNode*) type); _tmp48_ = _tmp47_; _tmp49_ = g_strdup_printf ("GVariant serialization of type `%s' is not supported", _tmp48_); _tmp50_ = _tmp49_; vala_report_error (_tmp46_, _tmp50_); _g_free0 (_tmp50_); _g_free0 (_tmp48_); _tmp51_ = vala_ccode_invalid_expression_new (); result = (ValaCCodeExpression*) _tmp51_; _vala_ccode_node_unref0 (_result_); return result; } result = _result_; return result; } void vala_gvariant_module_write_expression (ValaGVariantModule* self, ValaDataType* type, ValaCCodeExpression* builder_expr, ValaCCodeExpression* expr, ValaSymbol* sym) { ValaCCodeExpression* variant_expr = NULL; ValaCCodeExpression* _tmp0_; gboolean _tmp1_ = FALSE; ValaCCodeExpression* _tmp5_; g_return_if_fail (self != NULL); g_return_if_fail (type != NULL); g_return_if_fail (builder_expr != NULL); g_return_if_fail (expr != NULL); _tmp0_ = _vala_ccode_node_ref0 (expr); variant_expr = _tmp0_; if (sym == NULL) { _tmp1_ = TRUE; } else { gchar* _tmp2_; gchar* _tmp3_; _tmp2_ = vala_gvariant_module_get_dbus_signature (sym); _tmp3_ = _tmp2_; _tmp1_ = _tmp3_ == NULL; _g_free0 (_tmp3_); } if (_tmp1_) { ValaCCodeExpression* _tmp4_; _tmp4_ = vala_ccode_base_module_serialize_expression ((ValaCCodeBaseModule*) self, type, expr); _vala_ccode_node_unref0 (variant_expr); variant_expr = _tmp4_; } _tmp5_ = variant_expr; if (_tmp5_ != NULL) { ValaCCodeFunctionCall* builder_add = NULL; ValaCCodeIdentifier* _tmp6_; ValaCCodeIdentifier* _tmp7_; ValaCCodeFunctionCall* _tmp8_; ValaCCodeFunctionCall* _tmp9_; ValaCCodeFunctionCall* _tmp10_; ValaCCodeUnaryExpression* _tmp11_; ValaCCodeUnaryExpression* _tmp12_; ValaCCodeFunctionCall* _tmp13_; ValaCCodeExpression* _tmp14_; ValaCCodeFunction* _tmp15_; ValaCCodeFunction* _tmp16_; ValaCCodeFunctionCall* _tmp17_; _tmp6_ = vala_ccode_identifier_new ("g_variant_builder_add_value"); _tmp7_ = _tmp6_; _tmp8_ = vala_ccode_function_call_new ((ValaCCodeExpression*) _tmp7_); _tmp9_ = _tmp8_; _vala_ccode_node_unref0 (_tmp7_); builder_add = _tmp9_; _tmp10_ = builder_add; _tmp11_ = vala_ccode_unary_expression_new (VALA_CCODE_UNARY_OPERATOR_ADDRESS_OF, builder_expr); _tmp12_ = _tmp11_; vala_ccode_function_call_add_argument (_tmp10_, (ValaCCodeExpression*) _tmp12_); _vala_ccode_node_unref0 (_tmp12_); _tmp13_ = builder_add; _tmp14_ = variant_expr; vala_ccode_function_call_add_argument (_tmp13_, _tmp14_); _tmp15_ = vala_ccode_base_module_get_ccode ((ValaCCodeBaseModule*) self); _tmp16_ = _tmp15_; _tmp17_ = builder_add; vala_ccode_function_add_expression (_tmp16_, (ValaCCodeExpression*) _tmp17_); _vala_ccode_node_unref0 (builder_add); } _vala_ccode_node_unref0 (variant_expr); } ValaGVariantModule* vala_gvariant_module_construct (GType object_type) { ValaGVariantModule* self = NULL; self = (ValaGVariantModule*) vala_gvalue_module_construct (object_type); return self; } ValaGVariantModule* vala_gvariant_module_new (void) { return vala_gvariant_module_construct (VALA_TYPE_GVARIANT_MODULE); } static ValaGVariantModuleBasicTypeInfo* vala_gvariant_module_basic_type_info_dup (const ValaGVariantModuleBasicTypeInfo* self) { ValaGVariantModuleBasicTypeInfo* dup; dup = g_new0 (ValaGVariantModuleBasicTypeInfo, 1); memcpy (dup, self, sizeof (ValaGVariantModuleBasicTypeInfo)); return dup; } static void vala_gvariant_module_basic_type_info_free (ValaGVariantModuleBasicTypeInfo* self) { g_free (self); } static GType vala_gvariant_module_basic_type_info_get_type_once (void) { GType vala_gvariant_module_basic_type_info_type_id; vala_gvariant_module_basic_type_info_type_id = g_boxed_type_register_static ("ValaGVariantModuleBasicTypeInfo", (GBoxedCopyFunc) vala_gvariant_module_basic_type_info_dup, (GBoxedFreeFunc) vala_gvariant_module_basic_type_info_free); return vala_gvariant_module_basic_type_info_type_id; } static GType vala_gvariant_module_basic_type_info_get_type (void) { static volatile gsize vala_gvariant_module_basic_type_info_type_id__volatile = 0; if (g_once_init_enter (&vala_gvariant_module_basic_type_info_type_id__volatile)) { GType vala_gvariant_module_basic_type_info_type_id; vala_gvariant_module_basic_type_info_type_id = vala_gvariant_module_basic_type_info_get_type_once (); g_once_init_leave (&vala_gvariant_module_basic_type_info_type_id__volatile, vala_gvariant_module_basic_type_info_type_id); } return vala_gvariant_module_basic_type_info_type_id__volatile; } static void vala_gvariant_module_class_init (ValaGVariantModuleClass * klass, gpointer klass_data) { vala_gvariant_module_parent_class = g_type_class_peek_parent (klass); ((ValaCodeVisitorClass *) klass)->finalize = vala_gvariant_module_finalize; g_type_class_adjust_private_offset (klass, &ValaGVariantModule_private_offset); ((ValaCodeVisitorClass *) klass)->visit_enum = (void (*) (ValaCodeVisitor*, ValaEnum*)) vala_gvariant_module_real_visit_enum; ((ValaCCodeBaseModuleClass *) klass)->generate_enum_declaration = (gboolean (*) (ValaCCodeBaseModule*, ValaEnum*, ValaCCodeFile*)) vala_gvariant_module_real_generate_enum_declaration; ((ValaCodeVisitorClass *) klass)->visit_cast_expression = (void (*) (ValaCodeVisitor*, ValaCastExpression*)) vala_gvariant_module_real_visit_cast_expression; ((ValaCCodeBaseModuleClass *) klass)->deserialize_expression = (ValaCCodeExpression* (*) (ValaCCodeBaseModule*, ValaDataType*, ValaCCodeExpression*, ValaCCodeExpression*, ValaCCodeExpression*, gboolean*)) vala_gvariant_module_real_deserialize_expression; ((ValaCCodeBaseModuleClass *) klass)->serialize_expression = (ValaCCodeExpression* (*) (ValaCCodeBaseModule*, ValaDataType*, ValaCCodeExpression*)) vala_gvariant_module_real_serialize_expression; } static void vala_gvariant_module_instance_init (ValaGVariantModule * self, gpointer klass) { self->priv = vala_gvariant_module_get_instance_private (self); self->priv->next_variant_function_id = 0; } static void vala_gvariant_module_finalize (ValaCodeVisitor * obj) { ValaGVariantModule * self; self = G_TYPE_CHECK_INSTANCE_CAST (obj, VALA_TYPE_GVARIANT_MODULE, ValaGVariantModule); VALA_CODE_VISITOR_CLASS (vala_gvariant_module_parent_class)->finalize (obj); } static GType vala_gvariant_module_get_type_once (void) { static const GTypeInfo g_define_type_info = { sizeof (ValaGVariantModuleClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_gvariant_module_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaGVariantModule), 0, (GInstanceInitFunc) vala_gvariant_module_instance_init, NULL }; GType vala_gvariant_module_type_id; vala_gvariant_module_type_id = g_type_register_static (VALA_TYPE_GVALUE_MODULE, "ValaGVariantModule", &g_define_type_info, 0); ValaGVariantModule_private_offset = g_type_add_instance_private (vala_gvariant_module_type_id, sizeof (ValaGVariantModulePrivate)); return vala_gvariant_module_type_id; } GType vala_gvariant_module_get_type (void) { static volatile gsize vala_gvariant_module_type_id__volatile = 0; if (g_once_init_enter (&vala_gvariant_module_type_id__volatile)) { GType vala_gvariant_module_type_id; vala_gvariant_module_type_id = vala_gvariant_module_get_type_once (); g_once_init_leave (&vala_gvariant_module_type_id__volatile, vala_gvariant_module_type_id); } return vala_gvariant_module_type_id__volatile; }