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

#line 1 "xs/GtkTextBufferRichText.xs"
/*
 * Copyright (c) 2006 by the gtk2-perl team (see the file AUTHORS)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library 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 "gtk2perl.h"
#include <gperl_marshal.h>

static GPerlCallback *
gtk2perl_text_buffer_serialize_func_create (SV * func,
                                            SV * data)
{
        GType param_types[4];
        param_types[0] = GTK_TYPE_TEXT_BUFFER;
        param_types[1] = GTK_TYPE_TEXT_BUFFER;
        param_types[2] = GTK_TYPE_TEXT_ITER;
        param_types[3] = GTK_TYPE_TEXT_ITER;
        return gperl_callback_new (func, data, G_N_ELEMENTS (param_types),
                                   param_types, GPERL_TYPE_SV);
}

static guint8 *
gtk2perl_text_buffer_serialize_func (GtkTextBuffer     *register_buffer,
                                     GtkTextBuffer     *content_buffer,
                                     const GtkTextIter *start,
                                     const GtkTextIter *end,
                                     gsize             *length,
                                     gpointer           user_data)
{
        GPerlCallback * callback = (GPerlCallback *) user_data;
        GValue value = {0, };
        SV * ret_sv;
        guint8 * data;
        g_value_init (&value, GPERL_TYPE_SV);
        gperl_callback_invoke (callback, &value,
                               register_buffer, content_buffer, start, end);
        ret_sv = g_value_get_boxed (&value);
        if (gperl_sv_is_defined (ret_sv)) {
                data = (guint8 *) g_strdup (SvPV (ret_sv, (*length)));
        } else {
                *length = 0;
                data = NULL;
        }
        g_value_unset (&value);

        return data;
}

static GPerlCallback *
gtk2perl_text_buffer_deserialize_func_create (SV * func,
                                              SV * data)
{
        GType param_types[5];
        param_types[0] = GTK_TYPE_TEXT_BUFFER;
        param_types[1] = GTK_TYPE_TEXT_BUFFER;
        param_types[2] = GTK_TYPE_TEXT_ITER;
        param_types[3] = GPERL_TYPE_SV,
        param_types[4] = G_TYPE_BOOLEAN;
        return gperl_callback_new (func, data, G_N_ELEMENTS (param_types),
                                   param_types, G_TYPE_NONE);
}

static gboolean
gtk2perl_text_buffer_deserialize_func (GtkTextBuffer     *register_buffer,
                                       GtkTextBuffer     *content_buffer,
                                       GtkTextIter       *iter,
                                       const guint8      *data,
                                       gsize              length,
                                       gboolean           create_tags,
                                       gpointer           user_data,
                                       GError           **error)
{
        GPerlCallback *callback = (GPerlCallback*) user_data;
        gboolean retval = TRUE;
        dGPERL_CALLBACK_MARSHAL_SP;

        /* we should trap exceptions and turn those into GErrors.
         * that will require using call_sv() directly. */
        GPERL_CALLBACK_MARSHAL_INIT (callback);

        ENTER;
        SAVETMPS;

        PUSHMARK (SP);

        XPUSHs (sv_2mortal (newSVGtkTextBuffer (register_buffer)));
        XPUSHs (sv_2mortal (newSVGtkTextBuffer (content_buffer)));
        XPUSHs (sv_2mortal (newSVGtkTextIter (iter)));
        XPUSHs (sv_2mortal (newSVpvn ((const char *) data, length)));
        XPUSHs (sv_2mortal (newSViv (create_tags)));
        if (callback->data)
                XPUSHs (callback->data);

        PUTBACK;

        call_sv (callback->func, G_DISCARD | G_EVAL);
        if (gperl_sv_is_defined (ERRSV) && SvTRUE (ERRSV)) {
                if (SvROK (ERRSV) && sv_derived_from (ERRSV, "Glib::Error")) {
                        gperl_gerror_from_sv (ERRSV, error);
                } else {
                        /* g_error_new_literal() won't let us pass 0 for
                         * the domain... */
                        g_set_error (error, 0, 0, "%s", SvPV_nolen (ERRSV));
                }
                retval = FALSE;
        }

        FREETMPS;
        LEAVE;

        return retval;
}


