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


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


#define PDFPC_TYPE_SLIDES_NOTES (pdfpc_slides_notes_get_type ())
#define PDFPC_SLIDES_NOTES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PDFPC_TYPE_SLIDES_NOTES, pdfpcslides_notes))
#define PDFPC_SLIDES_NOTES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PDFPC_TYPE_SLIDES_NOTES, pdfpcslides_notesClass))
#define PDFPC_IS_SLIDES_NOTES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PDFPC_TYPE_SLIDES_NOTES))
#define PDFPC_IS_SLIDES_NOTES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PDFPC_TYPE_SLIDES_NOTES))
#define PDFPC_SLIDES_NOTES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PDFPC_TYPE_SLIDES_NOTES, pdfpcslides_notesClass))

typedef struct _pdfpcslides_notes pdfpcslides_notes;
typedef struct _pdfpcslides_notesClass pdfpcslides_notesClass;
typedef struct _pdfpcslides_notesPrivate pdfpcslides_notesPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

struct _pdfpcslides_notes {
	GObject parent_instance;
	pdfpcslides_notesPrivate * priv;
	gchar** notes;
	gint notes_length1;
};

struct _pdfpcslides_notesClass {
	GObjectClass parent_class;
};


static gpointer pdfpc_slides_notes_parent_class = NULL;

GType pdfpc_slides_notes_get_type (void) G_GNUC_CONST;
enum  {
	PDFPC_SLIDES_NOTES_DUMMY_PROPERTY
};
void pdfpc_slides_notes_set_note (pdfpcslides_notes* self, const gchar* note, gint slide_number);
gchar* pdfpc_slides_notes_get_note_for_slide (pdfpcslides_notes* self, gint number);
gboolean pdfpc_slides_notes_has_notes (pdfpcslides_notes* self);
gchar* pdfpc_slides_notes_format_to_save (pdfpcslides_notes* self);
void pdfpc_slides_notes_parse_lines (pdfpcslides_notes* self, gchar** lines, int lines_length1);
pdfpcslides_notes* pdfpc_slides_notes_new (void);
pdfpcslides_notes* pdfpc_slides_notes_construct (GType object_type);
static void pdfpc_slides_notes_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


/**
         * Set a note for a given slide
         */
void pdfpc_slides_notes_set_note (pdfpcslides_notes* self, const gchar* note, gint slide_number) {
	gint _tmp0_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (note != NULL);
	_tmp0_ = slide_number;
	if (_tmp0_ != (-1)) {
		gchar** _tmp1_;
		gint _tmp1__length1;
		gint _tmp2_;
		gchar** _tmp5_;
		gint _tmp5__length1;
		gint _tmp6_;
		const gchar* _tmp7_;
		gchar* _tmp8_;
		gchar* _tmp9_;
		_tmp1_ = self->notes;
		_tmp1__length1 = self->notes_length1;
		_tmp2_ = slide_number;
		if (_tmp1__length1 <= _tmp2_) {
			gint _tmp3_;
			gint _tmp4_ = 0;
			_tmp3_ = slide_number;
			_tmp4_ = _tmp3_ + 1;
			self->notes = g_renew (gchar*, self->notes, _tmp3_ + 1);
			(_tmp4_ > self->notes_length1) ? memset (self->notes + self->notes_length1, 0, sizeof (gchar*) * (_tmp4_ - self->notes_length1)) : NULL;
			self->notes_length1 = _tmp4_;
		}
		_tmp5_ = self->notes;
		_tmp5__length1 = self->notes_length1;
		_tmp6_ = slide_number;
		_tmp7_ = note;
		_tmp8_ = g_strdup (_tmp7_);
		_g_free0 (_tmp5_[_tmp6_]);
		_tmp5_[_tmp6_] = _tmp8_;
		_tmp9_ = _tmp5_[_tmp6_];
	}
}


/**
         * Return the text of a note
         */
