/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.22 from the
 * contents of GstIndex.xs. Do not edit this file, edit GstIndex.xs instead.
 *
 *    ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "xs/GstIndex.xs"
/*
 * Copyright (C) 2005 by the gtk2-perl team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * $Id$
 */

#include "gst2perl.h"

/* ------------------------------------------------------------------------- */

static GPerlCallback *
gst2perl_index_filter_create (SV *func, SV *data)
{
	GType param_types [2];
	param_types[0] = GST_TYPE_INDEX;
	param_types[1] = GST_TYPE_INDEX_ENTRY;
	return gperl_callback_new (func, data, G_N_ELEMENTS (param_types),
				   param_types, G_TYPE_BOOLEAN);
}

static gboolean
gst2perl_index_filter (GstIndex *index,
                       GstIndexEntry *entry,
		       gpointer data)
{
	GPerlCallback *callback = data;
	GValue value = { 0, };
	gboolean retval;

	g_value_init (&value, callback->return_type);
	gperl_callback_invoke (callback, &value, entry);
	retval = g_value_get_boolean (&value);
	g_value_unset (&value);

	return retval;
}

/* ------------------------------------------------------------------------- */

/* Implemented in gstindex.c, but not exported for some reason. */
extern GstIndexEntry * gst_index_add_associationv (GstIndex * index, gint id, GstAssocFlags flags, int n, const GstIndexAssociation * list);

/* ------------------------------------------------------------------------- */

#include <gperl_marshal.h>

static GQuark
gst2perl_index_resolver_quark (void)
{
	static GQuark q = 0;
	if (q == 0)
		q = g_quark_from_static_string ("gst2perl_index_resolver");
	return q;
}

static GPerlCallback *
gst2perl_index_resolver_create (SV *func, SV *data)
{
	return gperl_callback_new (func, data, 0, NULL, 0);
}

