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

#line 1 "xs/GtkSourceBuffer.xs"
/*
 * Copyright (c) 2009-2010 by Emmanuel Rodriguez (see the file AUTHORS)
 *
 * This library 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; or the
 * Artistic License, version 2.0.
 *
 * 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
 * General Public License for more details; or the Artistic License.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, see
 * <https://www.gnu.org/licenses/>.
 */

#include "gtk2-sourceview2-perl.h"

/**
 * Returns a GSList in the stack and frees the input list.
 */
#define sourceview2perl_return_gslist(list) \
do {\
	GSList *iter_ = (list); /* Iterator, doesn't need to be freed */ \
	for (; iter_ != NULL ; iter_ = iter_->next) { \
		GtkSourceMark *mark = GTK_SOURCE_MARK(iter_->data); \
		SV *sv = newSVGtkSourceMark(mark); \
		XPUSHs(sv_2mortal(sv)); \
	} \
	g_slist_free(list); \
} while (FALSE)


#line 47 "xs/GtkSourceBuffer.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 191 "xs/GtkSourceBuffer.c"

XS_EUPXS(XS_Gtk2__SourceView2__Buffer_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_new)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, table");
    {
	GtkSourceBuffer *	RETVAL;
	GtkTextTagTable_ornull *	table = SvGtkTextTagTable_ornull (ST(1))
;

	RETVAL = gtk_source_buffer_new(table);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkSourceBuffer (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_new_with_language); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_new_with_language)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, language");
    {
	GtkSourceBuffer *	RETVAL;
	GtkSourceLanguage *	language = SvGtkSourceLanguage (ST(1))
;

	RETVAL = gtk_source_buffer_new_with_language(language);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkSourceBuffer (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_highlight_syntax); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_highlight_syntax)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	gboolean	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	RETVAL = gtk_source_buffer_get_highlight_syntax(buffer);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_highlight_syntax); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_highlight_syntax)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, highlight");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	gboolean	highlight = (bool)SvTRUE(ST(1))
;

	gtk_source_buffer_set_highlight_syntax(buffer, highlight);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_highlight_matching_brackets); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_highlight_matching_brackets)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	gboolean	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	RETVAL = gtk_source_buffer_get_highlight_matching_brackets(buffer);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_highlight_matching_brackets); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_highlight_matching_brackets)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, highlight");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	gboolean	highlight = (bool)SvTRUE(ST(1))
;

	gtk_source_buffer_set_highlight_matching_brackets(buffer, highlight);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_max_undo_levels); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_max_undo_levels)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	gint	RETVAL;
	dXSTARG;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	RETVAL = gtk_source_buffer_get_max_undo_levels(buffer);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_max_undo_levels); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_max_undo_levels)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, max_undo_levels");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	gint	max_undo_levels = (gint)SvIV(ST(1))
;

	gtk_source_buffer_set_max_undo_levels(buffer, max_undo_levels);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_language); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_language)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	GtkSourceLanguage_ornull *	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	RETVAL = gtk_source_buffer_get_language(buffer);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkSourceLanguage_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_language); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_language)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, language");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	GtkSourceLanguage_ornull *	language = SvGtkSourceLanguage_ornull (ST(1))
;

	gtk_source_buffer_set_language(buffer, language);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_can_undo); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_can_undo)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	gboolean	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	RETVAL = gtk_source_buffer_can_undo(buffer);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_can_redo); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_can_redo)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	gboolean	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	RETVAL = gtk_source_buffer_can_redo(buffer);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_style_scheme); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_style_scheme)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	GtkSourceStyleScheme_ornull *	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	RETVAL = gtk_source_buffer_get_style_scheme(buffer);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkSourceStyleScheme_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_style_scheme); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_set_style_scheme)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "buffer, scheme");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	GtkSourceStyleScheme *	scheme = SvGtkSourceStyleScheme (ST(1))
;

	gtk_source_buffer_set_style_scheme(buffer, scheme);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_ensure_highlight); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_ensure_highlight)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "buffer, start, end");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	const GtkTextIter *	start = SvGtkTextIter (ST(1))
