/* variant.c generated by valac 0.56.19, the Vala compiler
 * generated from variant.vala, do not modify */

#include "protonplus_core.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib-object.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	PROTON_PLUS_MODELS_VARIANT_0_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_ID_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_NAME_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_FORMAT_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_IS_DEFAULT_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_DOWNLOAD_URL_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_ASSET_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_PROPERTY,
	PROTON_PLUS_MODELS_VARIANT_NUM_PROPERTIES
};
static GParamSpec* proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ProtonPlusModelsVariantPrivate {
	gchar* _id;
	gchar* _name;
	gchar* _format;
	gboolean _is_default;
	gchar* _download_url;
	ProtonPlusModelsAssetsAsset* _asset;
	ProtonPlusModelsVariantCompatibility* _compatibility;
};

static gint ProtonPlusModelsVariant_private_offset;
static gpointer proton_plus_models_variant_parent_class = NULL;

static void proton_plus_models_variant_set_id (ProtonPlusModelsVariant* self,
                                        const gchar* value);
static void proton_plus_models_variant_set_name (ProtonPlusModelsVariant* self,
                                          const gchar* value);
static void proton_plus_models_variant_set_format (ProtonPlusModelsVariant* self,
                                            const gchar* value);
static void proton_plus_models_variant_set_is_default (ProtonPlusModelsVariant* self,
                                                gboolean value);
static void proton_plus_models_variant_set_asset (ProtonPlusModelsVariant* self,
                                           ProtonPlusModelsAssetsAsset* value);
static void proton_plus_models_variant_set_compatibility (ProtonPlusModelsVariant* self,
                                                   ProtonPlusModelsVariantCompatibility* value);
static void proton_plus_models_variant_finalize (GObject * obj);
static GType proton_plus_models_variant_get_type_once (void);
static void _vala_proton_plus_models_variant_get_property (GObject * object,
                                                    guint property_id,
                                                    GValue * value,
                                                    GParamSpec * pspec);
static void _vala_proton_plus_models_variant_set_property (GObject * object,
                                                    guint property_id,
                                                    const GValue * value,
                                                    GParamSpec * pspec);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static inline gpointer
proton_plus_models_variant_get_instance_private (ProtonPlusModelsVariant* self)
{
	return G_STRUCT_MEMBER_P (self, ProtonPlusModelsVariant_private_offset);
}

ProtonPlusModelsVariant*
proton_plus_models_variant_construct (GType object_type,
                                      const gchar* id,
                                      const gchar* name,
                                      const gchar* format,
                                      gboolean is_default,
                                      const gchar* download_url,
                                      ProtonPlusModelsVariantCompatibility* compatibility,
                                      ProtonPlusModelsAssetsAsset* asset)
{
	ProtonPlusModelsVariant * self = NULL;
	ProtonPlusModelsVariantCompatibility* _tmp0_ = NULL;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (name != NULL, NULL);
	g_return_val_if_fail (format != NULL, NULL);
	self = (ProtonPlusModelsVariant*) g_object_new (object_type, NULL);
	proton_plus_models_variant_set_id (self, id);
	proton_plus_models_variant_set_name (self, name);
	proton_plus_models_variant_set_format (self, format);
	proton_plus_models_variant_set_is_default (self, is_default);
	proton_plus_models_variant_set_download_url (self, download_url);
	proton_plus_models_variant_set_asset (self, asset);
	if (compatibility != NULL) {
		ProtonPlusModelsVariantCompatibility* _tmp1_;
		_tmp1_ = proton_plus_models_variant_compatibility_copy (compatibility);
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp1_;
	} else {
		ProtonPlusModelsVariantCompatibility* _tmp2_;
		_tmp2_ = proton_plus_models_variant_compatibility_unspecified ();
		_g_object_unref0 (_tmp0_);
		_tmp0_ = _tmp2_;
	}
	proton_plus_models_variant_set_compatibility (self, _tmp0_);
	_g_object_unref0 (_tmp0_);
	return self;
}