static gboolean
gst2perl_index_resolver (GstIndex *index,
                         GstObject *writer,
                         gchar **writer_string,
                         gpointer user_data)
{
	int n;
	SV *string;
	gboolean retval;
	GPerlCallback *callback;
	dGPERL_CALLBACK_MARSHAL_SP;

	callback = user_data;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSVGstIndex (index)));
	PUSHs (sv_2mortal (newSVGstObject (writer)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	n = call_sv (callback->func, G_SCALAR);

	SPAGAIN;

	if (n != 1)
		croak ("resolver callback must return one value: the writer string");

	string = POPs;
	if (gperl_sv_is_defined (string)) {
		*writer_string = g_strdup (SvGChar (string));
		retval = TRUE;
	} else {
		*writer_string = NULL;
		retval = FALSE;
	}

	PUTBACK;
	FREETMPS;
	LEAVE;

	return retval;
}

/* ------------------------------------------------------------------------- */

#line 140 "xs/GstIndex.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef dVAR
#  define dVAR		dNOOP
#endif


/* This stuff is not part of the API! You have been warned. */
#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
	  PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
	  (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif
#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
	  (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

/* XS_INTERNAL is the explicit static-linkage variant of the default
 * XS macro.
 *
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
 * for anything but the BOOT XSUB.
 *
 * See XSUB.h in core!
 */


/* TODO: This might be compatible further back than 5.10.0. */
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
#  undef XS_EXTERNAL
#  undef XS_INTERNAL
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
#  endif
#  if defined(__SYMBIAN32__)
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#  endif
#  ifndef XS_EXTERNAL
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
#    else
#      ifdef __cplusplus
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
#        define XS_INTERNAL(name) static XSPROTO(name)
#      else
#        define XS_EXTERNAL(name) XSPROTO(name)
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
#      endif
#    endif
#  endif
#endif

/* perl >= 5.10.0 && perl <= 5.15.1 */


/* The XS_EXTERNAL macro is used for functions that must not be static
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
 * macro defined, the best we can do is assume XS is the same.
 * Dito for XS_INTERNAL.
 */
#ifndef XS_EXTERNAL
#  define XS_EXTERNAL(name) XS(name)
#endif
#ifndef XS_INTERNAL
#  define XS_INTERNAL(name) XS(name)
#endif

/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
 * internal macro that we're free to redefine for varying linkage due
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
 */

#undef XS_EUPXS
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
#  define XS_EUPXS(name) XS_EXTERNAL(name)
#else
   /* default to internal */
#  define XS_EUPXS(name) XS_INTERNAL(name)
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
            Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
        else
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#ifdef PERL_IMPLICIT_CONTEXT
#define croak_xs_usage(a,b)    S_croak_xs_usage(aTHX_ a,b)
#else
#define croak_xs_usage        S_croak_xs_usage
#endif

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#line 282 "xs/GstIndex.c"

XS_EUPXS(XS_GStreamer__Index_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    {
	GstIndex *	RETVAL;

	RETVAL = gst_index_new(/* void */);
	ST(0) = newSVGstIndex (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_commit); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_commit)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "index, id");
    {
	GstIndex *	index = SvGstIndex (ST(0))
;
	gint	id = (gint)SvIV(ST(1))
;

	gst_index_commit(index, id);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_GStreamer__Index_get_group); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_get_group)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "index");
    {
	gint	RETVAL;
	dXSTARG;
	GstIndex *	index = SvGstIndex (ST(0))
;

	RETVAL = gst_index_get_group(index);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_new_group); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_new_group)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "index");
    {
	gint	RETVAL;
	dXSTARG;
	GstIndex *	index = SvGstIndex (ST(0))
;

	RETVAL = gst_index_new_group(index);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_set_group); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_set_group)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "index, groupnum");
    {
	gboolean	RETVAL;
	GstIndex *	index = SvGstIndex (ST(0))
;
	gint	groupnum = (gint)SvIV(ST(1))
;

	RETVAL = gst_index_set_group(index, groupnum);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_set_certainty); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_set_certainty)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "index, certainty");
    {
	GstIndex *	index = SvGstIndex (ST(0))
;
	GstIndexCertainty	certainty = SvGstIndexCertainty (ST(1))
;

	gst_index_set_certainty(index, certainty);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_GStreamer__Index_get_certainty); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_get_certainty)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "index");
    {
	GstIndexCertainty	RETVAL;
	GstIndex *	index = SvGstIndex (ST(0))
;

	RETVAL = gst_index_get_certainty(index);
	ST(0) = newSVGstIndexCertainty (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_set_filter); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_set_filter)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "index, func, data=NULL");
    {
	GstIndex *	index = SvGstIndex (ST(0))
;
	SV *	func = ST(1)
;
	SV *	data;
#line 157 "xs/GstIndex.xs"
	GPerlCallback *callback;
#line 428 "xs/GstIndex.c"

	if (items < 3)
	    data = NULL;
	else {
	    data = ST(2)
;
	}
#line 159 "xs/GstIndex.xs"
	callback = gst2perl_index_filter_create (func, data);
	gst_index_set_filter_full (index,
				   gst2perl_index_filter,
				   callback,
				   (GDestroyNotify) gperl_callback_destroy);
#line 442 "xs/GstIndex.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_GStreamer__Index_set_resolver); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_set_resolver)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "index, func, data=NULL");
    {
	GstIndex *	index = SvGstIndex (ST(0))
;
	SV *	func = ST(1)
;
	SV *	data;
#line 172 "xs/GstIndex.xs"
	GPerlCallback *callback;
#line 462 "xs/GstIndex.c"

	if (items < 3)
	    data = NULL;
	else {
	    data = ST(2)
;
	}
#line 174 "xs/GstIndex.xs"
	callback = gst2perl_index_resolver_create (func, data);
	g_object_set_qdata_full (G_OBJECT (index),
	                         gst2perl_index_resolver_quark (),
	                         callback,
	                         (GDestroyNotify) gperl_callback_destroy);
	gst_index_set_resolver (index, gst2perl_index_resolver, callback);
#line 477 "xs/GstIndex.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_GStreamer__Index_get_writer_id); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_get_writer_id)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "index, writer");
    {
	GstIndex *	index = SvGstIndex (ST(0))
;
	GstObject *	writer = SvGstObject (ST(1))
;
	gint	RETVAL;
	dXSTARG;
#line 187 "xs/GstIndex.xs"
	if (!gst_index_get_writer_id (index, writer, &RETVAL))
		XSRETURN_UNDEF;
#line 499 "xs/GstIndex.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_add_format); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_add_format)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "index, id, format");
    {
	GstIndexEntry_ornull *	RETVAL;
	GstIndex *	index = SvGstIndex (ST(0))
;
	gint	id = (gint)SvIV(ST(1))
;
	GstFormat	format = SvGstFormat (ST(2))
;

	RETVAL = gst_index_add_format(index, id, format);
	ST(0) = newSVGstIndexEntry_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_add_association); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_add_association)
{
    dVAR; dXSARGS;
    if (items < 5)
       croak_xs_usage(cv,  "index, id, flags, format, value, ...");
    {
	GstIndex *	index = SvGstIndex (ST(0))
;
	gint	id = (gint)SvIV(ST(1))
;
	GstAssocFlags	flags = SvGstAssocFlags (ST(2))
;
	GstFormat	format = SvGstFormat (ST(3))
;
	gint64	value = SvGInt64 (ST(4))
;
#line 203 "xs/GstIndex.xs"
	GArray *array;
	int i, n_assocs = 0;
	GstIndexAssociation *list;
#line 550 "xs/GstIndex.c"
	GstIndexEntry_ornull *	RETVAL;
#line 207 "xs/GstIndex.xs"
	PERL_UNUSED_VAR (format);
	PERL_UNUSED_VAR (value);

	array = g_array_new (FALSE, FALSE, sizeof (GstIndexAssociation));

	for (i = 3; i < items; i += 2) {
		GstIndexAssociation a;

		a.format = SvGstFormat (ST (i));
		a.value = SvGInt64 (ST (i + 1));

		g_array_append_val (array, a);
		n_assocs++;
	}

	list = (GstIndexAssociation *) g_array_free (array, FALSE);

	RETVAL = gst_index_add_associationv (index, id, flags, n_assocs, list);
	g_free (list);
#line 572 "xs/GstIndex.c"
	ST(0) = newSVGstIndexEntry_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_add_object); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_add_object)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "index, id, key, object");
    {
	GstIndex *	index = SvGstIndex (ST(0))
;
	gint	id = (gint)SvIV(ST(1))
;
	gchar *	key;
	SV *	object = ST(3)
;
#line 237 "xs/GstIndex.xs"
	GType type;
#line 596 "xs/GstIndex.c"
	GstIndexEntry_ornull *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(2));
	key = (gchar *)SvPV_nolen (ST(2))
;
#line 239 "xs/GstIndex.xs"
	type = gperl_object_type_from_package (sv_reftype (SvRV (object),
	                                                   TRUE));
	RETVAL = gst_index_add_object (index, id, key, type,
	                               gperl_get_object_check (object, type));
#line 608 "xs/GstIndex.c"
	ST(0) = newSVGstIndexEntry_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_add_id); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_add_id)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "index, id, description");
    {
	GstIndexEntry_ornull *	RETVAL;
	GstIndex *	index = SvGstIndex (ST(0))
;
	gint	id = (gint)SvIV(ST(1))
;
	gchar *	description;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(2));
	description = (gchar *)SvPV_nolen (ST(2))