;
	const GtkTextIter *	end = SvGtkTextIter (ST(2))
;

	gtk_source_buffer_ensure_highlight(buffer, start, end);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_undo); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_undo)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	gtk_source_buffer_undo(buffer);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_redo); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_redo)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	gtk_source_buffer_redo(buffer);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_begin_not_undoable_action); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_begin_not_undoable_action)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	gtk_source_buffer_begin_not_undoable_action(buffer);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_end_not_undoable_action); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_end_not_undoable_action)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "buffer");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;

	gtk_source_buffer_end_not_undoable_action(buffer);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_create_source_mark); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_create_source_mark)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "buffer, name, category, where");
    {
	GtkSourceMark *	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	const gchar_ornull *	name;
	const gchar *	category;
	const GtkTextIter *	where = SvGtkTextIter (ST(3))
;

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

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

	RETVAL = gtk_source_buffer_create_source_mark(buffer, name, category, where);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkSourceMark (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_forward_iter_to_source_mark); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_forward_iter_to_source_mark)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "buffer, iter, category");
    {
	gboolean	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	GtkTextIter *	iter = SvGtkTextIter (ST(1))
;
	const gchar_ornull *	category;

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

	RETVAL = gtk_source_buffer_forward_iter_to_source_mark(buffer, iter, category);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_backward_iter_to_source_mark); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_backward_iter_to_source_mark)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "buffer, iter, category");
    {
	gboolean	RETVAL;
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	GtkTextIter *	iter = SvGtkTextIter (ST(1))
;
	const gchar_ornull *	category;

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

	RETVAL = gtk_source_buffer_backward_iter_to_source_mark(buffer, iter, category);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_source_marks_at_iter); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_source_marks_at_iter)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "buffer, iter, category");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 122 "xs/GtkSourceBuffer.xs"
		GSList *list = NULL;

#line 663 "xs/GtkSourceBuffer.c"
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	GtkTextIter *	iter = SvGtkTextIter (ST(1))
;
	const gchar_ornull *	category;

	/* same as SvGChar(), but allows undef as NULL */
	if (gperl_sv_is_defined (ST(2))) {
		sv_utf8_upgrade (ST(2));
		category = (const gchar_ornull *)SvPV_nolen (ST(2));
	} else {
		category = NULL;
	}
;
#line 125 "xs/GtkSourceBuffer.xs"
		list = gtk_source_buffer_get_source_marks_at_iter(buffer, iter, category);
		sourceview2perl_return_gslist(list);
#line 681 "xs/GtkSourceBuffer.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_source_marks_at_line); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_get_source_marks_at_line)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "buffer, line, category");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 131 "xs/GtkSourceBuffer.xs"
		GSList *list = NULL;

#line 700 "xs/GtkSourceBuffer.c"
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	gint	line = (gint)SvIV(ST(1))
;
	const gchar_ornull *	category;

	/* same as SvGChar(), but allows undef as NULL */
	if (gperl_sv_is_defined (ST(2))) {
		sv_utf8_upgrade (ST(2));
		category = (const gchar_ornull *)SvPV_nolen (ST(2));
	} else {
		category = NULL;
	}
;
#line 134 "xs/GtkSourceBuffer.xs"
		list = gtk_source_buffer_get_source_marks_at_line(buffer, line, category);
		sourceview2perl_return_gslist(list);