ProtonPlusModelsVariant*
proton_plus_models_variant_new (const gchar* id,
                                const gchar* name,
                                const gchar* format,
                                gboolean is_default,
                                const gchar* download_url,
                                ProtonPlusModelsVariantCompatibility* compatibility,
                                ProtonPlusModelsAssetsAsset* asset)
{
	return proton_plus_models_variant_construct (PROTON_PLUS_MODELS_TYPE_VARIANT, id, name, format, is_default, download_url, compatibility, asset);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

ProtonPlusModelsAssetsAsset*
proton_plus_models_variant_resolved_asset (ProtonPlusModelsVariant* self)
{
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_;
	gboolean _tmp3_ = FALSE;
	ProtonPlusModelsAssetsAsset* _tmp4_;
	const gchar* _tmp11_;
	ProtonPlusModelsAssetsAsset* _tmp12_;
	ProtonPlusModelsAssetsAsset* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = self->priv->_download_url;
	if (_tmp1_ == NULL) {
		_tmp0_ = TRUE;
	} else {
		const gchar* _tmp2_;
		_tmp2_ = self->priv->_download_url;
		_tmp0_ = g_strcmp0 (_tmp2_, "") == 0;
	}
	if (_tmp0_) {
		result = NULL;
		return result;
	}
	_tmp4_ = self->priv->_asset;
	if (_tmp4_ != NULL) {
		ProtonPlusModelsAssetsAsset* _tmp5_;
		const gchar* _tmp6_;
		const gchar* _tmp7_;
		const gchar* _tmp8_;
		_tmp5_ = self->priv->_asset;
		_tmp6_ = proton_plus_models_assets_asset_get_download_url (_tmp5_);
		_tmp7_ = _tmp6_;
		_tmp8_ = self->priv->_download_url;
		_tmp3_ = g_strcmp0 (_tmp7_, _tmp8_) == 0;
	} else {
		_tmp3_ = FALSE;
	}
	if (_tmp3_) {
		ProtonPlusModelsAssetsAsset* _tmp9_;
		ProtonPlusModelsAssetsAsset* _tmp10_;
		_tmp9_ = self->priv->_asset;
		_tmp10_ = _g_object_ref0 (_tmp9_);
		result = _tmp10_;
		return result;
	}
	_tmp11_ = self->priv->_download_url;
	_tmp12_ = proton_plus_models_assets_asset_from_download_url ((const gchar*) _tmp11_, (gint64) 0, "");
	result = _tmp12_;
	return result;
}

gboolean
proton_plus_models_variant_is_compatible_with (ProtonPlusModelsVariant* self,
                                               ProtonPlusModelsCpuCapabilities* capabilities)
{
	ProtonPlusModelsVariantCompatibility* _tmp0_;
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	g_return_val_if_fail (capabilities != NULL, FALSE);
	_tmp0_ = self->priv->_compatibility;
	result = proton_plus_models_variant_compatibility_is_compatible_with (_tmp0_, capabilities);
	return result;
}

const gchar*
proton_plus_models_variant_get_id (ProtonPlusModelsVariant* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_id;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_variant_set_id (ProtonPlusModelsVariant* self,
                                   const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_get_id (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_id);
		self->priv->_id = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_ID_PROPERTY]);
	}
}

const gchar*
proton_plus_models_variant_get_name (ProtonPlusModelsVariant* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_name;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_variant_set_name (ProtonPlusModelsVariant* self,
                                     const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_get_name (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_name);
		self->priv->_name = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_NAME_PROPERTY]);
	}
}

const gchar*
proton_plus_models_variant_get_format (ProtonPlusModelsVariant* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_format;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_variant_set_format (ProtonPlusModelsVariant* self,
                                       const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_get_format (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_format);
		self->priv->_format = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_FORMAT_PROPERTY]);
	}
}

gboolean
proton_plus_models_variant_get_is_default (ProtonPlusModelsVariant* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_is_default;
	return result;
}