;

	RETVAL = gst_index_add_id(index, id, description);
	ST(0) = newSVGstIndexEntry_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__Index_get_assoc_entry); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__Index_get_assoc_entry)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "index, id, method, flags, format, value");
    {
	GstIndexEntry_ornull *	RETVAL;
	GstIndex *	index = SvGstIndex (ST(0))
;
	gint	id = (gint)SvIV(ST(1))
;
	GstIndexLookupMethod	method = SvGstIndexLookupMethod (ST(2))
;
	GstAssocFlags	flags = SvGstAssocFlags (ST(3))
;
	GstFormat	format = SvGstFormat (ST(4))
;
	gint64	value = SvGInt64 (ST(5))
;

	RETVAL = gst_index_get_assoc_entry(index, id, method, flags, format, value);
	ST(0) = newSVGstIndexEntry_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_GStreamer__IndexEntry_assoc_map); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_GStreamer__IndexEntry_assoc_map)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "entry, format");
    {
	GstIndexEntry *	entry = SvGstIndexEntry (ST(0))
;
	GstFormat	format = SvGstFormat (ST(1))
;
	gint64	RETVAL;
#line 263 "xs/GstIndex.xs"
	if (!gst_index_entry_assoc_map (entry, format, &RETVAL))
		XSRETURN_UNDEF;
#line 687 "xs/GstIndex.c"
	ST(0) = newSVGInt64 (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_GStreamer__Index); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_GStreamer__Index)
{
    dVAR; dXSARGS;
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#endif
    XS_VERSION_BOOTCHECK;

        newXS("GStreamer::Index::new", XS_GStreamer__Index_new, file);
        newXS("GStreamer::Index::commit", XS_GStreamer__Index_commit, file);
        newXS("GStreamer::Index::get_group", XS_GStreamer__Index_get_group, file);
        newXS("GStreamer::Index::new_group", XS_GStreamer__Index_new_group, file);
        newXS("GStreamer::Index::set_group", XS_GStreamer__Index_set_group, file);
        newXS("GStreamer::Index::set_certainty", XS_GStreamer__Index_set_certainty, file);
        newXS("GStreamer::Index::get_certainty", XS_GStreamer__Index_get_certainty, file);
        newXS("GStreamer::Index::set_filter", XS_GStreamer__Index_set_filter, file);
        newXS("GStreamer::Index::set_resolver", XS_GStreamer__Index_set_resolver, file);
        newXS("GStreamer::Index::get_writer_id", XS_GStreamer__Index_get_writer_id, file);
        newXS("GStreamer::Index::add_format", XS_GStreamer__Index_add_format, file);
        newXS("GStreamer::Index::add_association", XS_GStreamer__Index_add_association, file);
        newXS("GStreamer::Index::add_object", XS_GStreamer__Index_add_object, file);
        newXS("GStreamer::Index::add_id", XS_GStreamer__Index_add_id, file);
        newXS("GStreamer::Index::get_assoc_entry", XS_GStreamer__Index_get_assoc_entry, file);
        newXS("GStreamer::IndexEntry::assoc_map", XS_GStreamer__IndexEntry_assoc_map, file);
#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
  if (PL_unitcheckav)
       call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
    XSRETURN_YES;
}