#line 718 "xs/GtkSourceBuffer.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__SourceView2__Buffer_remove_source_marks); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__SourceView2__Buffer_remove_source_marks)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "buffer, start, end, category");
    {
	GtkSourceBuffer *	buffer = SvGtkSourceBuffer (ST(0))
;
	const GtkTextIter *	start = SvGtkTextIter (ST(1))
;
	const GtkTextIter *	end = SvGtkTextIter (ST(2))
;
	const gchar_ornull *	category;

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

	gtk_source_buffer_remove_source_marks(buffer, start, end, category);
    }
    XSRETURN_EMPTY;
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__SourceView2__Buffer); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__SourceView2__Buffer)
{
#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::SourceView2::Buffer::new", XS_Gtk2__SourceView2__Buffer_new);
        newXS_deffile("Gtk2::SourceView2::Buffer::new_with_language", XS_Gtk2__SourceView2__Buffer_new_with_language);
        newXS_deffile("Gtk2::SourceView2::Buffer::get_highlight_syntax", XS_Gtk2__SourceView2__Buffer_get_highlight_syntax);
        newXS_deffile("Gtk2::SourceView2::Buffer::set_highlight_syntax", XS_Gtk2__SourceView2__Buffer_set_highlight_syntax);
        newXS_deffile("Gtk2::SourceView2::Buffer::get_highlight_matching_brackets", XS_Gtk2__SourceView2__Buffer_get_highlight_matching_brackets);
        newXS_deffile("Gtk2::SourceView2::Buffer::set_highlight_matching_brackets", XS_Gtk2__SourceView2__Buffer_set_highlight_matching_brackets);
        newXS_deffile("Gtk2::SourceView2::Buffer::get_max_undo_levels", XS_Gtk2__SourceView2__Buffer_get_max_undo_levels);
        newXS_deffile("Gtk2::SourceView2::Buffer::set_max_undo_levels", XS_Gtk2__SourceView2__Buffer_set_max_undo_levels);
        newXS_deffile("Gtk2::SourceView2::Buffer::get_language", XS_Gtk2__SourceView2__Buffer_get_language);
        newXS_deffile("Gtk2::SourceView2::Buffer::set_language", XS_Gtk2__SourceView2__Buffer_set_language);
        newXS_deffile("Gtk2::SourceView2::Buffer::can_undo", XS_Gtk2__SourceView2__Buffer_can_undo);
        newXS_deffile("Gtk2::SourceView2::Buffer::can_redo", XS_Gtk2__SourceView2__Buffer_can_redo);
        newXS_deffile("Gtk2::SourceView2::Buffer::get_style_scheme", XS_Gtk2__SourceView2__Buffer_get_style_scheme);
        newXS_deffile("Gtk2::SourceView2::Buffer::set_style_scheme", XS_Gtk2__SourceView2__Buffer_set_style_scheme);
        newXS_deffile("Gtk2::SourceView2::Buffer::ensure_highlight", XS_Gtk2__SourceView2__Buffer_ensure_highlight);
        newXS_deffile("Gtk2::SourceView2::Buffer::undo", XS_Gtk2__SourceView2__Buffer_undo);
        newXS_deffile("Gtk2::SourceView2::Buffer::redo", XS_Gtk2__SourceView2__Buffer_redo);
        newXS_deffile("Gtk2::SourceView2::Buffer::begin_not_undoable_action", XS_Gtk2__SourceView2__Buffer_begin_not_undoable_action);
        newXS_deffile("Gtk2::SourceView2::Buffer::end_not_undoable_action", XS_Gtk2__SourceView2__Buffer_end_not_undoable_action);
        newXS_deffile("Gtk2::SourceView2::Buffer::create_source_mark", XS_Gtk2__SourceView2__Buffer_create_source_mark);
        newXS_deffile("Gtk2::SourceView2::Buffer::forward_iter_to_source_mark", XS_Gtk2__SourceView2__Buffer_forward_iter_to_source_mark);
        newXS_deffile("Gtk2::SourceView2::Buffer::backward_iter_to_source_mark", XS_Gtk2__SourceView2__Buffer_backward_iter_to_source_mark);
        newXS_deffile("Gtk2::SourceView2::Buffer::get_source_marks_at_iter", XS_Gtk2__SourceView2__Buffer_get_source_marks_at_iter);
        newXS_deffile("Gtk2::SourceView2::Buffer::get_source_marks_at_line", XS_Gtk2__SourceView2__Buffer_get_source_marks_at_line);
        newXS_deffile("Gtk2::SourceView2::Buffer::remove_source_marks", XS_Gtk2__SourceView2__Buffer_remove_source_marks);
#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
}