static void
proton_plus_models_variant_set_is_default (ProtonPlusModelsVariant* self,
                                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_get_is_default (self);
	if (old_value != value) {
		self->priv->_is_default = value;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_IS_DEFAULT_PROPERTY]);
	}
}

const gchar*
proton_plus_models_variant_get_download_url (ProtonPlusModelsVariant* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_download_url;
	result = _tmp0_;
	return result;
}

void
proton_plus_models_variant_set_download_url (ProtonPlusModelsVariant* self,
                                             const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_get_download_url (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_download_url);
		self->priv->_download_url = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_DOWNLOAD_URL_PROPERTY]);
	}
}

ProtonPlusModelsAssetsAsset*
proton_plus_models_variant_get_asset (ProtonPlusModelsVariant* self)
{
	ProtonPlusModelsAssetsAsset* result;
	ProtonPlusModelsAssetsAsset* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_asset;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_variant_set_asset (ProtonPlusModelsVariant* self,
                                      ProtonPlusModelsAssetsAsset* value)
{
	ProtonPlusModelsAssetsAsset* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_get_asset (self);
	if (old_value != value) {
		ProtonPlusModelsAssetsAsset* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_asset);
		self->priv->_asset = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_ASSET_PROPERTY]);
	}
}

ProtonPlusModelsVariantCompatibility*
proton_plus_models_variant_get_compatibility (ProtonPlusModelsVariant* self)
{
	ProtonPlusModelsVariantCompatibility* result;
	ProtonPlusModelsVariantCompatibility* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_compatibility;
	result = _tmp0_;
	return result;
}

static void
proton_plus_models_variant_set_compatibility (ProtonPlusModelsVariant* self,
                                              ProtonPlusModelsVariantCompatibility* value)
{
	ProtonPlusModelsVariantCompatibility* old_value;
	g_return_if_fail (self != NULL);
	old_value = proton_plus_models_variant_get_compatibility (self);
	if (old_value != value) {
		ProtonPlusModelsVariantCompatibility* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_compatibility);
		self->priv->_compatibility = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_PROPERTY]);
	}
}

static void
proton_plus_models_variant_class_init (ProtonPlusModelsVariantClass * klass,
                                       gpointer klass_data)
{
	proton_plus_models_variant_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &ProtonPlusModelsVariant_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_proton_plus_models_variant_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_proton_plus_models_variant_set_property;
	G_OBJECT_CLASS (klass)->finalize = proton_plus_models_variant_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_ID_PROPERTY, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_ID_PROPERTY] = g_param_spec_string ("id", "id", "id", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_NAME_PROPERTY, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_NAME_PROPERTY] = g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_FORMAT_PROPERTY, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_FORMAT_PROPERTY] = g_param_spec_string ("format", "format", "format", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_IS_DEFAULT_PROPERTY, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_IS_DEFAULT_PROPERTY] = g_param_spec_boolean ("is-default", "is-default", "is-default", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_DOWNLOAD_URL_PROPERTY, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_DOWNLOAD_URL_PROPERTY] = g_param_spec_string ("download-url", "download-url", "download-url", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_ASSET_PROPERTY, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_ASSET_PROPERTY] = g_param_spec_object ("asset", "asset", "asset", PROTON_PLUS_MODELS_ASSETS_TYPE_ASSET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_PROPERTY, proton_plus_models_variant_properties[PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_PROPERTY] = g_param_spec_object ("compatibility", "compatibility", "compatibility", PROTON_PLUS_MODELS_TYPE_VARIANT_COMPATIBILITY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
proton_plus_models_variant_instance_init (ProtonPlusModelsVariant * self,
                                          gpointer klass)
{
	self->priv = proton_plus_models_variant_get_instance_private (self);
	self->priv->_is_default = FALSE;
	self->priv->_asset = NULL;
}

static void
proton_plus_models_variant_finalize (GObject * obj)
{
	ProtonPlusModelsVariant * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_MODELS_TYPE_VARIANT, ProtonPlusModelsVariant);
	_g_free0 (self->priv->_id);
	_g_free0 (self->priv->_name);
	_g_free0 (self->priv->_format);
	_g_free0 (self->priv->_download_url);
	_g_object_unref0 (self->priv->_asset);
	_g_object_unref0 (self->priv->_compatibility);
	G_OBJECT_CLASS (proton_plus_models_variant_parent_class)->finalize (obj);
}

static GType
proton_plus_models_variant_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusModelsVariantClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_models_variant_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusModelsVariant), 0, (GInstanceInitFunc) proton_plus_models_variant_instance_init, NULL };
	GType proton_plus_models_variant_type_id;
	proton_plus_models_variant_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusModelsVariant", &g_define_type_info, 0);
	ProtonPlusModelsVariant_private_offset = g_type_add_instance_private (proton_plus_models_variant_type_id, sizeof (ProtonPlusModelsVariantPrivate));
	return proton_plus_models_variant_type_id;
}

