/* gitg-utils.c generated by valac 0.34.0.108-f56ac, the Vala compiler
 * generated from gitg-utils.vala, do not modify */

/*
 *
 * Copyright (C) 2015 - Jesse van den Kieboom
 *
 * gitg is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * gitg 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <libgitg/gitg-platform-support.h>
#include <gobject/gvaluecollector.h>


#define GITG_TYPE_UTILS (gitg_utils_get_type ())
#define GITG_UTILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_UTILS, GitgUtils))
#define GITG_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_UTILS, GitgUtilsClass))
#define GITG_IS_UTILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_UTILS))
#define GITG_IS_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_UTILS))
#define GITG_UTILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_UTILS, GitgUtilsClass))

typedef struct _GitgUtils GitgUtils;
typedef struct _GitgUtilsClass GitgUtilsClass;
typedef struct _GitgUtilsPrivate GitgUtilsPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GitgParamSpecUtils GitgParamSpecUtils;

struct _GitgUtils {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GitgUtilsPrivate * priv;
};

struct _GitgUtilsClass {
	GTypeClass parent_class;
	void (*finalize) (GitgUtils *self);
};

struct _GitgParamSpecUtils {
	GParamSpec parent_instance;
};


static gpointer gitg_utils_parent_class = NULL;

gpointer gitg_utils_ref (gpointer instance);
void gitg_utils_unref (gpointer instance);
GParamSpec* gitg_param_spec_utils (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gitg_value_set_utils (GValue* value, gpointer v_object);
void gitg_value_take_utils (GValue* value, gpointer v_object);
gpointer gitg_value_get_utils (const GValue* value);
GType gitg_utils_get_type (void) G_GNUC_CONST;
enum  {
	GITG_UTILS_DUMMY_PROPERTY
};
gchar* gitg_utils_replace_home_dir_with_tilde (GFile* file);
gchar* gitg_utils_expand_home_dir (const gchar* path);
GitgUtils* gitg_utils_new (void);
GitgUtils* gitg_utils_construct (GType object_type);
static void gitg_utils_finalize (GitgUtils * obj);


static gchar* string_slice (const gchar* self, glong start, glong end) {
	gchar* result = NULL;
	glong string_length = 0L;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	glong _tmp2_ = 0L;
	glong _tmp5_ = 0L;
	gboolean _tmp8_ = FALSE;
	glong _tmp9_ = 0L;
	gboolean _tmp12_ = FALSE;
	glong _tmp13_ = 0L;
	glong _tmp16_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	gchar* _tmp21_ = NULL;
#line 1347 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1348 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1348 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1348 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	string_length = (glong) _tmp1_;
#line 1349 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp2_ = start;
#line 1349 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp2_ < ((glong) 0)) {
#line 109 "gitg-utils.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
#line 1350 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp3_ = string_length;
#line 1350 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = start;
#line 1350 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		start = _tmp3_ + _tmp4_;
#line 118 "gitg-utils.c"
	}
#line 1352 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp5_ = end;
#line 1352 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp5_ < ((glong) 0)) {
#line 124 "gitg-utils.c"
		glong _tmp6_ = 0L;
		glong _tmp7_ = 0L;
#line 1353 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = string_length;
#line 1353 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp7_ = end;
#line 1353 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		end = _tmp6_ + _tmp7_;
#line 133 "gitg-utils.c"
	}
#line 1355 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp9_ = start;
#line 1355 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp9_ >= ((glong) 0)) {
#line 139 "gitg-utils.c"
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1355 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp10_ = start;
#line 1355 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp11_ = string_length;
#line 1355 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp10_ <= _tmp11_;
#line 148 "gitg-utils.c"
	} else {
#line 1355 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp8_ = FALSE;
#line 152 "gitg-utils.c"
	}
#line 1355 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp8_, NULL);
#line 1356 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp13_ = end;
#line 1356 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp13_ >= ((glong) 0)) {
#line 160 "gitg-utils.c"
		glong _tmp14_ = 0L;
		glong _tmp15_ = 0L;
#line 1356 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp14_ = end;
#line 1356 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1356 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp12_ = _tmp14_ <= _tmp15_;
#line 169 "gitg-utils.c"
	} else {
#line 1356 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp12_ = FALSE;
#line 173 "gitg-utils.c"
	}
#line 1356 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp12_, NULL);
#line 1357 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp16_ = start;
#line 1357 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp17_ = end;
#line 1357 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
#line 1358 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp18_ = start;
#line 1358 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp19_ = end;
#line 1358 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp20_ = start;
#line 1358 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
#line 1358 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	result = _tmp21_;
#line 1358 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 195 "gitg-utils.c"
}


gchar* gitg_utils_replace_home_dir_with_tilde (GFile* file) {
	gchar* result = NULL;
	gchar* name = NULL;
	GFile* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* homedir = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	GError * _inner_error_ = NULL;
#line 24 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	g_return_val_if_fail (file != NULL, NULL);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp0_ = file;
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp1_ = g_file_get_parse_name (_tmp0_);
#line 26 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	name = _tmp1_;
#line 27 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp2_ = g_get_home_dir ();
#line 27 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 27 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	homedir = _tmp3_;
#line 29 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp4_ = homedir;
#line 29 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (_tmp4_ != NULL) {
#line 227 "gitg-utils.c"
		{
			gchar* hd = NULL;
			const gchar* _tmp5_ = NULL;
			gchar* _tmp6_ = NULL;
			const gchar* _tmp7_ = NULL;
			const gchar* _tmp8_ = NULL;
#line 33 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp5_ = homedir;
#line 33 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp6_ = g_filename_to_utf8 (_tmp5_, (gssize) -1, NULL, NULL, &_inner_error_);
#line 33 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			hd = _tmp6_;
#line 33 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 242 "gitg-utils.c"
				goto __catch113_g_error;
			}
#line 35 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp7_ = hd;
#line 35 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp8_ = name;
#line 35 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			if (g_strcmp0 (_tmp7_, _tmp8_) == 0) {
#line 251 "gitg-utils.c"
				gchar* _tmp9_ = NULL;
#line 37 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_tmp9_ = g_strdup ("~/");
#line 37 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_g_free0 (name);
#line 37 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				name = _tmp9_;
#line 259 "gitg-utils.c"
			} else {
				const gchar* _tmp10_ = NULL;
				const gchar* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
				gboolean _tmp14_ = FALSE;
				gboolean _tmp15_ = FALSE;
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_tmp10_ = name;
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_tmp11_ = hd;
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_tmp12_ = g_strconcat (_tmp11_, "/", NULL);
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_tmp13_ = _tmp12_;
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_tmp14_ = g_str_has_prefix (_tmp10_, _tmp13_);
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_tmp15_ = _tmp14_;
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				_g_free0 (_tmp13_);
#line 41 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
				if (_tmp15_) {
#line 283 "gitg-utils.c"
					const gchar* _tmp16_ = NULL;
					const gchar* _tmp17_ = NULL;
					gint _tmp18_ = 0;
					gint _tmp19_ = 0;
					const gchar* _tmp20_ = NULL;
					gint _tmp21_ = 0;
					gint _tmp22_ = 0;
					gchar* _tmp23_ = NULL;
					gchar* _tmp24_ = NULL;
					gchar* _tmp25_ = NULL;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp16_ = name;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp17_ = hd;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp18_ = strlen (_tmp17_);
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp19_ = _tmp18_;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp20_ = name;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp21_ = strlen (_tmp20_);
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp22_ = _tmp21_;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp23_ = string_slice (_tmp16_, (glong) _tmp19_, (glong) _tmp22_);
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp24_ = _tmp23_;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_tmp25_ = g_strconcat ("~", _tmp24_, NULL);
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_g_free0 (name);
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					name = _tmp25_;
#line 43 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
					_g_free0 (_tmp24_);
#line 320 "gitg-utils.c"
				}
			}
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_g_free0 (hd);
#line 325 "gitg-utils.c"
		}
		goto __finally113;
		__catch113_g_error:
		{
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			g_clear_error (&_inner_error_);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_inner_error_ = NULL;
#line 334 "gitg-utils.c"
		}
		__finally113:
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_g_free0 (homedir);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_g_free0 (name);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			g_clear_error (&_inner_error_);
#line 31 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			return NULL;
#line 349 "gitg-utils.c"
		}
	}
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	result = name;
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_g_free0 (homedir);
#line 49 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return result;
#line 358 "gitg-utils.c"
}


static gint string_index_of_char (const gchar* self, gunichar c, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_ = 0;
	gunichar _tmp1_ = 0U;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 1023 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 1024 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = start_index;
#line 1024 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = c;
#line 1024 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp2_ = g_utf8_strchr (((gchar*) self) + _tmp0_, (gssize) -1, _tmp1_);
#line 1024 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_result_ = _tmp2_;
#line 1026 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp3_ = _result_;
#line 1026 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 383 "gitg-utils.c"
		gchar* _tmp4_ = NULL;
#line 1027 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = _result_;
#line 1027 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		result = (gint) (_tmp4_ - ((gchar*) self));
#line 1027 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 391 "gitg-utils.c"
	} else {
#line 1029 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		result = -1;
#line 1029 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 397 "gitg-utils.c"
	}
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* end = NULL;
	gchar* _tmp0_ = NULL;
	glong _tmp1_ = 0L;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 1314 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1314 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1314 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1314 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1315 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1315 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 421 "gitg-utils.c"
		glong _tmp4_ = 0L;
#line 1316 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1316 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1316 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 429 "gitg-utils.c"
	} else {
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_ = NULL;
#line 1318 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1318 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1318 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1318 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 441 "gitg-utils.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_ = 0L;
	glong _tmp8_ = 0L;
	glong _tmp14_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	glong _tmp21_ = 0L;
	gchar* _tmp22_ = NULL;
#line 1325 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1327 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1327 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 465 "gitg-utils.c"
		glong _tmp2_ = 0L;
#line 1327 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1327 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 471 "gitg-utils.c"
	} else {
#line 1327 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 475 "gitg-utils.c"
	}
#line 1327 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp0_) {
#line 479 "gitg-utils.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
		glong _tmp5_ = 0L;
#line 1329 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp3_ = offset;
#line 1329 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = len;
#line 1329 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp5_ = string_strnlen ((gchar*) self, _tmp3_ + _tmp4_);
#line 1329 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		string_length = _tmp5_;
#line 491 "gitg-utils.c"
	} else {
		gint _tmp6_ = 0;
		gint _tmp7_ = 0;
#line 1331 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = strlen (self);
#line 1331 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp7_ = _tmp6_;
#line 1331 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp7_;
#line 501 "gitg-utils.c"
	}
#line 1334 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp8_ = offset;
#line 1334 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp8_ < ((glong) 0)) {
#line 507 "gitg-utils.c"
		glong _tmp9_ = 0L;
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1335 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp9_ = string_length;
#line 1335 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp10_ = offset;
#line 1335 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		offset = _tmp9_ + _tmp10_;
#line 1336 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1336 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp11_ >= ((glong) 0), NULL);
#line 521 "gitg-utils.c"
	} else {
		glong _tmp12_ = 0L;
		glong _tmp13_ = 0L;
#line 1338 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1338 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp13_ = string_length;
#line 1338 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ <= _tmp13_, NULL);
#line 531 "gitg-utils.c"
	}
#line 1340 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp14_ = len;
#line 1340 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp14_ < ((glong) 0)) {
#line 537 "gitg-utils.c"
		glong _tmp15_ = 0L;
		glong _tmp16_ = 0L;
#line 1341 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1341 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp16_ = offset;
#line 1341 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
		len = _tmp15_ - _tmp16_;
#line 546 "gitg-utils.c"
	}
#line 1343 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp17_ = offset;
#line 1343 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp18_ = len;
#line 1343 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp19_ = string_length;
#line 1343 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp17_ + _tmp18_) <= _tmp19_, NULL);
#line 1344 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp20_ = offset;
#line 1344 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp21_ = len;
#line 1344 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp22_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) _tmp21_);
#line 1344 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	result = _tmp22_;
#line 1344 "/home/jesse/.local/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 566 "gitg-utils.c"
}


gchar* gitg_utils_expand_home_dir (const gchar* path) {
	gchar* result = NULL;
	gchar* homedir = NULL;
	gint pos = 0;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp12_ = NULL;
	const gchar* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
#line 52 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	g_return_val_if_fail (path != NULL, NULL);
#line 54 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	homedir = NULL;
#line 55 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	pos = -1;
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp0_ = path;
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp1_ = g_str_has_prefix (_tmp0_, "~/");
#line 57 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (_tmp1_) {
#line 591 "gitg-utils.c"
		gchar* _tmp2_ = NULL;
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp2_ = gitg_platform_support_get_user_home_dir (NULL);
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_g_free0 (homedir);
#line 59 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		homedir = _tmp2_;
#line 60 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		pos = 1;
#line 601 "gitg-utils.c"
	} else {
		const gchar* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp3_ = path;
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp4_ = g_str_has_prefix (_tmp3_, "~");
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		if (_tmp4_) {
#line 611 "gitg-utils.c"
			const gchar* _tmp5_ = NULL;
			gint _tmp6_ = 0;
			gchar* user = NULL;
			const gchar* _tmp7_ = NULL;
			gint _tmp8_ = 0;
			gchar* _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
			gchar* _tmp11_ = NULL;
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp5_ = path;
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp6_ = string_index_of_char (_tmp5_, (gunichar) '/', 0);
#line 64 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			pos = _tmp6_;
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp7_ = path;
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp8_ = pos;
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp9_ = string_slice (_tmp7_, (glong) 1, (glong) _tmp8_);
#line 65 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			user = _tmp9_;
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp10_ = user;
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_tmp11_ = gitg_platform_support_get_user_home_dir (_tmp10_);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_g_free0 (homedir);
#line 67 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			homedir = _tmp11_;
#line 62 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			_g_free0 (user);
#line 644 "gitg-utils.c"
		}
	}
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp12_ = homedir;
#line 70 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (_tmp12_ != NULL) {
#line 651 "gitg-utils.c"
		const gchar* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		gint _tmp15_ = 0;
		gchar* _tmp16_ = NULL;
		gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp13_ = homedir;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp14_ = path;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp15_ = pos;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp16_ = string_substring (_tmp14_, (glong) (_tmp15_ + 1), (glong) -1);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp17_ = _tmp16_;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp18_ = g_build_filename (_tmp13_, _tmp17_, NULL);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_tmp19_ = _tmp18_;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_g_free0 (_tmp17_);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		result = _tmp19_;
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		_g_free0 (homedir);
#line 72 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		return result;
#line 681 "gitg-utils.c"
	}
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp20_ = path;
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_tmp21_ = g_strdup (_tmp20_);
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	result = _tmp21_;
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	_g_free0 (homedir);
#line 75 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return result;
#line 693 "gitg-utils.c"
}


GitgUtils* gitg_utils_construct (GType object_type) {
	GitgUtils* self = NULL;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	self = (GitgUtils*) g_type_create_instance (object_type);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return self;
#line 703 "gitg-utils.c"
}


GitgUtils* gitg_utils_new (void) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return gitg_utils_construct (GITG_TYPE_UTILS);
#line 710 "gitg-utils.c"
}


static void gitg_value_utils_init (GValue* value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	value->data[0].v_pointer = NULL;
#line 717 "gitg-utils.c"
}


static void gitg_value_utils_free_value (GValue* value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (value->data[0].v_pointer) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		gitg_utils_unref (value->data[0].v_pointer);
#line 726 "gitg-utils.c"
	}
}


static void gitg_value_utils_copy_value (const GValue* src_value, GValue* dest_value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (src_value->data[0].v_pointer) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		dest_value->data[0].v_pointer = gitg_utils_ref (src_value->data[0].v_pointer);
#line 736 "gitg-utils.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		dest_value->data[0].v_pointer = NULL;
#line 740 "gitg-utils.c"
	}
}


static gpointer gitg_value_utils_peek_pointer (const GValue* value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return value->data[0].v_pointer;
#line 748 "gitg-utils.c"
}


static gchar* gitg_value_utils_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (collect_values[0].v_pointer) {
#line 755 "gitg-utils.c"
		GitgUtils * object;
		object = collect_values[0].v_pointer;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		if (object->parent_instance.g_class == NULL) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 762 "gitg-utils.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 766 "gitg-utils.c"
		}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		value->data[0].v_pointer = gitg_utils_ref (object);
#line 770 "gitg-utils.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		value->data[0].v_pointer = NULL;
#line 774 "gitg-utils.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return NULL;
#line 778 "gitg-utils.c"
}


static gchar* gitg_value_utils_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	GitgUtils ** object_p;
	object_p = collect_values[0].v_pointer;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (!object_p) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 789 "gitg-utils.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (!value->data[0].v_pointer) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		*object_p = NULL;
#line 795 "gitg-utils.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		*object_p = value->data[0].v_pointer;
#line 799 "gitg-utils.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		*object_p = gitg_utils_ref (value->data[0].v_pointer);
#line 803 "gitg-utils.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return NULL;
#line 807 "gitg-utils.c"
}


GParamSpec* gitg_param_spec_utils (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	GitgParamSpecUtils* spec;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	g_return_val_if_fail (g_type_is_a (object_type, GITG_TYPE_UTILS), NULL);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return G_PARAM_SPEC (spec);
#line 821 "gitg-utils.c"
}


gpointer gitg_value_get_utils (const GValue* value) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_UTILS), NULL);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return value->data[0].v_pointer;
#line 830 "gitg-utils.c"
}


void gitg_value_set_utils (GValue* value, gpointer v_object) {
	GitgUtils * old;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_UTILS));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	old = value->data[0].v_pointer;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (v_object) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GITG_TYPE_UTILS));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		value->data[0].v_pointer = v_object;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		gitg_utils_ref (value->data[0].v_pointer);
#line 850 "gitg-utils.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		value->data[0].v_pointer = NULL;
#line 854 "gitg-utils.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (old) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		gitg_utils_unref (old);
#line 860 "gitg-utils.c"
	}
}


void gitg_value_take_utils (GValue* value, gpointer v_object) {
	GitgUtils * old;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_UTILS));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	old = value->data[0].v_pointer;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (v_object) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GITG_TYPE_UTILS));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		value->data[0].v_pointer = v_object;
#line 879 "gitg-utils.c"
	} else {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		value->data[0].v_pointer = NULL;
#line 883 "gitg-utils.c"
	}
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (old) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		gitg_utils_unref (old);
#line 889 "gitg-utils.c"
	}
}


static void gitg_utils_class_init (GitgUtilsClass * klass) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	gitg_utils_parent_class = g_type_class_peek_parent (klass);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	((GitgUtilsClass *) klass)->finalize = gitg_utils_finalize;
#line 899 "gitg-utils.c"
}


static void gitg_utils_instance_init (GitgUtils * self) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	self->ref_count = 1;
#line 906 "gitg-utils.c"
}


static void gitg_utils_finalize (GitgUtils * obj) {
	GitgUtils * self;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_UTILS, GitgUtils);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	g_signal_handlers_destroy (self);
#line 916 "gitg-utils.c"
}


GType gitg_utils_get_type (void) {
	static volatile gsize gitg_utils_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_utils_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { gitg_value_utils_init, gitg_value_utils_free_value, gitg_value_utils_copy_value, gitg_value_utils_peek_pointer, "p", gitg_value_utils_collect_value, "p", gitg_value_utils_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (GitgUtilsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_utils_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgUtils), 0, (GInstanceInitFunc) gitg_utils_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType gitg_utils_type_id;
		gitg_utils_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GitgUtils", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&gitg_utils_type_id__volatile, gitg_utils_type_id);
	}
	return gitg_utils_type_id__volatile;
}


gpointer gitg_utils_ref (gpointer instance) {
	GitgUtils * self;
	self = instance;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	g_atomic_int_inc (&self->ref_count);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	return instance;
#line 941 "gitg-utils.c"
}


void gitg_utils_unref (gpointer instance) {
	GitgUtils * self;
	self = instance;
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		GITG_UTILS_GET_CLASS (self)->finalize (self);
#line 22 "/home/jesse/dev/gitg/libgitg/gitg-utils.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 954 "gitg-utils.c"
	}
}