#line 141 "xs/GtkTextBufferRichText.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(const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(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_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
        else
	    Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
	Perl_croak_nocontext("Usage: CODE(0x%" UVxf ")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#define croak_xs_usage        S_croak_xs_usage

#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) */

#if PERL_VERSION_LE(5, 21, 5)
#  define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
#else
#  define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
#endif

#line 285 "xs/GtkTextBufferRichText.c"

XS_EUPXS(XS_Gtk2__TextBuffer_register_serialize_format); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_register_serialize_format)
{
    dVAR; dXSARGS;
    if (items < 3 || items > 4)
       croak_xs_usage(cv,  "buffer, mime_type, function, user_data=NULL");
    {
	GdkAtom	RETVAL;
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
	const gchar *	mime_type;
	SV *	function = ST(2)
;
	SV *	user_data;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	mime_type = (const gchar *)SvPV_nolen (ST(1))
;

	if (items < 4)
	    user_data = NULL;
	else {
	    user_data = ST(3)
;
	}
#line 136 "xs/GtkTextBufferRichText.xs"
        RETVAL = gtk_text_buffer_register_serialize_format
                        (buffer, mime_type,
                         gtk2perl_text_buffer_serialize_func,
                         gtk2perl_text_buffer_serialize_func_create
                                                (function, user_data),
                         (GDestroyNotify) gperl_callback_destroy);
#line 320 "xs/GtkTextBufferRichText.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkAtom (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__TextBuffer_register_deserialize_format); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_register_deserialize_format)
{
    dVAR; dXSARGS;
    if (items < 3 || items > 4)
       croak_xs_usage(cv,  "buffer, mime_type, function, user_data=NULL");
    {
	GdkAtom	RETVAL;
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
	const gchar *	mime_type;
	SV *	function = ST(2)
;
	SV *	user_data;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	mime_type = (const gchar *)SvPV_nolen (ST(1))
;

	if (items < 4)
	    user_data = NULL;
	else {
	    user_data = ST(3)
;
	}
#line 147 "xs/GtkTextBufferRichText.xs"
        RETVAL = gtk_text_buffer_register_deserialize_format
                        (buffer, mime_type,
                         gtk2perl_text_buffer_deserialize_func,
                         gtk2perl_text_buffer_deserialize_func_create
                                                (function, user_data),
                         (GDestroyNotify) gperl_callback_destroy);
#line 365 "xs/GtkTextBufferRichText.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkAtom (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__TextBuffer_register_serialize_tagset); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_register_serialize_tagset)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, tagset_name");
    {
	GdkAtom	RETVAL;
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
	const gchar_ornull *	tagset_name;

	/* same as SvGChar(), but allows undef as NULL */
	if (gperl_sv_is_defined (ST(1))) {
		sv_utf8_upgrade (ST(1));
		tagset_name = (const gchar_ornull *)SvPV_nolen (ST(1));
	} else {
		tagset_name = NULL;
	}
;

	RETVAL = gtk_text_buffer_register_serialize_tagset(buffer, tagset_name);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkAtom (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__TextBuffer_register_deserialize_tagset); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_register_deserialize_tagset)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, tagset_name");
    {
	GdkAtom	RETVAL;
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
	const gchar_ornull *	tagset_name;

	/* same as SvGChar(), but allows undef as NULL */
	if (gperl_sv_is_defined (ST(1))) {
		sv_utf8_upgrade (ST(1));
		tagset_name = (const gchar_ornull *)SvPV_nolen (ST(1));
	} else {
		tagset_name = NULL;
	}
;

	RETVAL = gtk_text_buffer_register_deserialize_tagset(buffer, tagset_name);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkAtom (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__TextBuffer_unregister_serialize_format); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_unregister_serialize_format)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, format");
    {
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
	GdkAtom	format = SvGdkAtom (ST(1))
;

	gtk_text_buffer_unregister_serialize_format(buffer, format);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__TextBuffer_unregister_deserialize_format); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_unregister_deserialize_format)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, format");
    {
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
	GdkAtom	format = SvGdkAtom (ST(1))
;

	gtk_text_buffer_unregister_deserialize_format(buffer, format);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__TextBuffer_deserialize_set_can_create_tags); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_deserialize_set_can_create_tags)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "buffer, format, can_create_tags");
    {
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
	GdkAtom	format = SvGdkAtom (ST(1))
;
	gboolean	can_create_tags = (bool)SvTRUE(ST(2))
;

	gtk_text_buffer_deserialize_set_can_create_tags(buffer, format, can_create_tags);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__TextBuffer_deserialize_get_can_create_tags); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_deserialize_get_can_create_tags)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, format");
    {
	gboolean	RETVAL;
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
	GdkAtom	format = SvGdkAtom (ST(1))
;

	RETVAL = gtk_text_buffer_deserialize_get_can_create_tags(buffer, format);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__TextBuffer_get_serialize_formats); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_get_serialize_formats)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 173 "xs/GtkTextBufferRichText.xs"
        GdkAtom * formats;
        gint n_formats;
#line 532 "xs/GtkTextBufferRichText.c"
	GtkTextBuffer *	buffer = SvGtkTextBuffer (ST(0))