GType
proton_plus_models_variant_get_type (void)
{
	static volatile gsize proton_plus_models_variant_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_models_variant_type_id__once)) {
		GType proton_plus_models_variant_type_id;
		proton_plus_models_variant_type_id = proton_plus_models_variant_get_type_once ();
		g_once_init_leave (&proton_plus_models_variant_type_id__once, proton_plus_models_variant_type_id);
	}
	return proton_plus_models_variant_type_id__once;
}

static void
_vala_proton_plus_models_variant_get_property (GObject * object,
                                               guint property_id,
                                               GValue * value,
                                               GParamSpec * pspec)
{
	ProtonPlusModelsVariant * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_VARIANT, ProtonPlusModelsVariant);
	switch (property_id) {
		case PROTON_PLUS_MODELS_VARIANT_ID_PROPERTY:
		g_value_set_string (value, proton_plus_models_variant_get_id (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_NAME_PROPERTY:
		g_value_set_string (value, proton_plus_models_variant_get_name (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_FORMAT_PROPERTY:
		g_value_set_string (value, proton_plus_models_variant_get_format (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_IS_DEFAULT_PROPERTY:
		g_value_set_boolean (value, proton_plus_models_variant_get_is_default (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_DOWNLOAD_URL_PROPERTY:
		g_value_set_string (value, proton_plus_models_variant_get_download_url (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_ASSET_PROPERTY:
		g_value_set_object (value, proton_plus_models_variant_get_asset (self));
		break;
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_PROPERTY:
		g_value_set_object (value, proton_plus_models_variant_get_compatibility (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_proton_plus_models_variant_set_property (GObject * object,
                                               guint property_id,
                                               const GValue * value,
                                               GParamSpec * pspec)
{
	ProtonPlusModelsVariant * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, PROTON_PLUS_MODELS_TYPE_VARIANT, ProtonPlusModelsVariant);
	switch (property_id) {
		case PROTON_PLUS_MODELS_VARIANT_ID_PROPERTY:
		proton_plus_models_variant_set_id (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_VARIANT_NAME_PROPERTY:
		proton_plus_models_variant_set_name (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_VARIANT_FORMAT_PROPERTY:
		proton_plus_models_variant_set_format (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_VARIANT_IS_DEFAULT_PROPERTY:
		proton_plus_models_variant_set_is_default (self, g_value_get_boolean (value));
		break;
		case PROTON_PLUS_MODELS_VARIANT_DOWNLOAD_URL_PROPERTY:
		proton_plus_models_variant_set_download_url (self, g_value_get_string (value));
		break;
		case PROTON_PLUS_MODELS_VARIANT_ASSET_PROPERTY:
		proton_plus_models_variant_set_asset (self, g_value_get_object (value));
		break;
		case PROTON_PLUS_MODELS_VARIANT_COMPATIBILITY_PROPERTY:
		proton_plus_models_variant_set_compatibility (self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