gchar* pdfpc_slides_notes_get_note_for_slide (pdfpcslides_notes* self, gint number) {
	gchar* result = NULL;
	gboolean _tmp0_ = FALSE;
	gint _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gboolean _tmp6_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = number;
	_tmp2_ = self->notes;
	_tmp2__length1 = self->notes_length1;
	if (_tmp1_ >= _tmp2__length1) {
		_tmp0_ = TRUE;
	} else {
		gchar** _tmp3_;
		gint _tmp3__length1;
		gint _tmp4_;
		const gchar* _tmp5_;
		_tmp3_ = self->notes;
		_tmp3__length1 = self->notes_length1;
		_tmp4_ = number;
		_tmp5_ = _tmp3_[_tmp4_];
		_tmp0_ = _tmp5_ == NULL;
	}
	_tmp6_ = _tmp0_;
	if (_tmp6_) {
		gchar* _tmp7_;
		_tmp7_ = g_strdup ("");
		result = _tmp7_;
		return result;
	} else {
		gchar** _tmp8_;
		gint _tmp8__length1;
		gint _tmp9_;
		const gchar* _tmp10_;
		gchar* _tmp11_;
		_tmp8_ = self->notes;
		_tmp8__length1 = self->notes_length1;
		_tmp9_ = number;
		_tmp10_ = _tmp8_[_tmp9_];
		_tmp11_ = g_strdup (_tmp10_);
		result = _tmp11_;
		return result;
	}
}


/**
         * Does the user want notes?
         */
gboolean pdfpc_slides_notes_has_notes (pdfpcslides_notes* self) {
	gboolean result = FALSE;
	gchar** _tmp0_;
	gint _tmp0__length1;
	g_return_val_if_fail (self != NULL, FALSE);
	_tmp0_ = self->notes;
	_tmp0__length1 = self->notes_length1;
	result = _tmp0_ != NULL;
	return result;
}


/**
         * Returns the string that should be written to the pdfpc file
         */
static gchar string_get (const gchar* self, glong index) {
	gchar result = '\0';
	glong _tmp0_;
	gchar _tmp1_;
	g_return_val_if_fail (self != NULL, '\0');
	_tmp0_ = index;
	_tmp1_ = ((gchar*) self)[_tmp0_];
	result = _tmp1_;
	return result;
}


gchar* pdfpc_slides_notes_format_to_save (pdfpcslides_notes* self) {
	gchar* result = NULL;
	gchar* _tmp0_;
	gchar* text;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup ("");
	text = _tmp0_;
	{
		gint i;
		i = 0;
		{
			gboolean _tmp1_;
			_tmp1_ = TRUE;
			while (TRUE) {
				gboolean _tmp2_;
				gint _tmp4_;
				gchar** _tmp5_;
				gint _tmp5__length1;
				gchar** _tmp6_;
				gint _tmp6__length1;
				gint _tmp7_;
				const gchar* _tmp8_;
				_tmp2_ = _tmp1_;
				if (!_tmp2_) {
					gint _tmp3_;
					_tmp3_ = i;
					i = _tmp3_ + 1;
				}
				_tmp1_ = FALSE;
				_tmp4_ = i;
				_tmp5_ = self->notes;
				_tmp5__length1 = self->notes_length1;
				if (!(_tmp4_ < _tmp5__length1)) {
					break;
				}
				_tmp6_ = self->notes;
				_tmp6__length1 = self->notes_length1;
				_tmp7_ = i;
				_tmp8_ = _tmp6_[_tmp7_];
				if (_tmp8_ != NULL) {
					const gchar* _tmp9_;
					gint _tmp10_;
					gchar* _tmp11_ = NULL;
					gchar* _tmp12_;
					gchar* _tmp13_ = NULL;
					gchar* _tmp14_;
					gchar** _tmp15_;
					gint _tmp15__length1;
					gint _tmp16_;
					const gchar* _tmp17_;
					gchar* _tmp18_;
					gchar* _tmp19_;
					gchar* _tmp20_;
					const gchar* _tmp21_;
					const gchar* _tmp22_;
					gint _tmp23_;
					gint _tmp24_;
					gchar _tmp25_ = '\0';
					_tmp9_ = text;
					_tmp10_ = i;
					_tmp11_ = g_strdup_printf ("%i", _tmp10_ + 1);
					_tmp12_ = _tmp11_;
					_tmp13_ = g_strconcat ("### ", _tmp12_, "\n", NULL);
					_tmp14_ = _tmp13_;
					_tmp15_ = self->notes;
					_tmp15__length1 = self->notes_length1;
					_tmp16_ = i;
					_tmp17_ = _tmp15_[_tmp16_];
					_tmp18_ = g_strconcat (_tmp14_, _tmp17_, NULL);
					_tmp19_ = _tmp18_;
					_tmp20_ = g_strconcat (_tmp9_, _tmp19_, NULL);
					_g_free0 (text);
					text = _tmp20_;
					_g_free0 (_tmp19_);
					_g_free0 (_tmp14_);
					_g_free0 (_tmp12_);
					_tmp21_ = text;
					_tmp22_ = text;
					_tmp23_ = strlen (_tmp22_);
					_tmp24_ = _tmp23_;
					_tmp25_ = string_get (_tmp21_, (glong) (_tmp24_ - 1));
					if (_tmp25_ != '\n') {
						const gchar* _tmp26_;
						gchar* _tmp27_;
						_tmp26_ = text;
						_tmp27_ = g_strconcat (_tmp26_, "\n", NULL);
						_g_free0 (text);
						text = _tmp27_;
					}
				}
			}
		}
	}
	result = text;
	return result;
}