;
#line 176 "xs/GtkTextBufferRichText.xs"
        if (ix == 1)
                formats = gtk_text_buffer_get_deserialize_formats (buffer,
                                                                   &n_formats);
        else
                formats = gtk_text_buffer_get_serialize_formats (buffer,
                                                                 &n_formats);
        if (formats) {
                gint i;
                EXTEND (SP, n_formats);
                for (i = 0 ; i < n_formats ; i++)
                        PUSHs (sv_2mortal (newSVGdkAtom (formats[i])));
                g_free (formats);
        }
#line 549 "xs/GtkTextBufferRichText.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__TextBuffer_serialize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_serialize)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "register_buffer, content_buffer, format, start, end");
    {
#line 197 "xs/GtkTextBufferRichText.xs"
        guint8 * text;
        gsize length;
#line 566 "xs/GtkTextBufferRichText.c"
	SV *	RETVAL;
	GtkTextBuffer *	register_buffer = SvGtkTextBuffer (ST(0))
;
	GtkTextBuffer *	content_buffer = SvGtkTextBuffer (ST(1))
;
	GdkAtom	format = SvGdkAtom (ST(2))
;
	const GtkTextIter *	start = SvGtkTextIter (ST(3))
;
	const GtkTextIter *	end = SvGtkTextIter (ST(4))
;
#line 200 "xs/GtkTextBufferRichText.xs"
        text = gtk_text_buffer_serialize (register_buffer, content_buffer,
                                          format, start, end, &length);
        if (!text)
                XSRETURN_UNDEF;
        RETVAL = newSVpvn ((const char *) text, length);
#line 584 "xs/GtkTextBufferRichText.c"
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__TextBuffer_deserialize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__TextBuffer_deserialize)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "register_buffer, content_buffer, format, iter, data");
    {
#line 217 "xs/GtkTextBufferRichText.xs"
        GError * error = NULL;
        guint8 * text;
        STRLEN length;
#line 603 "xs/GtkTextBufferRichText.c"
	GtkTextBuffer *	register_buffer = SvGtkTextBuffer (ST(0))
;
	GtkTextBuffer *	content_buffer = SvGtkTextBuffer (ST(1))
;
	GdkAtom	format = SvGdkAtom (ST(2))
;
	GtkTextIter *	iter = SvGtkTextIter (ST(3))
;
	SV *	data = ST(4)
;
#line 221 "xs/GtkTextBufferRichText.xs"
        text = (guint8 *) SvPV (data, length);
        if (!gtk_text_buffer_deserialize (register_buffer, content_buffer,
                                          format, iter, text, length, &error))
                gperl_croak_gerror (NULL, error);
#line 619 "xs/GtkTextBufferRichText.c"
    }
    XSRETURN_EMPTY;
}

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

    PERL_UNUSED_VAR(file);

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#if PERL_VERSION_LE(5, 21, 5)
    XS_VERSION_BOOTCHECK;
#  ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#  endif
#endif

        newXS_deffile("Gtk2::TextBuffer::register_serialize_format", XS_Gtk2__TextBuffer_register_serialize_format);
        newXS_deffile("Gtk2::TextBuffer::register_deserialize_format", XS_Gtk2__TextBuffer_register_deserialize_format);
        newXS_deffile("Gtk2::TextBuffer::register_serialize_tagset", XS_Gtk2__TextBuffer_register_serialize_tagset);
        newXS_deffile("Gtk2::TextBuffer::register_deserialize_tagset", XS_Gtk2__TextBuffer_register_deserialize_tagset);
        newXS_deffile("Gtk2::TextBuffer::unregister_serialize_format", XS_Gtk2__TextBuffer_unregister_serialize_format);
        newXS_deffile("Gtk2::TextBuffer::unregister_deserialize_format", XS_Gtk2__TextBuffer_unregister_deserialize_format);
        newXS_deffile("Gtk2::TextBuffer::deserialize_set_can_create_tags", XS_Gtk2__TextBuffer_deserialize_set_can_create_tags);
        newXS_deffile("Gtk2::TextBuffer::deserialize_get_can_create_tags", XS_Gtk2__TextBuffer_deserialize_get_can_create_tags);
        cv = newXS_deffile("Gtk2::TextBuffer::get_deserialize_formats", XS_Gtk2__TextBuffer_get_serialize_formats);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Gtk2::TextBuffer::get_serialize_formats", XS_Gtk2__TextBuffer_get_serialize_formats);
        XSANY.any_i32 = 0;
        newXS_deffile("Gtk2::TextBuffer::serialize", XS_Gtk2__TextBuffer_serialize);
        newXS_deffile("Gtk2::TextBuffer::deserialize", XS_Gtk2__TextBuffer_deserialize);
#if PERL_VERSION_LE(5, 21, 5)
#  if PERL_VERSION_GE(5, 9, 0)
    if (PL_unitcheckav)
        call_list(PL_scopestack_ix, PL_unitcheckav);
#  endif
    XSRETURN_YES;
#else
    Perl_xs_boot_epilog(aTHX_ ax);
#endif
}

