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

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

enum  {
	PROTON_PLUS_UTILS_VDF_NODE_0_PROPERTY,
	PROTON_PLUS_UTILS_VDF_NODE_NUM_PROPERTIES
};
static GParamSpec* proton_plus_utils_vdf_node_properties[PROTON_PLUS_UTILS_VDF_NODE_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))

static gpointer proton_plus_utils_vdf_node_parent_class = NULL;

static gint proton_plus_utils_vdf_node_case_insensitive_compare (const gchar* str1,
                                                          const gchar* str2);
static void proton_plus_utils_vdf_node_finalize (GObject * obj);
static GType proton_plus_utils_vdf_node_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static gint
proton_plus_utils_vdf_node_case_insensitive_compare (const gchar* str1,
                                                     const gchar* str2)
{
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gint _tmp4_;
	gint result;
	g_return_val_if_fail (str1 != NULL, -1);
	g_return_val_if_fail (str2 != NULL, -1);
	_tmp0_ = g_utf8_casefold (str1, (gssize) -1);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_utf8_casefold (str2, (gssize) -1);
	_tmp3_ = _tmp2_;
	_tmp4_ = g_utf8_collate (_tmp1_, _tmp3_);
	_g_free0 (_tmp3_);
	_g_free0 (_tmp1_);
	result = _tmp4_;
	return result;
}

ProtonPlusUtilsVDFNode*
proton_plus_utils_vdf_node_construct (GType object_type,
                                      const gchar* name)
{
	ProtonPlusUtilsVDFNode * self = NULL;
	gchar* _tmp0_;
	g_return_val_if_fail (name != NULL, NULL);
	self = (ProtonPlusUtilsVDFNode*) gee_tree_map_construct (object_type, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, G_TYPE_VARIANT, (GBoxedCopyFunc) g_variant_ref, (GDestroyNotify) g_variant_unref, (GCompareDataFunc) proton_plus_utils_vdf_node_case_insensitive_compare, NULL, NULL, NULL, NULL, NULL);
	_tmp0_ = g_strdup (name);
	_g_free0 (self->node_name);
	self->node_name = _tmp0_;
	return self;
}

ProtonPlusUtilsVDFNode*
proton_plus_utils_vdf_node_new (const gchar* name)
{
	return proton_plus_utils_vdf_node_construct (PROTON_PLUS_UTILS_VDF_TYPE_NODE, name);
}

static void
proton_plus_utils_vdf_node_class_init (ProtonPlusUtilsVDFNodeClass * klass,
                                       gpointer klass_data)
{
	proton_plus_utils_vdf_node_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = proton_plus_utils_vdf_node_finalize;
}

static void
proton_plus_utils_vdf_node_instance_init (ProtonPlusUtilsVDFNode * self,
                                          gpointer klass)
{
}

static void
proton_plus_utils_vdf_node_finalize (GObject * obj)
{
	ProtonPlusUtilsVDFNode * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PROTON_PLUS_UTILS_VDF_TYPE_NODE, ProtonPlusUtilsVDFNode);
	_g_free0 (self->node_name);
	G_OBJECT_CLASS (proton_plus_utils_vdf_node_parent_class)->finalize (obj);
}

static GType
proton_plus_utils_vdf_node_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (ProtonPlusUtilsVDFNodeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) proton_plus_utils_vdf_node_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ProtonPlusUtilsVDFNode), 0, (GInstanceInitFunc) proton_plus_utils_vdf_node_instance_init, NULL };
	GType proton_plus_utils_vdf_node_type_id;
	proton_plus_utils_vdf_node_type_id = g_type_register_static (GEE_TYPE_TREE_MAP, "ProtonPlusUtilsVDFNode", &g_define_type_info, 0);
	return proton_plus_utils_vdf_node_type_id;
}

GType
proton_plus_utils_vdf_node_get_type (void)
{
	static volatile gsize proton_plus_utils_vdf_node_type_id__once = 0;
	if (g_once_init_enter (&proton_plus_utils_vdf_node_type_id__once)) {
		GType proton_plus_utils_vdf_node_type_id;
		proton_plus_utils_vdf_node_type_id = proton_plus_utils_vdf_node_get_type_once ();
		g_once_init_leave (&proton_plus_utils_vdf_node_type_id__once, proton_plus_utils_vdf_node_type_id);
	}
	return proton_plus_utils_vdf_node_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;
}