/**
         * Parse the notes line of the pdfpc file
         */
static gchar* string_strip (const gchar* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _result_;
	const gchar* _tmp1_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = g_strdup (self);
	_result_ = _tmp0_;
	_tmp1_ = _result_;
	g_strstrip (_tmp1_);
	result = _result_;
	return result;
}


static gchar* string_slice (const gchar* self, glong start, glong end) {
	gchar* result = NULL;
	gint _tmp0_;
	gint _tmp1_;
	glong string_length;
	glong _tmp2_;
	glong _tmp5_;
	gboolean _tmp8_ = FALSE;
	glong _tmp9_;
	gboolean _tmp12_;
	gboolean _tmp13_ = FALSE;
	glong _tmp14_;
	gboolean _tmp17_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	glong _tmp22_;
	gchar* _tmp23_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = strlen (self);
	_tmp1_ = _tmp0_;
	string_length = (glong) _tmp1_;
	_tmp2_ = start;
	if (_tmp2_ < ((glong) 0)) {
		glong _tmp3_;
		glong _tmp4_;
		_tmp3_ = string_length;
		_tmp4_ = start;
		start = _tmp3_ + _tmp4_;
	}
	_tmp5_ = end;
	if (_tmp5_ < ((glong) 0)) {
		glong _tmp6_;
		glong _tmp7_;
		_tmp6_ = string_length;
		_tmp7_ = end;
		end = _tmp6_ + _tmp7_;
	}
	_tmp9_ = start;
	if (_tmp9_ >= ((glong) 0)) {
		glong _tmp10_;
		glong _tmp11_;
		_tmp10_ = start;
		_tmp11_ = string_length;
		_tmp8_ = _tmp10_ <= _tmp11_;
	} else {
		_tmp8_ = FALSE;
	}
	_tmp12_ = _tmp8_;
	g_return_val_if_fail (_tmp12_, NULL);
	_tmp14_ = end;
	if (_tmp14_ >= ((glong) 0)) {
		glong _tmp15_;
		glong _tmp16_;
		_tmp15_ = end;
		_tmp16_ = string_length;
		_tmp13_ = _tmp15_ <= _tmp16_;
	} else {
		_tmp13_ = FALSE;
	}
	_tmp17_ = _tmp13_;
	g_return_val_if_fail (_tmp17_, NULL);
	_tmp18_ = start;
	_tmp19_ = end;
	g_return_val_if_fail (_tmp18_ <= _tmp19_, NULL);
	_tmp20_ = start;
	_tmp21_ = end;
	_tmp22_ = start;
	_tmp23_ = g_strndup (((gchar*) self) + _tmp20_, (gsize) (_tmp21_ - _tmp22_));
	result = _tmp23_;
	return result;
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* _tmp0_;
	glong _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* end;
	gchar* _tmp3_;
	_tmp0_ = str;
	_tmp1_ = maxlen;
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
	end = _tmp2_;
	_tmp3_ = end;
	if (_tmp3_ == NULL) {
		glong _tmp4_;
		_tmp4_ = maxlen;
		result = _tmp4_;
		return result;
	} else {
		gchar* _tmp5_;
		gchar* _tmp6_;
		_tmp5_ = end;
		_tmp6_ = str;
		result = (glong) (_tmp5_ - _tmp6_);
		return result;
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_;
	gboolean _tmp3_;
	glong _tmp9_;
	glong _tmp15_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	glong _tmp22_;
	gchar* _tmp23_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp1_ = offset;
	if (_tmp1_ >= ((glong) 0)) {
		glong _tmp2_;
		_tmp2_ = len;
		_tmp0_ = _tmp2_ >= ((glong) 0);
	} else {
		_tmp0_ = FALSE;
	}
	_tmp3_ = _tmp0_;
	if (_tmp3_) {
		glong _tmp4_;
		glong _tmp5_;
		glong _tmp6_ = 0L;
		_tmp4_ = offset;
		_tmp5_ = len;
		_tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
		string_length = _tmp6_;
	} else {
		gint _tmp7_;
		gint _tmp8_;
		_tmp7_ = strlen (self);
		_tmp8_ = _tmp7_;
		string_length = (glong) _tmp8_;
	}
	_tmp9_ = offset;
	if (_tmp9_ < ((glong) 0)) {
		glong _tmp10_;
		glong _tmp11_;
		glong _tmp12_;
		_tmp10_ = string_length;
		_tmp11_ = offset;
		offset = _tmp10_ + _tmp11_;
		_tmp12_ = offset;
		g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
	} else {
		glong _tmp13_;
		glong _tmp14_;
		_tmp13_ = offset;
		_tmp14_ = string_length;
		g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
	}
	_tmp15_ = len;
	if (_tmp15_ < ((glong) 0)) {
		glong _tmp16_;
		glong _tmp17_;
		_tmp16_ = string_length;
		_tmp17_ = offset;
		len = _tmp16_ - _tmp17_;
	}
	_tmp18_ = offset;
	_tmp19_ = len;
	_tmp20_ = string_length;
	g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
	_tmp21_ = offset;
	_tmp22_ = len;
	_tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
	result = _tmp23_;
	return result;
}


void pdfpc_slides_notes_parse_lines (pdfpcslides_notes* self, gchar** lines, int lines_length1) {
	gint current_slide;
	gchar* _tmp0_;
	gchar* current_note;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gint last_line;
	const gchar* _tmp42_;
	gint _tmp43_;
	g_return_if_fail (self != NULL);
	current_slide = -1;
	_tmp0_ = g_strdup ("");
	current_note = _tmp0_;
	_tmp1_ = lines;
	_tmp1__length1 = lines_length1;
	last_line = _tmp1__length1;
	while (TRUE) {
		gchar** _tmp2_;
		gint _tmp2__length1;
		gint _tmp3_;
		const gchar* _tmp4_;
		gchar* _tmp5_ = NULL;
		gchar* _tmp6_;
		gboolean _tmp7_;
		gint _tmp8_;
		_tmp2_ = lines;
		_tmp2__length1 = lines_length1;
		_tmp3_ = last_line;
		_tmp4_ = _tmp2_[_tmp3_ - 1];
		_tmp5_ = string_strip (_tmp4_);
		_tmp6_ = _tmp5_;
		_tmp7_ = !(g_strcmp0 (_tmp6_, "") == 0);
		_g_free0 (_tmp6_);
		if (_tmp7_) {
			break;
		}
		_tmp8_ = last_line;
		last_line = _tmp8_ - 1;
	}
	{
		gint i;
		i = 0;
		{
			gboolean _tmp9_;
			_tmp9_ = TRUE;
			while (TRUE) {
				gboolean _tmp10_;
				gint _tmp12_;
				gchar** _tmp13_;
				gint _tmp13__length1;
				gboolean _tmp14_ = FALSE;
				gchar** _tmp15_;
				gint _tmp15__length1;
				gint _tmp16_;
				const gchar* _tmp17_;
				gint _tmp18_;
				gint _tmp19_;
				gboolean _tmp25_;
				_tmp10_ = _tmp9_;
				if (!_tmp10_) {
					gint _tmp11_;
					_tmp11_ = i;
					i = _tmp11_ + 1;
				}
				_tmp9_ = FALSE;
				_tmp12_ = i;
				_tmp13_ = lines;
				_tmp13__length1 = lines_length1;
				if (!(_tmp12_ < _tmp13__length1)) {
					break;
				}
				_tmp15_ = lines;
				_tmp15__length1 = lines_length1;
				_tmp16_ = i;
				_tmp17_ = _tmp15_[_tmp16_];
				_tmp18_ = strlen (_tmp17_);
				_tmp19_ = _tmp18_;
				if (_tmp19_ > 3) {
					gchar** _tmp20_;
					gint _tmp20__length1;
					gint _tmp21_;
					const gchar* _tmp22_;
					gchar* _tmp23_ = NULL;
					gchar* _tmp24_;
					_tmp20_ = lines;
					_tmp20__length1 = lines_length1;
					_tmp21_ = i;
					_tmp22_ = _tmp20_[_tmp21_];
					_tmp23_ = string_slice (_tmp22_, (glong) 0, (glong) 3);
					_tmp24_ = _tmp23_;
					_tmp14_ = g_strcmp0 (_tmp24_, "###") == 0;
					_g_free0 (_tmp24_);
				} else {
					_tmp14_ = FALSE;
				}
				_tmp25_ = _tmp14_;
				if (_tmp25_) {
					const gchar* _tmp26_;
					gint _tmp27_;
					gchar** _tmp28_;
					gint _tmp28__length1;
					gint _tmp29_;
					const gchar* _tmp30_;
					gchar* _tmp31_ = NULL;
					gchar* _tmp32_;
					gint _tmp33_ = 0;
					gchar* _tmp34_;
					_tmp26_ = current_note;
					_tmp27_ = current_slide;
					pdfpc_slides_notes_set_note (self, _tmp26_, _tmp27_);
					_tmp28_ = lines;
					_tmp28__length1 = lines_length1;
					_tmp29_ = i;
					_tmp30_ = _tmp28_[_tmp29_];
					_tmp31_ = string_substring (_tmp30_, (glong) 3, (glong) (-1));
					_tmp32_ = _tmp31_;
					_tmp33_ = atoi (_tmp32_);
					current_slide = _tmp33_ - 1;
					_g_free0 (_tmp32_);
					_tmp34_ = g_strdup ("");
					_g_free0 (current_note);
					current_note = _tmp34_;
				} else {
					const gchar* _tmp35_;
					gchar** _tmp36_;
					gint _tmp36__length1;
					gint _tmp37_;
					const gchar* _tmp38_;
					gchar* _tmp39_;
					gchar* _tmp40_;
					gchar* _tmp41_;
					_tmp35_ = current_note;
					_tmp36_ = lines;
					_tmp36__length1 = lines_length1;
					_tmp37_ = i;
					_tmp38_ = _tmp36_[_tmp37_];
					_tmp39_ = g_strconcat (_tmp38_, "\n", NULL);
					_tmp40_ = _tmp39_;
					_tmp41_ = g_strconcat (_tmp35_, _tmp40_, NULL);
					_g_free0 (current_note);
					current_note = _tmp41_;
					_g_free0 (_tmp40_);
				}
			}
		}
	}
	_tmp42_ = current_note;
	_tmp43_ = current_slide;
	pdfpc_slides_notes_set_note (self, _tmp42_, _tmp43_);
	_g_free0 (current_note);
}


pdfpcslides_notes* pdfpc_slides_notes_construct (GType object_type) {
	pdfpcslides_notes * self = NULL;
	self = (pdfpcslides_notes*) g_object_new (object_type, NULL);
	return self;
}


pdfpcslides_notes* pdfpc_slides_notes_new (void) {
	return pdfpc_slides_notes_construct (PDFPC_TYPE_SLIDES_NOTES);
}


static void pdfpc_slides_notes_class_init (pdfpcslides_notesClass * klass) {
	pdfpc_slides_notes_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = pdfpc_slides_notes_finalize;
}


static void pdfpc_slides_notes_instance_init (pdfpcslides_notes * self) {
	self->notes = NULL;
}


static void pdfpc_slides_notes_finalize (GObject* obj) {
	pdfpcslides_notes * self;
	self = PDFPC_SLIDES_NOTES (obj);
	self->notes = (_vala_array_free (self->notes, self->notes_length1, (GDestroyNotify) g_free), NULL);
	G_OBJECT_CLASS (pdfpc_slides_notes_parent_class)->finalize (obj);
}


/**
     * Class for providing storage for the notes associate with a presentation
     */
GType pdfpc_slides_notes_get_type (void) {
	static volatile gsize pdfpc_slides_notes_type_id__volatile = 0;
	if (g_once_init_enter (&pdfpc_slides_notes_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (pdfpcslides_notesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pdfpc_slides_notes_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (pdfpcslides_notes), 0, (GInstanceInitFunc) pdfpc_slides_notes_instance_init, NULL };
		GType pdfpc_slides_notes_type_id;
		pdfpc_slides_notes_type_id = g_type_register_static (G_TYPE_OBJECT, "pdfpcslides_notes", &g_define_type_info, 0);
		g_once_init_leave (&pdfpc_slides_notes_type_id__volatile, pdfpc_slides_notes_type_id);
	}
	return pdfpc_slides_notes_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



