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

#include "xmpp-vala.h"
#include <stdlib.h>
#include <string.h>
#include <glib.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 _g_free0(var) (var = (g_free (var), NULL))
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))

static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

GDateTime*
xmpp_xep_date_time_profiles_parse_string (const gchar* time_string)
{
	GDateTime* _tmp0_;
	GDateTime* result;
	g_return_val_if_fail (time_string != NULL, NULL);
	_tmp0_ = g_date_time_new_from_iso8601 (time_string, NULL);
	result = _tmp0_;
	return result;
}

static const gchar*
string_to_string (const gchar* self)
{
	const gchar* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self;
	return result;
}

gchar*
xmpp_xep_date_time_profiles_to_datetime (GDateTime* time)
{
	GDateTime* _tmp0_;
	GDateTime* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar* result;
	g_return_val_if_fail (time != NULL, NULL);
	_tmp0_ = g_date_time_to_utc (time);
	_tmp1_ = _tmp0_;
	_tmp2_ = g_date_time_format_iso8601 (_tmp1_);
	_tmp3_ = _tmp2_;
	_tmp4_ = string_to_string (_tmp3_);
	_tmp5_ = g_strdup (_tmp4_);
	_tmp6_ = _tmp5_;
	_g_free0 (_tmp3_);
	_g_date_time_unref0 (_tmp1_);
	result = _tmp6_;
	return result;
}

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

