/* github-compatible-release-parser.c generated by valac 0.56.19, the Vala compiler
 * generated from github-compatible-release-parser.vala, do not modify */

#include <glib-object.h>
#include "protonplus_core.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <json-glib/json-glib.h>
#include <gee.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

#define PROTON_PLUS_PROVIDERS_SOURCES_TYPE_GIT_HUB_COMPATIBLE_RELEASE_PARSER (proton_plus_providers_sources_git_hub_compatible_release_parser_get_type ())
#define PROTON_PLUS_PROVIDERS_SOURCES_GIT_HUB_COMPATIBLE_RELEASE_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PROTON_PLUS_PROVIDERS_SOURCES_TYPE_GIT_HUB_COMPATIBLE_RELEASE_PARSER, ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser))
#define PROTON_PLUS_PROVIDERS_SOURCES_GIT_HUB_COMPATIBLE_RELEASE_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PROTON_PLUS_PROVIDERS_SOURCES_TYPE_GIT_HUB_COMPATIBLE_RELEASE_PARSER, ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserClass))
#define PROTON_PLUS_PROVIDERS_SOURCES_IS_GIT_HUB_COMPATIBLE_RELEASE_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PROTON_PLUS_PROVIDERS_SOURCES_TYPE_GIT_HUB_COMPATIBLE_RELEASE_PARSER))
#define PROTON_PLUS_PROVIDERS_SOURCES_IS_GIT_HUB_COMPATIBLE_RELEASE_PARSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PROTON_PLUS_PROVIDERS_SOURCES_TYPE_GIT_HUB_COMPATIBLE_RELEASE_PARSER))
#define PROTON_PLUS_PROVIDERS_SOURCES_GIT_HUB_COMPATIBLE_RELEASE_PARSER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PROTON_PLUS_PROVIDERS_SOURCES_TYPE_GIT_HUB_COMPATIBLE_RELEASE_PARSER, ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserClass))

typedef struct _ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser;
typedef struct _ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserClass ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserClass;
typedef struct _ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserPrivate ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserPrivate;
enum  {
	PROTON_PLUS_PROVIDERS_SOURCES_GIT_HUB_COMPATIBLE_RELEASE_PARSER_0_PROPERTY,
	PROTON_PLUS_PROVIDERS_SOURCES_GIT_HUB_COMPATIBLE_RELEASE_PARSER_NUM_PROPERTIES
};
static GParamSpec* proton_plus_providers_sources_git_hub_compatible_release_parser_properties[PROTON_PLUS_PROVIDERS_SOURCES_GIT_HUB_COMPATIBLE_RELEASE_PARSER_NUM_PROPERTIES];
#define _json_array_unref0(var) ((var == NULL) ? NULL : (var = (json_array_unref (var), NULL)))
#define _json_object_unref0(var) ((var == NULL) ? NULL : (var = (json_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser {
	GObject parent_instance;
	ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserPrivate * priv;
};

struct _ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserClass {
	GObjectClass parent_class;
};

static gpointer proton_plus_providers_sources_git_hub_compatible_release_parser_parent_class = NULL;

VALA_EXTERN GType proton_plus_providers_sources_git_hub_compatible_release_parser_get_type (void) G_GNUC_CONST ;
VALA_EXTERN ProtonPlusModelsToolsReleasePageResult* proton_plus_providers_sources_git_hub_compatible_release_parser_parse (ProtonPlusModelsProvidersProviderDefinition* definition,
                                                                                                               const gchar* response_body,
                                                                                                               gint requested_page,
                                                                                                               gint limit);
VALA_EXTERN JsonArray* proton_plus_providers_sources_release_source_support_parse_array (const gchar* response_body);
static GeeLinkedList* proton_plus_providers_sources_git_hub_compatible_release_parser_parse_assets (JsonObject* release);
VALA_EXTERN gchar* proton_plus_providers_sources_release_source_support_get_iso8601_date (JsonObject* object,
                                                                              const gchar* member);
VALA_EXTERN void proton_plus_providers_sources_release_source_support_add_variants (ProtonPlusModelsRelease* release,
                                                                        GeeIterable* variants);
VALA_EXTERN ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser* proton_plus_providers_sources_git_hub_compatible_release_parser_new (void);
VALA_EXTERN ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser* proton_plus_providers_sources_git_hub_compatible_release_parser_construct (GType object_type);
static GType proton_plus_providers_sources_git_hub_compatible_release_parser_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static gpointer
_json_object_ref0 (gpointer self)
{
	return self ? json_object_ref (self) : NULL;
}

static gchar*
string_strip (const gchar* self)
{
	gchar* _result_ = NULL;
	gchar* _tmp0_;
	gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	g_strstrip (_result_);
	result = _result_;
	return result;
}

ProtonPlusModelsToolsReleasePageResult*
proton_plus_providers_sources_git_hub_compatible_release_parser_parse (ProtonPlusModelsProvidersProviderDefinition* definition,
                                                                       const gchar* response_body,
                                                                       gint requested_page,
                                                                       gint limit)
{
	JsonArray* root_array = NULL;
	JsonArray* _tmp0_;
	JsonArray* _tmp1_;
	GeeLinkedList* releases = NULL;
	GeeLinkedList* _tmp3_;
	GeeLinkedList* _tmp59_;
	JsonArray* _tmp60_;
	ProtonPlusModelsToolsReleasePage* _tmp61_;
	ProtonPlusModelsToolsReleasePage* _tmp62_;
	ProtonPlusModelsToolsReleasePageResult* _tmp63_;
	ProtonPlusModelsToolsReleasePageResult* _tmp64_;
	ProtonPlusModelsToolsReleasePageResult* result;
	g_return_val_if_fail (definition != NULL, NULL);
	g_return_val_if_fail (response_body != NULL, NULL);
	_tmp0_ = proton_plus_providers_sources_release_source_support_parse_array (response_body);
	root_array = _tmp0_;
	_tmp1_ = root_array;
	if (_tmp1_ == NULL) {
		ProtonPlusModelsToolsReleasePageResult* _tmp2_;
		_tmp2_ = proton_plus_models_tools_release_page_result_failure (PROTON_PLUS_RETURN_CODE_INVALID_DATA);
		result = _tmp2_;
		_json_array_unref0 (root_array);
		return result;
	}
	_tmp3_ = gee_linked_list_new (PROTON_PLUS_MODELS_TYPE_RELEASE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	releases = _tmp3_;
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				JsonArray* _tmp6_;
				JsonObject* object = NULL;
				JsonArray* _tmp7_;
				JsonObject* _tmp8_;
				JsonObject* _tmp9_;
				JsonObject* _tmp10_;
				gboolean _tmp11_ = FALSE;
				JsonObject* _tmp12_;
				gchar* tag_name = NULL;
				JsonObject* _tmp14_;
				const gchar* _tmp15_;
				gchar* _tmp16_;
				const gchar* _tmp17_;
				GeeLinkedList* assets = NULL;
				JsonObject* _tmp18_;
				GeeLinkedList* _tmp19_;
				GeeLinkedList* _tmp20_;
				gint _tmp21_;
				gint _tmp22_;
				GeeLinkedList* variants = NULL;
				const gchar* _tmp23_;
				const gchar* _tmp24_;
				GeeLinkedList* _tmp25_;
				GeeLinkedList* _tmp26_;
				ProtonPlusModelsAssetsAsset* primary_asset = NULL;
				GeeLinkedList* _tmp27_;
				GeeLinkedList* _tmp28_;
				ProtonPlusModelsAssetsAsset* _tmp29_;
				ProtonPlusModelsAssetsAsset* _tmp30_;
				gchar* _tmp31_ = NULL;
				gboolean _tmp32_ = FALSE;
				JsonObject* _tmp33_;
				ProtonPlusModelsRelease* release = NULL;
				const gchar* _tmp38_;
				JsonObject* _tmp39_;
				const gchar* _tmp40_;
				gchar* _tmp41_;
				gchar* _tmp42_;
				JsonObject* _tmp43_;
				gchar* _tmp44_;
				gchar* _tmp45_;
				ProtonPlusModelsAssetsAsset* _tmp46_;
				JsonObject* _tmp47_;
				const gchar* _tmp48_;
				ProtonPlusModelsAssetsAsset* _tmp49_;
				gint64 _tmp50_;
				gint64 _tmp51_;
				const gchar* _tmp52_;
				ProtonPlusModelsRelease* _tmp53_;
				ProtonPlusModelsRelease* _tmp54_;
				ProtonPlusModelsRelease* _tmp55_;
				GeeLinkedList* _tmp56_;
				GeeLinkedList* _tmp57_;
				ProtonPlusModelsRelease* _tmp58_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = index;
					index = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp6_ = root_array;
				if (!(((guint) index) < json_array_get_length (_tmp6_))) {
					break;
				}
				_tmp7_ = root_array;
				_tmp8_ = json_array_get_object_element (_tmp7_, (guint) index);
				_tmp9_ = _json_object_ref0 (_tmp8_);
				object = _tmp9_;
				_tmp10_ = object;
				if (_tmp10_ == NULL) {
					_json_object_unref0 (object);
					continue;
				}
				_tmp12_ = object;
				if (json_object_get_boolean_member_with_default (_tmp12_, "draft", FALSE)) {
					_tmp11_ = TRUE;
				} else {
					JsonObject* _tmp13_;
					_tmp13_ = object;
					_tmp11_ = json_object_get_boolean_member_with_default (_tmp13_, "prerelease", FALSE);
				}
				if (_tmp11_) {
					_json_object_unref0 (object);
					continue;
				}
				_tmp14_ = object;
				_tmp15_ = json_object_get_string_member_with_default (_tmp14_, "tag_name", "");
				_tmp16_ = g_strdup (_tmp15_);
				tag_name = _tmp16_;
				_tmp17_ = tag_name;
				if (!proton_plus_providers_sources_catalog_release_builder_is_eligible (definition, _tmp17_)) {
					_g_free0 (tag_name);
					_json_object_unref0 (object);
					continue;
				}
				_tmp18_ = object;
				_tmp19_ = proton_plus_providers_sources_git_hub_compatible_release_parser_parse_assets (_tmp18_);
				assets = _tmp19_;
				_tmp20_ = assets;
				_tmp21_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp20_);
				_tmp22_ = _tmp21_;
				if (_tmp22_ == 0) {
					_g_object_unref0 (assets);
					_g_free0 (tag_name);
					_json_object_unref0 (object);
					continue;
				}
				_tmp23_ = tag_name;
				_tmp24_ = tag_name;
				_tmp25_ = assets;
				_tmp26_ = proton_plus_providers_sources_catalog_release_builder_create_variants (definition, _tmp23_, _tmp24_, _tmp25_);
				variants = _tmp26_;
				_tmp27_ = assets;
				_tmp28_ = variants;
				_tmp29_ = proton_plus_providers_sources_catalog_release_builder_select_default_asset (_tmp27_, _tmp28_);
				primary_asset = _tmp29_;
				_tmp30_ = primary_asset;
				if (_tmp30_ == NULL) {
					_g_object_unref0 (primary_asset);
					_g_object_unref0 (variants);
					_g_object_unref0 (assets);
					_g_free0 (tag_name);
					_json_object_unref0 (object);
					continue;
				}
				_tmp33_ = object;
				if (json_object_has_member (_tmp33_, "id")) {
					JsonObject* _tmp34_;
					_tmp34_ = object;
					_tmp32_ = json_object_get_int_member (_tmp34_, "id") > ((gint64) 0);
				} else {
					_tmp32_ = FALSE;
				}
				if (_tmp32_) {
					JsonObject* _tmp35_;
					gchar* _tmp36_;
					_tmp35_ = object;
					_tmp36_ = g_strdup_printf ("%" G_GINT64_FORMAT, json_object_get_int_member (_tmp35_, "id"));
					_g_free0 (_tmp31_);
					_tmp31_ = _tmp36_;
				} else {
					gchar* _tmp37_;
					_tmp37_ = g_strdup ("");
					_g_free0 (_tmp31_);
					_tmp31_ = _tmp37_;
				}
				_tmp38_ = tag_name;
				_tmp39_ = object;
				_tmp40_ = json_object_get_string_member_with_default (_tmp39_, "body", "");
				_tmp41_ = string_strip (_tmp40_);
				_tmp42_ = _tmp41_;
				_tmp43_ = object;
				_tmp44_ = proton_plus_providers_sources_release_source_support_get_iso8601_date (_tmp43_, "created_at");
				_tmp45_ = _tmp44_;
				_tmp46_ = primary_asset;
				_tmp47_ = object;
				_tmp48_ = json_object_get_string_member_with_default (_tmp47_, "html_url", "");
				_tmp49_ = primary_asset;
				_tmp50_ = proton_plus_models_assets_asset_get_download_size (_tmp49_);
				_tmp51_ = _tmp50_;
				_tmp52_ = tag_name;
				_tmp53_ = proton_plus_models_release_new (_tmp38_, _tmp42_, _tmp45_, _tmp46_, _tmp48_, &_tmp51_, _tmp31_, _tmp52_, PROTON_PLUS_MODELS_RELEASE_KIND_GENERIC, "");
				_tmp54_ = _tmp53_;
				_g_free0 (_tmp45_);
				_g_free0 (_tmp42_);
				release = _tmp54_;
				_tmp55_ = release;
				_tmp56_ = variants;
				proton_plus_providers_sources_release_source_support_add_variants (_tmp55_, (GeeIterable*) _tmp56_);
				_tmp57_ = releases;
				_tmp58_ = release;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp57_, _tmp58_);
				_g_object_unref0 (release);
				_g_free0 (_tmp31_);
				_g_object_unref0 (primary_asset);
				_g_object_unref0 (variants);
				_g_object_unref0 (assets);
				_g_free0 (tag_name);
				_json_object_unref0 (object);
			}
		}
	}
	_tmp59_ = releases;
	_tmp60_ = root_array;
	_tmp61_ = proton_plus_models_tools_release_page_new (_tmp59_, requested_page + 1, json_array_get_length (_tmp60_) == ((guint) limit));
	_tmp62_ = _tmp61_;
	_tmp63_ = proton_plus_models_tools_release_page_result_success (_tmp62_);
	_tmp64_ = _tmp63_;
	_g_object_unref0 (_tmp62_);
	result = _tmp64_;
	_g_object_unref0 (releases);
	_json_array_unref0 (root_array);
	return result;
}

static gpointer
_json_array_ref0 (gpointer self)
{
	return self ? json_array_ref (self) : NULL;
}

static GeeLinkedList*
proton_plus_providers_sources_git_hub_compatible_release_parser_parse_assets (JsonObject* release)
{
	GeeLinkedList* assets = NULL;
	GeeLinkedList* _tmp0_;
	JsonArray* array = NULL;
	JsonArray* _tmp1_;
	JsonArray* _tmp2_;
	JsonArray* _tmp3_;
	GeeLinkedList* result;
	g_return_val_if_fail (release != NULL, NULL);
	_tmp0_ = gee_linked_list_new (PROTON_PLUS_MODELS_ASSETS_TYPE_ASSET, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
	assets = _tmp0_;
	_tmp1_ = json_object_get_array_member (release, "assets");
	_tmp2_ = _json_array_ref0 (_tmp1_);
	array = _tmp2_;
	_tmp3_ = array;
	if (_tmp3_ == NULL) {
		result = assets;
		_json_array_unref0 (array);
		return result;
	}
	{
		gint index = 0;
		index = 0;
		{
			gboolean _tmp4_ = FALSE;
			_tmp4_ = TRUE;
			while (TRUE) {
				JsonArray* _tmp6_;
				JsonObject* object = NULL;
				JsonArray* _tmp7_;
				JsonObject* _tmp8_;
				JsonObject* _tmp9_;
				JsonObject* _tmp10_;
				gchar* name = NULL;
				JsonObject* _tmp11_;
				const gchar* _tmp12_;
				gchar* _tmp13_;
				gchar* download_url = NULL;
				JsonObject* _tmp14_;
				const gchar* _tmp15_;
				gchar* _tmp16_;
				gboolean _tmp17_ = FALSE;
				gboolean _tmp18_ = FALSE;
				const gchar* _tmp19_;
				gint64 _tmp22_ = 0LL;
				JsonObject* _tmp23_;
				GeeLinkedList* _tmp25_;
				const gchar* _tmp26_;
				const gchar* _tmp27_;
				JsonObject* _tmp28_;
				const gchar* _tmp29_;
				ProtonPlusModelsAssetsAsset* _tmp30_;
				ProtonPlusModelsAssetsAsset* _tmp31_;
				if (!_tmp4_) {
					gint _tmp5_;
					_tmp5_ = index;
					index = _tmp5_ + 1;
				}
				_tmp4_ = FALSE;
				_tmp6_ = array;
				if (!(((guint) index) < json_array_get_length (_tmp6_))) {
					break;
				}
				_tmp7_ = array;
				_tmp8_ = json_array_get_object_element (_tmp7_, (guint) index);
				_tmp9_ = _json_object_ref0 (_tmp8_);
				object = _tmp9_;
				_tmp10_ = object;
				if (_tmp10_ == NULL) {
					_json_object_unref0 (object);
					continue;
				}
				_tmp11_ = object;
				_tmp12_ = json_object_get_string_member_with_default (_tmp11_, "name", "");
				_tmp13_ = g_strdup (_tmp12_);
				name = _tmp13_;
				_tmp14_ = object;
				_tmp15_ = json_object_get_string_member_with_default (_tmp14_, "browser_download_url", "");
				_tmp16_ = g_strdup (_tmp15_);
				download_url = _tmp16_;
				_tmp19_ = name;
				if (g_strcmp0 (_tmp19_, "") == 0) {
					_tmp18_ = TRUE;
				} else {
					const gchar* _tmp20_;
					_tmp20_ = download_url;
					_tmp18_ = g_strcmp0 (_tmp20_, "") == 0;
				}
				if (_tmp18_) {
					_tmp17_ = TRUE;
				} else {
					const gchar* _tmp21_;
					_tmp21_ = name;
					_tmp17_ = !proton_plus_models_assets_asset_is_archive_name (_tmp21_);
				}
				if (_tmp17_) {
					_g_free0 (download_url);
					_g_free0 (name);
					_json_object_unref0 (object);
					continue;
				}
				_tmp23_ = object;
				if (json_object_has_member (_tmp23_, "size")) {
					JsonObject* _tmp24_;
					_tmp24_ = object;
					_tmp22_ = json_object_get_int_member (_tmp24_, "size");
				} else {
					_tmp22_ = (gint64) 0;
				}
				_tmp25_ = assets;
				_tmp26_ = name;
				_tmp27_ = download_url;
				_tmp28_ = object;
				_tmp29_ = json_object_get_string_member_with_default (_tmp28_, "digest", "");
				_tmp30_ = proton_plus_models_assets_asset_new (_tmp26_, _tmp27_, _tmp22_, _tmp29_);
				_tmp31_ = _tmp30_;
				gee_abstract_collection_add ((GeeAbstractCollection*) _tmp25_, _tmp31_);
				_g_object_unref0 (_tmp31_);
				_g_free0 (download_url);
				_g_free0 (name);
				_json_object_unref0 (object);
			}
		}
	}
	result = assets;
	_json_array_unref0 (array);
	return result;
}

ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser*
proton_plus_providers_sources_git_hub_compatible_release_parser_construct (GType object_type)
{
	ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser * self = NULL;
	self = (ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser*) g_object_new (object_type, NULL);
	return self;
}

ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser*
proton_plus_providers_sources_git_hub_compatible_release_parser_new (void)
{
	return proton_plus_providers_sources_git_hub_compatible_release_parser_construct (PROTON_PLUS_PROVIDERS_SOURCES_TYPE_GIT_HUB_COMPATIBLE_RELEASE_PARSER);
}

static void
proton_plus_providers_sources_git_hub_compatible_release_parser_class_init (ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserClass * klass,
                                                                            gpointer klass_data)
{
	proton_plus_providers_sources_git_hub_compatible_release_parser_parent_class = g_type_class_peek_parent (klass);
}

static void
proton_plus_providers_sources_git_hub_compatible_release_parser_instance_init (ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser * self,
                                                                               gpointer klass)
{
}

static GType
proton_plus_providers_sources_git_hub_compatible_release_parser_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusProvidersSourcesGitHubCompatibleReleaseParserClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_providers_sources_git_hub_compatible_release_parser_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser), 0, (GInstanceInitFunc) proton_plus_providers_sources_git_hub_compatible_release_parser_instance_init, NULL };
	GType proton_plus_providers_sources_git_hub_compatible_release_parser_type_id;
	proton_plus_providers_sources_git_hub_compatible_release_parser_type_id = g_type_register_static (G_TYPE_OBJECT, "ProtonPlusProvidersSourcesGitHubCompatibleReleaseParser", &g_define_type_info, 0);
	return proton_plus_providers_sources_git_hub_compatible_release_parser_type_id;
}

GType
proton_plus_providers_sources_git_hub_compatible_release_parser_get_type (void)
{
	static volatile gsize proton_plus_providers_sources_git_hub_compatible_release_parser_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_providers_sources_git_hub_compatible_release_parser_type_id__once)) {
		GType proton_plus_providers_sources_git_hub_compatible_release_parser_type_id;
		proton_plus_providers_sources_git_hub_compatible_release_parser_type_id = proton_plus_providers_sources_git_hub_compatible_release_parser_get_type_once ();
		g_once_init_leave (&proton_plus_providers_sources_git_hub_compatible_release_parser_type_id__once, proton_plus_providers_sources_git_hub_compatible_release_parser_type_id);
	}
	return proton_plus_providers_sources_git_hub_compatible_release_parser_type_id__once;
}

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;
}

