/*
 * This file was generated automatically by xsubpp version 1.9508 from the 
 * contents of Xapian.xs. Do not edit this file, edit Xapian.xs instead.
 *
 *	ANY CHANGES MADE HERE WILL BE LOST! 
 *
 */

#line 1 "Xapian.xs"
#include <xapian.h>
#include <xapian/queryparser.h>
#include <string>
#include <vector>

#ifdef __cplusplus
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
#ifdef __cplusplus
}
#endif

using namespace std;
using namespace Xapian;


#line 30 "Xapian.c"

/* INCLUDE:  Including 'XS/Stem.xs' from 'Xapian.xs' */


/* INCLUDE:  Including 'XS/Database.xs' from 'XS/Stem.xs' */


/* INCLUDE:  Including 'XS/Document.xs' from 'XS/Database.xs' */


/* INCLUDE:  Including 'XS/Enquire.xs' from 'XS/Document.xs' */


/* INCLUDE:  Including 'XS/MSet.xs' from 'XS/Enquire.xs' */


/* INCLUDE:  Including 'XS/MSetIterator.xs' from 'XS/MSet.xs' */


/* INCLUDE:  Including 'XS/ESet.xs' from 'XS/MSetIterator.xs' */


/* INCLUDE:  Including 'XS/ESetIterator.xs' from 'XS/ESet.xs' */


/* INCLUDE:  Including 'XS/RSet.xs' from 'XS/ESetIterator.xs' */


/* INCLUDE:  Including 'XS/Query.xs' from 'XS/RSet.xs' */


/* INCLUDE:  Including 'XS/QueryParser.xs' from 'XS/Query.xs' */


/* INCLUDE:  Including 'XS/SimpleStopper.xs' from 'XS/QueryParser.xs' */


/* INCLUDE:  Including 'XS/TermIterator.xs' from 'XS/SimpleStopper.xs' */


/* INCLUDE:  Including 'XS/PostingIterator.xs' from 'XS/TermIterator.xs' */


/* INCLUDE:  Including 'XS/PositionIterator.xs' from 'XS/PostingIterator.xs' */


/* INCLUDE:  Including 'XS/ValueIterator.xs' from 'XS/PositionIterator.xs' */


/* INCLUDE:  Including 'XS/WritableDatabase.xs' from 'XS/ValueIterator.xs' */


/* INCLUDE:  Including 'XS/Weight.xs' from 'XS/WritableDatabase.xs' */


/* INCLUDE:  Including 'XS/BM25Weight.xs' from 'XS/Weight.xs' */


/* INCLUDE:  Including 'XS/BoolWeight.xs' from 'XS/BM25Weight.xs' */

XS(XS_Search__Xapian__BoolWeight_new)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::BoolWeight::new(CLASS)");
    {
	char *	CLASS = (char *)SvPV(ST(0),PL_na);
	BoolWeight *	RETVAL;
#line 8 "XS/BoolWeight.xs"
        RETVAL = new BoolWeight();
#line 101 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Weight", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__BoolWeight_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::BoolWeight::DESTROY(THIS)");
    {
	BoolWeight *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Weight") )
		THIS = (BoolWeight *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::BoolWeight::DESTROY() -- THIS is not a \"Search::Xapian::Weight\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/BM25Weight.xs' from 'XS/BoolWeight.xs' */

XS(XS_Search__Xapian__BM25Weight_new)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::BM25Weight::new(CLASS)");
    {
	char *	CLASS = (char *)SvPV(ST(0),PL_na);
	BM25Weight *	RETVAL;
#line 8 "XS/BM25Weight.xs"
        RETVAL = new BM25Weight();
#line 141 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Weight", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__BM25Weight_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::BM25Weight::DESTROY(THIS)");
    {
	BM25Weight *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Weight") )
		THIS = (BM25Weight *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::BM25Weight::DESTROY() -- THIS is not a \"Search::Xapian::Weight\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/Weight.xs' from 'XS/BM25Weight.xs' */


/* INCLUDE: Returning to 'XS/WritableDatabase.xs' from 'XS/Weight.xs' */

XS(XS_Search__Xapian__WritableDatabase_new1)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::new1(file, opts)");
    {
	string	file;
	int	opts = (int)SvIV(ST(1));
	WritableDatabase *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(0), len);
		file = string(tmp, len);
	};
#line 10 "XS/WritableDatabase.xs"
        try {
	    RETVAL = new WritableDatabase(file, opts);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 196 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::WritableDatabase", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::new2(database)");
    {
	WritableDatabase *	database;
	WritableDatabase *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		database = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::new2() -- database is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 23 "XS/WritableDatabase.xs"
        RETVAL = new WritableDatabase(*database);
#line 221 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::WritableDatabase", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_new3)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::new3()");
    {
	WritableDatabase *	RETVAL;
#line 30 "XS/WritableDatabase.xs"
        RETVAL = new WritableDatabase();
        try {
            *RETVAL = InMemory::open();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 243 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::WritableDatabase", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_flush)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::flush(THIS)");
    {
	WritableDatabase *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::flush() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 43 "XS/WritableDatabase.xs"
	try {
            THIS->flush();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 272 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_begin_transaction)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::begin_transaction(THIS)");
    {
	WritableDatabase *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::begin_transaction() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 53 "XS/WritableDatabase.xs"
	try {
            THIS->begin_transaction();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 299 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_commit_transaction)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::commit_transaction(THIS)");
    {
	WritableDatabase *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::commit_transaction() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 63 "XS/WritableDatabase.xs"
	try {
            THIS->commit_transaction();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 326 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_cancel_transaction)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::cancel_transaction(THIS)");
    {
	WritableDatabase *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::cancel_transaction() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 73 "XS/WritableDatabase.xs"
	try {
            THIS->cancel_transaction();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 353 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_add_document)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::add_document(THIS, document)");
    {
	Document *	document;
	WritableDatabase *	THIS;
	docid	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::Document") )
		document = (Document *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::WritableDatabase::add_document() -- document is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::add_document() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 84 "XS/WritableDatabase.xs"
        try {
	    RETVAL = THIS->add_document(*document);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 390 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_delete_document)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::delete_document(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	WritableDatabase *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::delete_document() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 97 "XS/WritableDatabase.xs"
        try {
	    THIS->delete_document(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 419 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_delete_document_by_term)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::delete_document_by_term(THIS, unique_term)");
    {
	string	unique_term;
	WritableDatabase *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		unique_term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::delete_document_by_term() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 108 "XS/WritableDatabase.xs"
        try {
	    THIS->delete_document(unique_term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 453 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_replace_document)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::replace_document(THIS, did, document)");
    {
	docid	did = (docid)SvUV(ST(1));
	Document *	document;
	WritableDatabase *	THIS;

	if( sv_isobject(ST(2)) && sv_derived_from(ST(2), "Search::Xapian::Document") )
		document = (Document *)SvIV((SV*)SvRV( ST(2) ));
	else{
		warn( "Search::Xapian::WritableDatabase::replace_document() -- document is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::replace_document() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 120 "XS/WritableDatabase.xs"
        try {
	    THIS->replace_document(did, *document);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 489 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_replace_document_by_term)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::replace_document_by_term(THIS, unique_term, document)");
    {
	string	unique_term;
	Document *	document;
	WritableDatabase *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		unique_term = string(tmp, len);
	};

	if( sv_isobject(ST(2)) && sv_derived_from(ST(2), "Search::Xapian::Document") )
		document = (Document *)SvIV((SV*)SvRV( ST(2) ));
	else{
		warn( "Search::Xapian::WritableDatabase::replace_document_by_term() -- document is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::replace_document_by_term() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 132 "XS/WritableDatabase.xs"
        try {
	    THIS->replace_document(unique_term, *document);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 531 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_reopen)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::reopen(THIS)");
    {
	WritableDatabase *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::reopen() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 142 "XS/WritableDatabase.xs"
	try {
            THIS->reopen();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 558 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::get_description(THIS)");
    {
	WritableDatabase *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::get_description() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 152 "XS/WritableDatabase.xs"
	try {
            RETVAL = THIS->get_description();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 587 "Xapian.c"
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_termlist_begin)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::termlist_begin(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	WritableDatabase *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::termlist_begin() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 165 "XS/WritableDatabase.xs"
        RETVAL = new TermIterator();
	try {
	    *RETVAL = THIS->termlist_begin(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 618 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_termlist_end)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::termlist_end(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	WritableDatabase *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::termlist_end() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 179 "XS/WritableDatabase.xs"
        RETVAL = new TermIterator();
	try {
	    *RETVAL = THIS->termlist_end(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 650 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_positionlist_begin)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::positionlist_begin(THIS, did, term)");
    {
	docid	did = (docid)SvUV(ST(1));
	string	term;
	WritableDatabase *	THIS;
	PositionIterator *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(2), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::positionlist_begin() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 194 "XS/WritableDatabase.xs"
        RETVAL = new PositionIterator();
	try {
	    *RETVAL = THIS->positionlist_begin(did, term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 689 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_positionlist_end)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::positionlist_end(THIS, did, term)");
    {
	docid	did = (docid)SvUV(ST(1));
	string	term;
	WritableDatabase *	THIS;
	PositionIterator *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(2), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::positionlist_end() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 209 "XS/WritableDatabase.xs"
        RETVAL = new PositionIterator();
	try {
	    *RETVAL = THIS->positionlist_end(did, term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 728 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_allterms_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::allterms_begin(THIS)");
    {
	WritableDatabase *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::allterms_begin() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 222 "XS/WritableDatabase.xs"
        RETVAL = new TermIterator();
	try {
	    *RETVAL = THIS->allterms_begin();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 759 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_allterms_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::allterms_end(THIS)");
    {
	WritableDatabase *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::allterms_end() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 235 "XS/WritableDatabase.xs"
        RETVAL = new TermIterator();
	try {
	    *RETVAL = THIS->allterms_end();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 790 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_postlist_begin)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::postlist_begin(THIS, term)");
    {
	string	term;
	WritableDatabase *	THIS;
	PostingIterator *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::postlist_begin() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 249 "XS/WritableDatabase.xs"
        RETVAL = new PostingIterator();
	try {
	    *RETVAL = THIS->postlist_begin(term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 828 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PostingIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_postlist_end)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::postlist_end(THIS, term)");
    {
	string	term;
	WritableDatabase *	THIS;
	PostingIterator *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::postlist_end() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 263 "XS/WritableDatabase.xs"
        RETVAL = new PostingIterator();
	try {
	    *RETVAL = THIS->postlist_end(term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 866 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PostingIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_get_doccount)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::get_doccount(THIS)");
    {
	WritableDatabase *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::get_doccount() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 276 "XS/WritableDatabase.xs"
	try {
            RETVAL = THIS->get_doccount();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 897 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_get_lastdocid)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::get_lastdocid(THIS)");
    {
	WritableDatabase *	THIS;
	docid	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::get_lastdocid() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 288 "XS/WritableDatabase.xs"
	try {
            RETVAL = THIS->get_lastdocid();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 927 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_get_avlength)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::get_avlength(THIS)");
    {
	WritableDatabase *	THIS;
	doclength	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::get_avlength() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 300 "XS/WritableDatabase.xs"
	try {
            RETVAL = THIS->get_avlength();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 957 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_get_termfreq)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::get_termfreq(THIS, tname)");
    {
	string	tname;
	WritableDatabase *	THIS;
	doccount	RETVAL;
	dXSTARG;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::get_termfreq() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 313 "XS/WritableDatabase.xs"
	try {
            RETVAL = THIS->get_termfreq(tname);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 994 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_term_exists)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::term_exists(THIS, tname)");
    {
	string	tname;
	WritableDatabase *	THIS;
	bool	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::term_exists() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 326 "XS/WritableDatabase.xs"
	try {
	    RETVAL = THIS->term_exists(tname);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 1030 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_get_collection_freq)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::get_collection_freq(THIS, tname)");
    {
	string	tname;
	WritableDatabase *	THIS;
	termcount	RETVAL;
	dXSTARG;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::get_collection_freq() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 339 "XS/WritableDatabase.xs"
	try {
	    RETVAL = THIS->get_collection_freq(tname);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 1068 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_get_doclength)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::get_doclength(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	WritableDatabase *	THIS;
	doclength	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::get_doclength() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 352 "XS/WritableDatabase.xs"
	try {
	    RETVAL = THIS->get_doclength(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 1099 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_keep_alive)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::keep_alive(THIS)");
    {
	WritableDatabase *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::keep_alive() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 364 "XS/WritableDatabase.xs"
	try {
	    THIS->keep_alive();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 1127 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__WritableDatabase_get_document)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::get_document(THIS, did)");
    {
	WritableDatabase *	THIS;
	Document *	RETVAL;
	docid	did = (docid)SvUV(ST(1));

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::get_document() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 375 "XS/WritableDatabase.xs"
        RETVAL = new Document();
	try {
	    *RETVAL = THIS->get_document(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 1157 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Document", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__WritableDatabase_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::WritableDatabase::DESTROY(THIS)");
    {
	WritableDatabase *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::WritableDatabase") )
		THIS = (WritableDatabase *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::WritableDatabase::DESTROY() -- THIS is not a \"Search::Xapian::WritableDatabase\" object" );
		XSRETURN_UNDEF;
	}
       ;

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/ValueIterator.xs' from 'XS/WritableDatabase.xs' */

XS(XS_Search__Xapian__ValueIterator_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::new1()");
    {
	ValueIterator *	RETVAL;
#line 8 "XS/ValueIterator.xs"
        RETVAL = new ValueIterator();
#line 1197 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ValueIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ValueIterator_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::new2(other)");
    {
	ValueIterator *	other;
	ValueIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ValueIterator") )
		other = (ValueIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ValueIterator::new2() -- other is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/ValueIterator.xs"
        RETVAL = new ValueIterator(*other);
#line 1221 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ValueIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ValueIterator_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::DESTROY(THIS)");
    {
	ValueIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ValueIterator") )
		THIS = (ValueIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ValueIterator::DESTROY() -- THIS is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__ValueIterator_inc)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::inc(THIS)");
    {
	ValueIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ValueIterator") )
		THIS = (ValueIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ValueIterator::inc() -- THIS is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 26 "XS/ValueIterator.xs"
        ++(*THIS);
#line 1264 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__ValueIterator_equal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::equal(THIS, that)");
    {
	ValueIterator *	that;
	ValueIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::ValueIterator") )
		that = (ValueIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::ValueIterator::equal() -- that is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ValueIterator") )
		THIS = (ValueIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ValueIterator::equal() -- THIS is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 32 "XS/ValueIterator.xs"
        RETVAL = ((*THIS) == (*that));
#line 1294 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ValueIterator_nequal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::nequal(THIS, that)");
    {
	ValueIterator *	that;
	ValueIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::ValueIterator") )
		that = (ValueIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::ValueIterator::nequal() -- that is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ValueIterator") )
		THIS = (ValueIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ValueIterator::nequal() -- THIS is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 40 "XS/ValueIterator.xs"
        RETVAL = ((*THIS) != (*that));
#line 1326 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ValueIterator_get_value)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::get_value(THIS)");
    {
	ValueIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ValueIterator") )
		THIS = (ValueIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ValueIterator::get_value() -- THIS is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 47 "XS/ValueIterator.xs"
        RETVAL = THIS->operator*();
#line 1351 "Xapian.c"
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ValueIterator_get_valueno)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::get_valueno(THIS)");
    {
	ValueIterator *	THIS;
	valueno	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ValueIterator") )
		THIS = (ValueIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ValueIterator::get_valueno() -- THIS is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_valueno();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ValueIterator_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ValueIterator::get_description(THIS)");
    {
	ValueIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ValueIterator") )
		THIS = (ValueIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ValueIterator::get_description() -- THIS is not a \"Search::Xapian::ValueIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}


/* INCLUDE: Returning to 'XS/PositionIterator.xs' from 'XS/ValueIterator.xs' */

XS(XS_Search__Xapian__PositionIterator_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::new1()");
    {
	PositionIterator *	RETVAL;
#line 8 "XS/PositionIterator.xs"
        RETVAL = new PositionIterator();
#line 1415 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PositionIterator_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::new2(other)");
    {
	PositionIterator *	other;
	PositionIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PositionIterator") )
		other = (PositionIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PositionIterator::new2() -- other is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/PositionIterator.xs"
        RETVAL = new PositionIterator(*other);
#line 1439 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PositionIterator_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::DESTROY(THIS)");
    {
	PositionIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PositionIterator") )
		THIS = (PositionIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PositionIterator::DESTROY() -- THIS is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__PositionIterator_inc)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::inc(THIS)");
    {
	PositionIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PositionIterator") )
		THIS = (PositionIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PositionIterator::inc() -- THIS is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 26 "XS/PositionIterator.xs"
        ++(*THIS);
#line 1482 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__PositionIterator_equal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::equal(THIS, that)");
    {
	PositionIterator *	that;
	PositionIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::PositionIterator") )
		that = (PositionIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::PositionIterator::equal() -- that is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PositionIterator") )
		THIS = (PositionIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PositionIterator::equal() -- THIS is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 32 "XS/PositionIterator.xs"
        RETVAL = ((*THIS) == (*that));
#line 1512 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PositionIterator_nequal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::nequal(THIS, that)");
    {
	PositionIterator *	that;
	PositionIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::PositionIterator") )
		that = (PositionIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::PositionIterator::nequal() -- that is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PositionIterator") )
		THIS = (PositionIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PositionIterator::nequal() -- THIS is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 40 "XS/PositionIterator.xs"
        RETVAL = ((*THIS) != (*that));
#line 1544 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PositionIterator_get_termpos)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::get_termpos(THIS)");
    {
	PositionIterator *	THIS;
	termpos	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PositionIterator") )
		THIS = (PositionIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PositionIterator::get_termpos() -- THIS is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 47 "XS/PositionIterator.xs"
        RETVAL = THIS->operator*();
#line 1569 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PositionIterator_skip_to)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::skip_to(THIS, pos)");
    {
	PositionIterator *	THIS;
	termpos	pos = (termpos)SvUV(ST(1));

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PositionIterator") )
		THIS = (PositionIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PositionIterator::skip_to() -- THIS is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};

	THIS->skip_to(pos);
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__PositionIterator_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PositionIterator::get_description(THIS)");
    {
	PositionIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PositionIterator") )
		THIS = (PositionIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PositionIterator::get_description() -- THIS is not a \"Search::Xapian::PositionIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}


/* INCLUDE: Returning to 'XS/PostingIterator.xs' from 'XS/PositionIterator.xs' */

XS(XS_Search__Xapian__PostingIterator_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::new1()");
    {
	PostingIterator *	RETVAL;
#line 8 "XS/PostingIterator.xs"
        RETVAL = new PostingIterator();
#line 1631 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PostingIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::new2(other)");
    {
	PostingIterator *	other;
	PostingIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		other = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::new2() -- other is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/PostingIterator.xs"
        RETVAL = new PostingIterator(*other);
#line 1655 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PostingIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::DESTROY(THIS)");
    {
	PostingIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::DESTROY() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__PostingIterator_inc)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::inc(THIS)");
    {
	PostingIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::inc() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 26 "XS/PostingIterator.xs"
        ++(*THIS);
#line 1698 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__PostingIterator_equal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::equal(THIS, that)");
    {
	PostingIterator *	that;
	PostingIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::PostingIterator") )
		that = (PostingIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::PostingIterator::equal() -- that is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::equal() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 32 "XS/PostingIterator.xs"
        RETVAL = ((*THIS) == (*that));
#line 1728 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_nequal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::nequal(THIS, that)");
    {
	PostingIterator *	that;
	PostingIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::PostingIterator") )
		that = (PostingIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::PostingIterator::nequal() -- that is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::nequal() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 40 "XS/PostingIterator.xs"
        RETVAL = ((*THIS) != (*that));
#line 1760 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_get_docid)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::get_docid(THIS)");
    {
	PostingIterator *	THIS;
	docid	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::get_docid() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 47 "XS/PostingIterator.xs"
        RETVAL = THIS->operator*();
#line 1785 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_get_doclength)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::get_doclength(THIS)");
    {
	PostingIterator *	THIS;
	doclength	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::get_doclength() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 54 "XS/PostingIterator.xs"
        RETVAL = THIS->get_doclength();
#line 1809 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_get_wdf)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::get_wdf(THIS)");
    {
	PostingIterator *	THIS;
	termcount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::get_wdf() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 61 "XS/PostingIterator.xs"
        RETVAL = THIS->get_wdf();
#line 1833 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::get_description(THIS)");
    {
	PostingIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::get_description() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_positionlist_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::positionlist_begin(THIS)");
    {
	PostingIterator *	THIS;
	PositionIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::positionlist_begin() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 71 "XS/PostingIterator.xs"
        RETVAL = new PositionIterator;
        *RETVAL = THIS->positionlist_begin();
#line 1880 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_positionlist_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::positionlist_end(THIS)");
    {
	PostingIterator *	THIS;
	PositionIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::positionlist_end() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 79 "XS/PostingIterator.xs"
        RETVAL = new PositionIterator;
        *RETVAL = THIS->positionlist_end();
#line 1905 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__PostingIterator_skip_to)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::PostingIterator::skip_to(THIS, pos)");
    {
	PostingIterator *	THIS;
	docid	pos = (docid)SvUV(ST(1));

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::PostingIterator") )
		THIS = (PostingIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::PostingIterator::skip_to() -- THIS is not a \"Search::Xapian::PostingIterator\" object" );
		XSRETURN_UNDEF;
	};

	THIS->skip_to(pos);
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/TermIterator.xs' from 'XS/PostingIterator.xs' */

XS(XS_Search__Xapian__TermIterator_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::new1()");
    {
	TermIterator *	RETVAL;
#line 8 "XS/TermIterator.xs"
        RETVAL = new TermIterator();
#line 1945 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::new2(other)");
    {
	TermIterator *	other;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		other = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::new2() -- other is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/TermIterator.xs"
        RETVAL = new TermIterator(*other);
#line 1969 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::DESTROY(THIS)");
    {
	TermIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::DESTROY() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__TermIterator_inc)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::inc(THIS)");
    {
	TermIterator *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::inc() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 26 "XS/TermIterator.xs"
        RETVAL = new TermIterator();
        *RETVAL = ++(*THIS);
#line 2014 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_equal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::equal(THIS, that)");
    {
	TermIterator *	that;
	TermIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::TermIterator") )
		that = (TermIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::TermIterator::equal() -- that is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::equal() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 35 "XS/TermIterator.xs"
        RETVAL = ((*THIS) == (*that));
#line 2046 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_nequal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::nequal(THIS, that)");
    {
	TermIterator *	that;
	TermIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::TermIterator") )
		that = (TermIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::TermIterator::nequal() -- that is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::nequal() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 43 "XS/TermIterator.xs"
        RETVAL = ((*THIS) != (*that));
#line 2078 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_get_termname)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::get_termname(THIS)");
    {
	TermIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::get_termname() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 50 "XS/TermIterator.xs"
        RETVAL = THIS->operator*();
#line 2103 "Xapian.c"
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_skip_to)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::skip_to(THIS, tname)");
    {
	TermIterator *	THIS;
	string	tname;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::skip_to() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	THIS->skip_to(tname);
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__TermIterator_get_wdf)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::get_wdf(THIS)");
    {
	TermIterator *	THIS;
	termcount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::get_wdf() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_wdf();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_get_termfreq)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::get_termfreq(THIS)");
    {
	TermIterator *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::get_termfreq() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_termfreq();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_positionlist_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::positionlist_begin(THIS)");
    {
	TermIterator *	THIS;
	PositionIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::positionlist_begin() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 66 "XS/TermIterator.xs"
        RETVAL = new PositionIterator;
        *RETVAL = THIS->positionlist_begin();
#line 2200 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_positionlist_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::positionlist_end(THIS)");
    {
	TermIterator *	THIS;
	PositionIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::positionlist_end() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 74 "XS/TermIterator.xs"
        RETVAL = new PositionIterator;
        *RETVAL = THIS->positionlist_end();
#line 2225 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__TermIterator_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::TermIterator::get_description(THIS)");
    {
	TermIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::TermIterator") )
		THIS = (TermIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::TermIterator::get_description() -- THIS is not a \"Search::Xapian::TermIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}


/* INCLUDE: Returning to 'XS/SimpleStopper.xs' from 'XS/TermIterator.xs' */

XS(XS_Search__Xapian__SimpleStopper_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::SimpleStopper::new1()");
    {
	SimpleStopper *	RETVAL;
#line 8 "XS/SimpleStopper.xs"
	RETVAL = new SimpleStopper();
#line 2267 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Stopper", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__SimpleStopper_new2)
{
    dXSARGS;
    {
#line 15 "XS/SimpleStopper.xs"
        vector<string> words;
#line 2280 "Xapian.c"
	SimpleStopper *	RETVAL;
#line 17 "XS/SimpleStopper.xs"
        for( int i = 1; i <= items; i++ ) {
            SV *sv = ST (i);
	    if( SvOK(sv) && SvPOK(sv) ) {
		string word = SvPV_nolen(sv);
	        words.push_back(word);
	    }
        }
	try {
            RETVAL = new SimpleStopper( words.begin(), words.end() );
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 2296 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Stopper", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__SimpleStopper_new)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::SimpleStopper::new(CLASS)");
    {
	char *	CLASS = (char *)SvPV(ST(0),PL_na);
	SimpleStopper *	RETVAL;
#line 36 "XS/SimpleStopper.xs"
	RETVAL = new SimpleStopper();
#line 2313 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Stopper", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__SimpleStopper_stopword)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::SimpleStopper::stopword(THIS, term)");
    {
	string	term;
	SimpleStopper *	THIS;
	bool	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Stopper") )
		THIS = (SimpleStopper *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::SimpleStopper::stopword() -- THIS is not a \"Search::Xapian::Stopper\" object" );
		XSRETURN_UNDEF;
	};
#line 44 "XS/SimpleStopper.xs"
	RETVAL = (*THIS)(term);
#line 2344 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__SimpleStopper_add)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::SimpleStopper::add(THIS, word)");
    {
	SimpleStopper *	THIS;
	string	word;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Stopper") )
		THIS = (SimpleStopper *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::SimpleStopper::add() -- THIS is not a \"Search::Xapian::Stopper\" object" );
		XSRETURN_UNDEF;
	};

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		word = string(tmp, len);
	};

	THIS->add(word);
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__SimpleStopper_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::SimpleStopper::DESTROY(THIS)");
    {
	SimpleStopper *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Stopper") )
		THIS = (SimpleStopper *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::SimpleStopper::DESTROY() -- THIS is not a \"Search::Xapian::Stopper\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/QueryParser.xs' from 'XS/SimpleStopper.xs' */

XS(XS_Search__Xapian__QueryParser_new0)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::QueryParser::new0()");
    {
	QueryParser *	RETVAL;
#line 8 "XS/QueryParser.xs"
	RETVAL = new QueryParser();
#line 2410 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::QueryParser", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__QueryParser_set_stemming_options)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::QueryParser::set_stemming_options(THIS, lang, stem_all = NO_INIT)");
    {
	string	lang;
	bool	stem_all;
	QueryParser *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		lang = string(tmp, len);
	};

	if (items >= 3) {
	    stem_all = (int)SvIV(ST(2));
	}

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::QueryParser") )
		THIS = (QueryParser *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::QueryParser::set_stemming_options() -- THIS is not a \"Search::Xapian::QueryParser\" object" );
		XSRETURN_UNDEF;
	};
#line 17 "XS/QueryParser.xs"
        if (items == 2) /* items includes the hidden this pointer */
	    THIS->set_stemming_options(lang);
	else 
	    THIS->set_stemming_options(lang, stem_all);
#line 2448 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__QueryParser_set_default_op)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::QueryParser::set_default_op(THIS, op)");
    {
	int	op = (int)SvIV(ST(1));
	QueryParser *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::QueryParser") )
		THIS = (QueryParser *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::QueryParser::set_default_op() -- THIS is not a \"Search::Xapian::QueryParser\" object" );
		XSRETURN_UNDEF;
	};
#line 26 "XS/QueryParser.xs"
	THIS->set_default_op(static_cast<Query::op>(op));
#line 2470 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__QueryParser_set_database)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::QueryParser::set_database(THIS, database)");
    {
	Database *	database;
	QueryParser *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::Database") )
		database = (Database *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::QueryParser::set_database() -- database is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::QueryParser") )
		THIS = (QueryParser *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::QueryParser::set_database() -- THIS is not a \"Search::Xapian::QueryParser\" object" );
		XSRETURN_UNDEF;
	};
#line 32 "XS/QueryParser.xs"
	THIS->set_database( *database );
#line 2500 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__QueryParser_parse_query)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::QueryParser::parse_query(THIS, q, flags = 7)");
    {
	string	q;
	int	flags;
	QueryParser *	THIS;
	Query *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		q = string(tmp, len);
	};

	if (items < 3)
	    flags = 7;
	else {
	    flags = (int)SvIV(ST(2));
	}

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::QueryParser") )
		THIS = (QueryParser *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::QueryParser::parse_query() -- THIS is not a \"Search::Xapian::QueryParser\" object" );
		XSRETURN_UNDEF;
	};
#line 39 "XS/QueryParser.xs"
    	try {
		RETVAL = new Query();
		*RETVAL = THIS->parse_query(q,flags);
	} catch ( ... ) {
	    croak("Error occured in queryparser.");
	}
#line 2541 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Query", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__QueryParser_add_prefix)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::QueryParser::add_prefix(THIS, field, prefix)");
    {
	string	field;
	string	prefix;
	QueryParser *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		field = string(tmp, len);
	};

	{
		STRLEN len;
		const char * tmp = SvPV(ST(2), len);
		prefix = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::QueryParser") )
		THIS = (QueryParser *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::QueryParser::add_prefix() -- THIS is not a \"Search::Xapian::QueryParser\" object" );
		XSRETURN_UNDEF;
	};
#line 53 "XS/QueryParser.xs"
	THIS->add_prefix( field,prefix );
#line 2578 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__QueryParser_add_boolean_prefix)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::QueryParser::add_boolean_prefix(THIS, field, prefix)");
    {
	string	field;
	string	prefix;
	QueryParser *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		field = string(tmp, len);
	};

	{
		STRLEN len;
		const char * tmp = SvPV(ST(2), len);
		prefix = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::QueryParser") )
		THIS = (QueryParser *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::QueryParser::add_boolean_prefix() -- THIS is not a \"Search::Xapian::QueryParser\" object" );
		XSRETURN_UNDEF;
	};
#line 60 "XS/QueryParser.xs"
	THIS->add_boolean_prefix( field,prefix );
#line 2613 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__QueryParser_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::QueryParser::DESTROY(THIS)");
    {
	QueryParser *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::QueryParser") )
		THIS = (QueryParser *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::QueryParser::DESTROY() -- THIS is not a \"Search::Xapian::QueryParser\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/Query.xs' from 'XS/QueryParser.xs' */

XS(XS_Search__Xapian__Query_new1)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::new1(term)");
    {
	string	term;
	Query *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(0), len);
		term = string(tmp, len);
	};
#line 9 "XS/Query.xs"
        RETVAL = new Query(term);
#line 2657 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Query", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_new2sv)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::new2sv(op, subq)");
    {
	int	op = (int)SvIV(ST(0));
	string	subq;
	Query *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		subq = string(tmp, len);
	};
#line 18 "XS/Query.xs"
        RETVAL = new Query( (Query::op) op, subq );
#line 2681 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Query", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_new2obj)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::new2obj(op, subq)");
    {
	int	op = (int)SvIV(ST(0));
	Query *	subq;
	Query *	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::Query") )
		subq = (Query *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::Query::new2obj() -- subq is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 27 "XS/Query.xs"
        RETVAL = new Query( (Query::op) op, *subq );
#line 2707 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Query", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_newXsv)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::newXsv(op, ...)");
    {
	int	op = (int)SvIV(ST(0));
#line 35 "XS/Query.xs"
        vector<string> terms;
#line 2723 "Xapian.c"
	Query *	RETVAL;
#line 37 "XS/Query.xs"
        for( int i = 1; i <= items; i++ ) {
            SV *sv = ST (i);
	    if( SvOK(sv) && SvPOK(sv) ) {
		string term = SvPV_nolen(sv);
	        terms.push_back(term);
	    }
        }
	try {
            RETVAL = new Query( (Query::op) op, terms.begin(), terms.end() );
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 2739 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Query", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_newXobj)
{
    dXSARGS;
    if (items < 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::newXobj(op, ...)");
    {
	int	op = (int)SvIV(ST(0));
#line 57 "XS/Query.xs"
        vector<Query> queries;
#line 2755 "Xapian.c"
	Query *	RETVAL;
#line 59 "XS/Query.xs"
        for( int i = 1; i <= items; i++ ) {
            SV *sv = ST (i);
	    if( sv_isobject(sv) ) {
		Query *query = (Query*) SvIV((SV*) SvRV(sv));
	        queries.push_back(*query);
	    }
        }
	try {
            RETVAL = new Query( (Query::op) op, queries.begin(), queries.end() );
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 2771 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Query", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_get_length)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::get_length(THIS)");
    {
	Query *	THIS;
	termcount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Query") )
		THIS = (Query *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Query::get_length() -- THIS is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;

	RETVAL = THIS->get_length();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_get_terms_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::get_terms_begin(THIS)");
    {
	Query *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Query") )
		THIS = (Query *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Query::get_terms_begin() -- THIS is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 81 "XS/Query.xs"
        RETVAL = new TermIterator();
        *RETVAL = THIS->get_terms_begin();
#line 2821 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_get_terms_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::get_terms_end(THIS)");
    {
	Query *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Query") )
		THIS = (Query *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Query::get_terms_end() -- THIS is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 89 "XS/Query.xs"
        RETVAL = new TermIterator();
        *RETVAL = THIS->get_terms_begin();
#line 2847 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_empty)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::empty(THIS)");
    {
	Query *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Query") )
		THIS = (Query *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Query::empty() -- THIS is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;

	RETVAL = THIS->empty();
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_is_empty)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::is_empty(THIS)");
    {
	Query *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Query") )
		THIS = (Query *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Query::is_empty() -- THIS is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;

	RETVAL = THIS->is_empty();
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::get_description(THIS)");
    {
	Query *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Query") )
		THIS = (Query *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Query::get_description() -- THIS is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Query_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Query::DESTROY(THIS)");
    {
	Query *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Query") )
		THIS = (Query *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Query::DESTROY() -- THIS is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/RSet.xs' from 'XS/Query.xs' */

XS(XS_Search__Xapian__RSet_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::new1()");
    {
	RSet *	RETVAL;
#line 8 "XS/RSet.xs"
        RETVAL = new RSet();
#line 2959 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::RSet", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__RSet_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::new2(other)");
    {
	RSet *	other;
	RSet *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		other = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::new2() -- other is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/RSet.xs"
        RETVAL = new RSet(*other);
#line 2983 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::RSet", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__RSet_size)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::size(THIS)");
    {
	RSet *	THIS;
	termcount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::size() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->size();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__RSet_empty)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::empty(THIS)");
    {
	RSet *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::empty() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->empty();
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__RSet_add_document1)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::add_document1(THIS, it)");
    {
	MSetIterator *	it;
	RSet *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		it = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::RSet::add_document1() -- it is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::add_document1() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};
#line 31 "XS/RSet.xs"
	THIS->add_document(*it);
#line 3060 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__RSet_add_document2)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::add_document2(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	RSet *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::add_document2() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};
#line 37 "XS/RSet.xs"
	THIS->add_document(did);
#line 3082 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__RSet_remove_document1)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::remove_document1(THIS, it)");
    {
	MSetIterator *	it;
	RSet *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		it = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::RSet::remove_document1() -- it is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::remove_document1() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};
#line 43 "XS/RSet.xs"
	THIS->remove_document(*it);
#line 3111 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__RSet_remove_document2)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::remove_document2(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	RSet *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::remove_document2() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};
#line 49 "XS/RSet.xs"
	THIS->remove_document(did);
#line 3133 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__RSet_contains1)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::contains1(THIS, it)");
    {
	MSetIterator *	it;
	RSet *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		it = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::RSet::contains1() -- it is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::contains1() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};
#line 55 "XS/RSet.xs"
	RETVAL = THIS->contains(*it);
#line 3163 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__RSet_contains2)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::contains2(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	RSet *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::contains2() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};
#line 63 "XS/RSet.xs"
	RETVAL = THIS->contains(did);
#line 3188 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__RSet_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::get_description(THIS)");
    {
	RSet *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::get_description() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__RSet_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::RSet::DESTROY(THIS)");
    {
	RSet *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::RSet") )
		THIS = (RSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::RSet::DESTROY() -- THIS is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/ESetIterator.xs' from 'XS/RSet.xs' */

XS(XS_Search__Xapian__ESetIterator_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::new1()");
    {
	ESetIterator *	RETVAL;
#line 8 "XS/ESetIterator.xs"
        RETVAL = new ESetIterator();
#line 3250 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::new2(other)");
    {
	ESetIterator *	other;
	ESetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		other = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::new2() -- other is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/ESetIterator.xs"
        RETVAL = new ESetIterator(* other);
#line 3274 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_inc)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::inc(THIS)");
    {
	ESetIterator *	THIS;
	ESetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		THIS = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::inc() -- THIS is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 23 "XS/ESetIterator.xs"
        RETVAL = new ESetIterator();
        *RETVAL = ++(*THIS);
#line 3299 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_dec)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::dec(THIS)");
    {
	ESetIterator *	THIS;
	ESetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		THIS = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::dec() -- THIS is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 31 "XS/ESetIterator.xs"
        RETVAL = new ESetIterator();
        *RETVAL = --(*THIS);
#line 3324 "Xapian.c"
	sv_setref_pv( ST(0), "Search::Xapian::ESetIterator", (void*)THIS );
	SvSETMAGIC(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_equal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::equal(THIS, that)");
    {
	ESetIterator *	THIS;
	bool	RETVAL;
	ESetIterator *	that;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		THIS = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::equal() -- THIS is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::ESetIterator") )
		that = (ESetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::ESetIterator::equal() -- that is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 39 "XS/ESetIterator.xs"
        RETVAL = ((*THIS) == (*that));
#line 3356 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_nequal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::nequal(THIS, that)");
    {
	ESetIterator *	THIS;
	bool	RETVAL;
	ESetIterator *	that;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		THIS = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::nequal() -- THIS is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::ESetIterator") )
		that = (ESetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::ESetIterator::nequal() -- that is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 46 "XS/ESetIterator.xs"
        RETVAL = ((*THIS) != (*that));
#line 3388 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_get_termname)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::get_termname(THIS)");
    {
	ESetIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		THIS = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::get_termname() -- THIS is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 53 "XS/ESetIterator.xs"
        RETVAL = THIS->operator*();
#line 3413 "Xapian.c"
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_get_weight)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::get_weight(THIS)");
    {
	ESetIterator *	THIS;
	weight	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		THIS = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::get_weight() -- THIS is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_weight();
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::get_description(THIS)");
    {
	ESetIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		THIS = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::get_description() -- THIS is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESetIterator_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESetIterator::DESTROY(THIS)");
    {
	ESetIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESetIterator") )
		THIS = (ESetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESetIterator::DESTROY() -- THIS is not a \"Search::Xapian::ESetIterator\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/ESet.xs' from 'XS/ESetIterator.xs' */

XS(XS_Search__Xapian__ESet_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::new1()");
    {
	ESet *	RETVAL;
#line 8 "XS/ESet.xs"
        RETVAL = new ESet();
#line 3497 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESet", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::new2(other)");
    {
	ESet *	other;
	ESet *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		other = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::new2() -- other is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/ESet.xs"
        RETVAL = new ESet(*other);
#line 3521 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESet", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_get_ebound)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::get_ebound(THIS)");
    {
	ESet *	THIS;
	termcount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		THIS = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::get_ebound() -- THIS is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_ebound();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_size)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::size(THIS)");
    {
	ESet *	THIS;
	termcount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		THIS = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::size() -- THIS is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->size();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_empty)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::empty(THIS)");
    {
	ESet *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		THIS = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::empty() -- THIS is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->empty();
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::begin(THIS)");
    {
	ESet *	THIS;
	ESetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		THIS = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::begin() -- THIS is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};
#line 33 "XS/ESet.xs"
        RETVAL = new ESetIterator();
        *RETVAL = THIS->begin();
#line 3615 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::end(THIS)");
    {
	ESet *	THIS;
	ESetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		THIS = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::end() -- THIS is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};
#line 41 "XS/ESet.xs"
        RETVAL = new ESetIterator();
        *RETVAL = THIS->end();
#line 3640 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_back)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::back(THIS)");
    {
	ESet *	THIS;
	ESetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		THIS = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::back() -- THIS is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};
#line 49 "XS/ESet.xs"
        RETVAL = new ESetIterator();
        *RETVAL = THIS->back();
#line 3665 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::get_description(THIS)");
    {
	ESet *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		THIS = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::get_description() -- THIS is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__ESet_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::ESet::DESTROY(THIS)");
    {
	ESet *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::ESet") )
		THIS = (ESet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::ESet::DESTROY() -- THIS is not a \"Search::Xapian::ESet\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/MSetIterator.xs' from 'XS/ESet.xs' */

XS(XS_Search__Xapian__MSetIterator_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::new1()");
    {
	MSetIterator *	RETVAL;
#line 8 "XS/MSetIterator.xs"
        RETVAL = new MSetIterator();
#line 3727 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::new2(other)");
    {
	MSetIterator *	other;
	MSetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		other = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::new2() -- other is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/MSetIterator.xs"
        RETVAL = new MSetIterator(* other);
#line 3751 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_inc)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::inc(THIS)");
    {
	MSetIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::inc() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 23 "XS/MSetIterator.xs"
        ++(*THIS);
#line 3774 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__MSetIterator_dec)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::dec(THIS)");
    {
	MSetIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::dec() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 28 "XS/MSetIterator.xs"
        --(*THIS);
#line 3795 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__MSetIterator_equal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::equal(THIS, that)");
    {
	MSetIterator *	that;
	MSetIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		that = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::MSetIterator::equal() -- that is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::equal() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 34 "XS/MSetIterator.xs"
        RETVAL = ((*THIS) == (*that));
#line 3825 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_nequal)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::nequal(THIS, that)");
    {
	MSetIterator *	that;
	MSetIterator *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		that = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::MSetIterator::nequal() -- that is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::nequal() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 42 "XS/MSetIterator.xs"
        RETVAL = ((*THIS) != (*that));
#line 3857 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_get_docid)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::get_docid(THIS)");
    {
	MSetIterator *	THIS;
	docid	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::get_docid() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 49 "XS/MSetIterator.xs"
        RETVAL = THIS->operator*();
#line 3882 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_get_document)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::get_document(THIS)");
    {
	MSetIterator *	THIS;
	Document *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::get_document() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};
#line 56 "XS/MSetIterator.xs"
        RETVAL = new Document();
        *RETVAL = THIS->get_document();
#line 3906 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Document", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_get_rank)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::get_rank(THIS)");
    {
	MSetIterator *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::get_rank() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_rank();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_get_weight)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::get_weight(THIS)");
    {
	MSetIterator *	THIS;
	weight	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::get_weight() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_weight();
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_get_collapse_count)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::get_collapse_count(THIS)");
    {
	MSetIterator *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::get_collapse_count() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_collapse_count();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_get_percent)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::get_percent(THIS)");
    {
	MSetIterator *	THIS;
	percent	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::get_percent() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_percent();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::get_description(THIS)");
    {
	MSetIterator *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::get_description() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSetIterator_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSetIterator::DESTROY(THIS)");
    {
	MSetIterator *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSetIterator") )
		THIS = (MSetIterator *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSetIterator::DESTROY() -- THIS is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/MSet.xs' from 'XS/MSetIterator.xs' */

XS(XS_Search__Xapian__MSet_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::new1()");
    {
	MSet *	RETVAL;
#line 8 "XS/MSet.xs"
        RETVAL = new MSet();
#line 4060 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSet", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::new2(other)");
    {
	MSet *	other;
	MSet *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		other = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::new2() -- other is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/MSet.xs"
        RETVAL = new MSet(*other);
#line 4084 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSet", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_fetch1)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::fetch1(THIS, begin, end)");
    {
	MSetIterator *	begin;
	MSetIterator *	end;
	MSet *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		begin = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::MSet::fetch1() -- begin is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(2)) && sv_derived_from(ST(2), "Search::Xapian::MSetIterator") )
		end = (MSetIterator *)SvIV((SV*)SvRV( ST(2) ));
	else{
		warn( "Search::Xapian::MSet::fetch1() -- end is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::fetch1() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 25 "XS/MSet.xs"
        THIS->fetch(*begin, *end);
#line 4123 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__MSet_fetch2)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::fetch2(THIS, item)");
    {
	MSetIterator *	item;
	MSet *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		item = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::MSet::fetch2() -- item is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::fetch2() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 31 "XS/MSet.xs"
        THIS->fetch(*item);
#line 4152 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__MSet_fetch3)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::fetch3(THIS)");
    {
	MSet *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::fetch3() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 36 "XS/MSet.xs"
        THIS->fetch();
#line 4173 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__MSet_convert_to_percent1)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::convert_to_percent1(THIS, wt)");
    {
	weight	wt = (weight)SvNV(ST(1));
	MSet *	THIS;
	percent	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::convert_to_percent1() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 42 "XS/MSet.xs"
        THIS->convert_to_percent(wt);
#line 4197 "Xapian.c"
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_convert_to_percent2)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::convert_to_percent2(THIS, it)");
    {
	MSetIterator *	it;
	MSet *	THIS;
	percent	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		it = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::MSet::convert_to_percent2() -- it is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::convert_to_percent2() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 48 "XS/MSet.xs"
        THIS->convert_to_percent(*it);
#line 4228 "Xapian.c"
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_termfreq)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_termfreq(THIS, tname)");
    {
	string	tname;
	MSet *	THIS;
	doccount	RETVAL;
	dXSTARG;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_termfreq() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 54 "XS/MSet.xs"
        RETVAL = THIS->get_termfreq(tname);
#line 4258 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_termweight)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_termweight(THIS, tname)");
    {
	string	tname;
	MSet *	THIS;
	weight	RETVAL;
	dXSTARG;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_termweight() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 62 "XS/MSet.xs"
        RETVAL = THIS->get_termweight(tname);
#line 4289 "Xapian.c"
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_firstitem)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_firstitem(THIS)");
    {
	MSet *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_firstitem() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_firstitem();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_matches_lower_bound)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_matches_lower_bound(THIS)");
    {
	MSet *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_matches_lower_bound() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_matches_lower_bound();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_matches_estimated)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_matches_estimated(THIS)");
    {
	MSet *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_matches_estimated() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_matches_estimated();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_matches_upper_bound)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_matches_upper_bound(THIS)");
    {
	MSet *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_matches_upper_bound() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_matches_upper_bound();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_max_possible)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_max_possible(THIS)");
    {
	MSet *	THIS;
	weight	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_max_possible() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_max_possible();
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_max_attained)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_max_attained(THIS)");
    {
	MSet *	THIS;
	weight	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_max_attained() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_max_attained();
	XSprePUSH; PUSHn((NV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_size)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::size(THIS)");
    {
	MSet *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::size() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->size();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_max_size)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::max_size(THIS)");
    {
	MSet *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::max_size() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->max_size();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_empty)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::empty(THIS)");
    {
	MSet *	THIS;
	bool	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::empty() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->empty();
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_swap)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::swap(THIS, other)");
    {
	MSet *	other;
	MSet *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSet") )
		other = (MSet *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::MSet::swap() -- other is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::swap() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 97 "XS/MSet.xs"
        THIS->swap(*other);
#line 4526 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__MSet_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::begin(THIS)");
    {
	MSet *	THIS;
	MSetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::begin() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 102 "XS/MSet.xs"
        RETVAL = new MSetIterator();
        *RETVAL = THIS->begin();
#line 4549 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::end(THIS)");
    {
	MSet *	THIS;
	MSetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::end() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 110 "XS/MSet.xs"
        RETVAL = new MSetIterator();
        *RETVAL = THIS->end();
#line 4574 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_back)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::back(THIS)");
    {
	MSet *	THIS;
	MSetIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::back() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 118 "XS/MSet.xs"
        RETVAL = new MSetIterator();
        *RETVAL = THIS->back();
#line 4599 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_msetiterator)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_msetiterator(THIS, i)");
    {
	MSet *	THIS;
	MSetIterator *	RETVAL;
	doccount	i = (doccount)SvUV(ST(1));

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_msetiterator() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};
#line 126 "XS/MSet.xs"
        RETVAL = new MSetIterator();
        *RETVAL = (*THIS)[i];
#line 4625 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSetIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::get_description(THIS)");
    {
	MSet *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::get_description() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__MSet_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::MSet::DESTROY(THIS)");
    {
	MSet *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::MSet") )
		THIS = (MSet *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::MSet::DESTROY() -- THIS is not a \"Search::Xapian::MSet\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/Enquire.xs' from 'XS/MSet.xs' */

XS(XS_Search__Xapian__Enquire_new)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::new(CLASS, databases)");
    {
	Database *	databases;
	char *	CLASS = (char *)SvPV(ST(0),PL_na);
	Enquire *	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::Database") )
		databases = (Database *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::Enquire::new() -- databases is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 9 "XS/Enquire.xs"
        RETVAL = new Enquire(*databases);
#line 4697 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), CLASS, (void*)RETVAL );

    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_set_query_object)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::set_query_object(THIS, query)");
    {
	Query *	query;
	Enquire *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::Query") )
		query = (Query *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::Enquire::set_query_object() -- query is not a \"Search::Xapian::Query\" object" );
		XSRETURN_UNDEF;
	}
       ;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::set_query_object() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 17 "XS/Enquire.xs"
        THIS->set_query(*query);
#line 4730 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_get_query)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::get_query(THIS)");
    {
	Enquire *	THIS;
	Query *	RETVAL;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::get_query() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 22 "XS/Enquire.xs"
        RETVAL = new Query();
        *RETVAL = THIS->get_query();
#line 4753 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Query", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_set_collapse_key)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::set_collapse_key(THIS, collapse_key)");
    {
	valueno	collapse_key = (valueno)SvUV(ST(1));
	Enquire *	THIS;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::set_collapse_key() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 31 "XS/Enquire.xs"
        THIS->set_collapse_key(collapse_key);
#line 4777 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_set_sort_forward)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::set_sort_forward(THIS, sort_forward)");
    {
	bool	sort_forward = (int)SvIV(ST(1));
	Enquire *	THIS;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::set_sort_forward() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 37 "XS/Enquire.xs"
        THIS->set_sort_forward(sort_forward);
#line 4799 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_set_cutoff)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::set_cutoff(THIS, percent_cutoff, weight_cutoff = NO_INIT)");
    {
	percent	percent_cutoff = (percent)SvUV(ST(1));
	weight	weight_cutoff;
	Enquire *	THIS;

	if (items >= 3) {
	    weight_cutoff = (weight)SvNV(ST(2));
	}

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::set_cutoff() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 44 "XS/Enquire.xs"
        if (items == 3) { /* items includes the hidden this pointer */
            THIS->set_cutoff(percent_cutoff, weight_cutoff);
        } else {
            THIS->set_cutoff(percent_cutoff);
        }
#line 4830 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_set_sorting)
{
    dXSARGS;
    if (items < 3 || items > 4)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::set_sorting(THIS, sort_key, sort_bands, sort_by_relevance = NO_INIT)");
    {
	valueno	sort_key = (valueno)SvUV(ST(1));
	int	sort_bands = (int)SvIV(ST(2));
	bool	sort_by_relevance;
	Enquire *	THIS;

	if (items >= 4) {
	    sort_by_relevance = (int)SvIV(ST(3));
	}

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::set_sorting() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 56 "XS/Enquire.xs"
        if (items == 4) { /* items includes the hidden this pointer */
	    THIS->set_sorting(sort_key, sort_bands, sort_by_relevance);
        } else {
	    THIS->set_sorting(sort_key, sort_bands);
        }
#line 4862 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_set_bias)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::set_bias(THIS, bias_weight, bias_halflife)");
    {
	weight	bias_weight = (weight)SvNV(ST(1));
	time_t	bias_halflife = (time_t)SvNV(ST(2));
	Enquire *	THIS;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::set_bias() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 67 "XS/Enquire.xs"
        THIS->set_bias(bias_weight, bias_halflife);
#line 4885 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_get_mset)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::get_mset(THIS, first, maxitems)");
    {
	doccount	first = (doccount)SvUV(ST(1));
	doccount	maxitems = (doccount)SvUV(ST(2));
	Enquire *	THIS;
	MSet *	RETVAL;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::get_mset() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 74 "XS/Enquire.xs"
        RETVAL = new MSet();
        *RETVAL = THIS->get_mset(first, maxitems);
#line 4910 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::MSet", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_get_eset)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::get_eset(THIS, maxitems, rset)");
    {
	doccount	maxitems = (doccount)SvUV(ST(1));
	RSet *	rset;
	Enquire *	THIS;
	ESet *	RETVAL;

	if( sv_isobject(ST(2)) && sv_derived_from(ST(2), "Search::Xapian::RSet") )
		rset = (RSet *)SvIV((SV*)SvRV( ST(2) ));
	else{
		warn( "Search::Xapian::Enquire::get_eset() -- rset is not a \"Search::Xapian::RSet\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::get_eset() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 84 "XS/Enquire.xs"
        RETVAL = new ESet();
        *RETVAL = THIS->get_eset(maxitems, *rset);
#line 4944 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ESet", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_get_matching_terms_begin1)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::get_matching_terms_begin1(THIS, did)");
    {
	Enquire *	THIS;
	TermIterator *	RETVAL;
	docid	did = (docid)SvUV(ST(1));

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::get_matching_terms_begin1() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 92 "XS/Enquire.xs"
        RETVAL = new TermIterator();
        *RETVAL = THIS->get_matching_terms_begin(did);
#line 4970 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_get_matching_terms_begin2)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::get_matching_terms_begin2(THIS, it)");
    {
	MSetIterator *	it;
	Enquire *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		it = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::Enquire::get_matching_terms_begin2() -- it is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::get_matching_terms_begin2() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 101 "XS/Enquire.xs"
        RETVAL = new TermIterator();
        *RETVAL = THIS->get_matching_terms_begin(* it);
#line 5003 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_get_matching_terms_end1)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::get_matching_terms_end1(THIS, did)");
    {
	Enquire *	THIS;
	TermIterator *	RETVAL;
	docid	did = (docid)SvUV(ST(1));

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::get_matching_terms_end1() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 109 "XS/Enquire.xs"
        RETVAL = new TermIterator();
        *RETVAL = THIS->get_matching_terms_end(did);
#line 5029 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_get_matching_terms_end2)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::get_matching_terms_end2(THIS, it)");
    {
	MSetIterator *	it;
	Enquire *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::MSetIterator") )
		it = (MSetIterator *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::Enquire::get_matching_terms_end2() -- it is not a \"Search::Xapian::MSetIterator\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::get_matching_terms_end2() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 118 "XS/Enquire.xs"
        RETVAL = new TermIterator();
        *RETVAL = THIS->get_matching_terms_end(* it);
#line 5062 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_register_match_decoder)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::register_match_decoder(THIS, name, mdecider)");
    {
	string	name;
	MatchDecider *	mdecider;
	Enquire *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		name = string(tmp, len);
	};

	if( sv_isobject(ST(2)) && (SvTYPE(SvRV(ST(2))) == SVt_PVMG) )
		mdecider = (MatchDecider *)SvIV((SV*)SvRV( ST(2) ));
	else{
		warn( "Search::Xapian::Enquire::register_match_decoder() -- mdecider is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::register_match_decoder() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 128 "XS/Enquire.xs"
        THIS->register_match_decider(name, mdecider);
#line 5100 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_set_docid_order)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::set_docid_order(THIS, order)");
    {
	int	order = (int)SvIV(ST(1));
	Enquire *	THIS;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::set_docid_order() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 134 "XS/Enquire.xs"
	THIS->set_docid_order(static_cast<Enquire::docid_order>(order));
#line 5122 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_set_weighting_scheme)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::set_weighting_scheme(THIS, weight_)");
    {
	Weight *	weight_;
	Enquire *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::Weight") )
		weight_ = (Weight *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::Enquire::set_weighting_scheme() -- weight_ is not a \"Search::Xapian::Weight\" object" );
		XSRETURN_UNDEF;
	};

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::set_weighting_scheme() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};
#line 140 "XS/Enquire.xs"
	THIS->set_weighting_scheme( *weight_);
#line 5151 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Enquire_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::get_description(THIS)");
    {
	Enquire *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::get_description() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Enquire_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Enquire::DESTROY(THIS)");
    {
	Enquire *	THIS;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Enquire *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Enquire::DESTROY() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/Document.xs' from 'XS/Enquire.xs' */

XS(XS_Search__Xapian__Document_new1)
{
    dXSARGS;
    if (items != 0)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::new1()");
    {
	Document *	RETVAL;
#line 8 "XS/Document.xs"
        RETVAL = new Document();
#line 5211 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Document", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::new2(other)");
    {
	Document *	other;
	Document *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		other = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::new2() -- other is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 16 "XS/Document.xs"
        RETVAL = new Document(*other);
#line 5235 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Document", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_get_value)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::get_value(THIS, valno)");
    {
	Document *	THIS;
	string	RETVAL;
	dXSTARG;
	valueno	valno = (valueno)SvUV(ST(1));

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::get_value() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_value(valno);
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_add_value)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::add_value(THIS, valno, value)");
    {
	valueno	valno = (valueno)SvUV(ST(1));
	string	value;
	Document *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(2), len);
		value = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::add_value() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 28 "XS/Document.xs"
        THIS->add_value(valno, value);
#line 5290 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_remove_value)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::remove_value(THIS, valno)");
    {
	Document *	THIS;
	valueno	valno = (valueno)SvUV(ST(1));

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::remove_value() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	THIS->remove_value(valno);
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_clear_values)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::clear_values(THIS)");
    {
	Document *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::clear_values() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	THIS->clear_values();
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_get_data)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::get_data(THIS)");
    {
	Document *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::get_data() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_data();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_set_data)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::set_data(THIS, data)");
    {
	string	data;
	Document *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		data = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::set_data() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 43 "XS/Document.xs"
        THIS->set_data(data);
#line 5382 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_add_posting)
{
    dXSARGS;
    if (items < 3 || items > 4)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::add_posting(THIS, tname, tpos, wdfinc = NO_INIT)");
    {
	string	tname;
	termpos	tpos = (termpos)SvUV(ST(2));
	termcount	wdfinc;
	Document *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if (items >= 4) {
	    wdfinc = (termcount)SvUV(ST(3));
	}

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::add_posting() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 51 "XS/Document.xs"
        if (items == 4) { /* items includes the hidden this pointer */
            THIS->add_posting(tname, tpos, wdfinc);
        } else {
            THIS->add_posting(tname, tpos);
        }
#line 5420 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_add_term)
{
    dXSARGS;
    if (items < 2 || items > 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::add_term(THIS, tname, wdfinc = NO_INIT)");
    {
	string	tname;
	termcount	wdfinc;
	Document *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if (items >= 3) {
	    wdfinc = (termcount)SvUV(ST(2));
	}

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::add_term() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 62 "XS/Document.xs"
        if (items == 3) { /* items includes the hidden this pointer */
            THIS->add_term(tname, wdfinc);
        } else {
            THIS->add_term(tname);
        }
#line 5457 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_remove_posting)
{
    dXSARGS;
    if (items < 3 || items > 4)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::remove_posting(THIS, tname, tpos, wdfdec = NO_INIT)");
    {
	string	tname;
	termpos	tpos = (termpos)SvUV(ST(2));
	termcount	wdfdec;
	Document *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if (items >= 4) {
	    wdfdec = (termcount)SvUV(ST(3));
	}

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::remove_posting() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 74 "XS/Document.xs"
	try {
            if (items == 4) { /* items includes the hidden this pointer */
                THIS->remove_posting(tname, tpos, wdfdec);
            } else {
                THIS->remove_posting(tname, tpos);
            }
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5500 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_remove_term)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::remove_term(THIS, tname)");
    {
	string	tname;
	Document *	THIS;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::remove_term() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 89 "XS/Document.xs"
	try {
            THIS->remove_term(tname);  
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5533 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_clear_terms)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::clear_terms(THIS)");
    {
	Document *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::clear_terms() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	THIS->clear_terms();
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Document_termlist_count)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::termlist_count(THIS)");
    {
	Document *	THIS;
	termcount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::termlist_count() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->termlist_count();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_termlist_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::termlist_begin(THIS)");
    {
	Document *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::termlist_begin() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 105 "XS/Document.xs"
        RETVAL = new TermIterator();
        *RETVAL = THIS->termlist_begin();
#line 5599 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_termlist_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::termlist_end(THIS)");
    {
	Document *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::termlist_end() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 113 "XS/Document.xs"
        RETVAL = new TermIterator();
        *RETVAL = THIS->termlist_end();
#line 5624 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_values_count)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::values_count(THIS)");
    {
	Document *	THIS;
	termcount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::values_count() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->values_count();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_values_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::values_begin(THIS)");
    {
	Document *	THIS;
	ValueIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::values_begin() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 124 "XS/Document.xs"
        RETVAL = new ValueIterator();
        *RETVAL = THIS->values_begin();
#line 5672 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ValueIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_values_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::values_end(THIS)");
    {
	Document *	THIS;
	ValueIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::values_end() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};
#line 132 "XS/Document.xs"
        RETVAL = new ValueIterator();
        *RETVAL = THIS->values_end();
#line 5697 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::ValueIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::get_description(THIS)");
    {
	Document *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::get_description() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Document_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Document::DESTROY(THIS)");
    {
	Document *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Document") )
		THIS = (Document *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Document::DESTROY() -- THIS is not a \"Search::Xapian::Document\" object" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/Database.xs' from 'XS/Document.xs' */

XS(XS_Search__Xapian__Database_new1)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::new1(file)");
    {
	string	file;
	Database *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(0), len);
		file = string(tmp, len);
	};
#line 9 "XS/Database.xs"
        try {
	    RETVAL = new Database(file);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5771 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Database", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_new2)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::new2(database)");
    {
	Database *	database;
	Database *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		database = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::new2() -- database is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 22 "XS/Database.xs"
	try {
	    RETVAL = new Database(*database);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5801 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Database", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_add_database)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::add_database(THIS, database)");
    {
	Database *	database;
	Database *	THIS;

	if( sv_isobject(ST(1)) && sv_derived_from(ST(1), "Search::Xapian::Database") )
		database = (Database *)SvIV((SV*)SvRV( ST(1) ));
	else{
		warn( "Search::Xapian::Database::add_database() -- database is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::add_database() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 35 "XS/Database.xs"
	try {
	    THIS->add_database(*database);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5839 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Database_reopen)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::reopen(THIS)");
    {
	Database *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::reopen() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 45 "XS/Database.xs"
	try {
            THIS->reopen();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5866 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Database_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::get_description(THIS)");
    {
	Database *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::get_description() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 55 "XS/Database.xs"
	try {
            RETVAL = THIS->get_description();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5895 "Xapian.c"
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_termlist_begin)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::termlist_begin(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	Database *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::termlist_begin() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 68 "XS/Database.xs"
        RETVAL = new TermIterator();
	try {
	    *RETVAL = THIS->termlist_begin(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5926 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_termlist_end)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::termlist_end(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	Database *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::termlist_end() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 82 "XS/Database.xs"
        RETVAL = new TermIterator();
	try {
	    *RETVAL = THIS->termlist_end(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5958 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_positionlist_begin)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::positionlist_begin(THIS, did, term)");
    {
	docid	did = (docid)SvUV(ST(1));
	string	term;
	Database *	THIS;
	PositionIterator *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(2), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::positionlist_begin() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 97 "XS/Database.xs"
        RETVAL = new PositionIterator();
	try {
	    *RETVAL = THIS->positionlist_begin(did, term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 5997 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_positionlist_end)
{
    dXSARGS;
    if (items != 3)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::positionlist_end(THIS, did, term)");
    {
	docid	did = (docid)SvUV(ST(1));
	string	term;
	Database *	THIS;
	PositionIterator *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(2), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::positionlist_end() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 112 "XS/Database.xs"
        RETVAL = new PositionIterator();
	try {
	    *RETVAL = THIS->positionlist_end(did, term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6036 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PositionIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_allterms_begin)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::allterms_begin(THIS)");
    {
	Database *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::allterms_begin() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 125 "XS/Database.xs"
        RETVAL = new TermIterator();
	try {
	    *RETVAL = THIS->allterms_begin();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6067 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_allterms_end)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::allterms_end(THIS)");
    {
	Database *	THIS;
	TermIterator *	RETVAL;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::allterms_end() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 138 "XS/Database.xs"
        RETVAL = new TermIterator();
	try {
	    *RETVAL = THIS->allterms_end();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6098 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::TermIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_postlist_begin)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::postlist_begin(THIS, term)");
    {
	string	term;
	Database *	THIS;
	PostingIterator *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::postlist_begin() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 152 "XS/Database.xs"
        RETVAL = new PostingIterator();
	try {
	    *RETVAL = THIS->postlist_begin(term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6136 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PostingIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_postlist_end)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::postlist_end(THIS, term)");
    {
	string	term;
	Database *	THIS;
	PostingIterator *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		term = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::postlist_end() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 166 "XS/Database.xs"
        RETVAL = new PostingIterator();
	try {
	    *RETVAL = THIS->postlist_end(term);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6174 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::PostingIterator", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_get_doccount)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::get_doccount(THIS)");
    {
	Database *	THIS;
	doccount	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::get_doccount() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 179 "XS/Database.xs"
	try {
            RETVAL = THIS->get_doccount();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6205 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_get_lastdocid)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::get_lastdocid(THIS)");
    {
	Database *	THIS;
	docid	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::get_lastdocid() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 191 "XS/Database.xs"
	try {
            RETVAL = THIS->get_lastdocid();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6235 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_get_avlength)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::get_avlength(THIS)");
    {
	Database *	THIS;
	doclength	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::get_avlength() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 203 "XS/Database.xs"
	try {
            RETVAL = THIS->get_avlength();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6265 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_get_termfreq)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::get_termfreq(THIS, tname)");
    {
	string	tname;
	Database *	THIS;
	doccount	RETVAL;
	dXSTARG;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::get_termfreq() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 216 "XS/Database.xs"
	try {
            RETVAL = THIS->get_termfreq(tname);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6302 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_term_exists)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::term_exists(THIS, tname)");
    {
	string	tname;
	Database *	THIS;
	bool	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::term_exists() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 229 "XS/Database.xs"
	try {
	    RETVAL = THIS->term_exists(tname);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6338 "Xapian.c"
	ST(0) = boolSV(RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_get_collection_freq)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::get_collection_freq(THIS, tname)");
    {
	string	tname;
	Database *	THIS;
	termcount	RETVAL;
	dXSTARG;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		tname = string(tmp, len);
	};

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::get_collection_freq() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 242 "XS/Database.xs"
	try {
	    RETVAL = THIS->get_collection_freq(tname);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6376 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_get_doclength)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::get_doclength(THIS, did)");
    {
	docid	did = (docid)SvUV(ST(1));
	Database *	THIS;
	doclength	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::get_doclength() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 255 "XS/Database.xs"
	try {
	    RETVAL = THIS->get_doclength(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6407 "Xapian.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_keep_alive)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::keep_alive(THIS)");
    {
	Database *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::keep_alive() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 267 "XS/Database.xs"
	try {
	    THIS->keep_alive();
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6435 "Xapian.c"
    }
    XSRETURN_EMPTY;
}

XS(XS_Search__Xapian__Database_get_document)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::get_document(THIS, did)");
    {
	Database *	THIS;
	Document *	RETVAL;
	docid	did = (docid)SvUV(ST(1));

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::get_document() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;
#line 277 "XS/Database.xs"
        RETVAL = new Document();
	try {
	    *RETVAL = THIS->get_document(did);
        }
        catch (const Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
#line 6465 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), "Search::Xapian::Document", (void*)RETVAL );
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Database_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Database::DESTROY(THIS)");
    {
	Database *	THIS;

	if( sv_isobject(ST(0)) && sv_derived_from(ST(0), "Search::Xapian::Database") )
		THIS = (Database *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Database::DESTROY() -- THIS is not a \"Search::Xapian::Database\" object" );
		XSRETURN_UNDEF;
	}
       ;

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/Stem.xs' from 'XS/Database.xs' */

XS(XS_Search__Xapian__Stem_new)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Stem::new(CLASS, language)");
    {
	string	language;
	char *	CLASS = (char *)SvPV(ST(0),PL_na);
	Stem *	RETVAL;

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		language = string(tmp, len);
	};
#line 9 "XS/Stem.xs"
        RETVAL = new Stem(language);
#line 6513 "Xapian.c"
	ST(0) = sv_newmortal();
	sv_setref_pv( ST(0), CLASS, (void*)RETVAL );

    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Stem_stem_word)
{
    dXSARGS;
    if (items != 2)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Stem::stem_word(THIS, word)");
    {
	Stem *	THIS;
	string	RETVAL;
	dXSTARG;
	string	word;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Stem *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Stem::stem_word() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};

	{
		STRLEN len;
		const char * tmp = SvPV(ST(1), len);
		word = string(tmp, len);
	};

	RETVAL = THIS->stem_word(word);
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Stem_get_description)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Stem::get_description(THIS)");
    {
	Stem *	THIS;
	string	RETVAL;
	dXSTARG;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Stem *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Stem::get_description() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};

	RETVAL = THIS->get_description();
	XSprePUSH; PUSHp((char *) (RETVAL.data()), (RETVAL.size()));
    }
    XSRETURN(1);
}

XS(XS_Search__Xapian__Stem_DESTROY)
{
    dXSARGS;
    if (items != 1)
	Perl_croak(aTHX_ "Usage: Search::Xapian::Stem::DESTROY(THIS)");
    {
	Stem *	THIS;

	if( sv_isobject(ST(0)) && (SvTYPE(SvRV(ST(0))) == SVt_PVMG) )
		THIS = (Stem *)SvIV((SV*)SvRV( ST(0) ));
	else{
		warn( "Search::Xapian::Stem::DESTROY() -- THIS is not a blessed SV reference" );
		XSRETURN_UNDEF;
	};

	delete THIS;
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'Xapian.xs' from 'XS/Stem.xs' */

#ifdef __cplusplus
extern "C"
#endif
XS(boot_Search__Xapian)
{
    dXSARGS;
    char* file = __FILE__;

    XS_VERSION_BOOTCHECK ;

        newXSproto("Search::Xapian::BoolWeight::new", XS_Search__Xapian__BoolWeight_new, file, "$");
        newXSproto("Search::Xapian::BoolWeight::DESTROY", XS_Search__Xapian__BoolWeight_DESTROY, file, "$");
        newXSproto("Search::Xapian::BM25Weight::new", XS_Search__Xapian__BM25Weight_new, file, "$");
        newXSproto("Search::Xapian::BM25Weight::DESTROY", XS_Search__Xapian__BM25Weight_DESTROY, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::new1", XS_Search__Xapian__WritableDatabase_new1, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::new2", XS_Search__Xapian__WritableDatabase_new2, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::new3", XS_Search__Xapian__WritableDatabase_new3, file, "");
        newXSproto("Search::Xapian::WritableDatabase::flush", XS_Search__Xapian__WritableDatabase_flush, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::begin_transaction", XS_Search__Xapian__WritableDatabase_begin_transaction, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::commit_transaction", XS_Search__Xapian__WritableDatabase_commit_transaction, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::cancel_transaction", XS_Search__Xapian__WritableDatabase_cancel_transaction, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::add_document", XS_Search__Xapian__WritableDatabase_add_document, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::delete_document", XS_Search__Xapian__WritableDatabase_delete_document, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::delete_document_by_term", XS_Search__Xapian__WritableDatabase_delete_document_by_term, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::replace_document", XS_Search__Xapian__WritableDatabase_replace_document, file, "$$$");
        newXSproto("Search::Xapian::WritableDatabase::replace_document_by_term", XS_Search__Xapian__WritableDatabase_replace_document_by_term, file, "$$$");
        newXSproto("Search::Xapian::WritableDatabase::reopen", XS_Search__Xapian__WritableDatabase_reopen, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::get_description", XS_Search__Xapian__WritableDatabase_get_description, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::termlist_begin", XS_Search__Xapian__WritableDatabase_termlist_begin, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::termlist_end", XS_Search__Xapian__WritableDatabase_termlist_end, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::positionlist_begin", XS_Search__Xapian__WritableDatabase_positionlist_begin, file, "$$$");
        newXSproto("Search::Xapian::WritableDatabase::positionlist_end", XS_Search__Xapian__WritableDatabase_positionlist_end, file, "$$$");
        newXSproto("Search::Xapian::WritableDatabase::allterms_begin", XS_Search__Xapian__WritableDatabase_allterms_begin, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::allterms_end", XS_Search__Xapian__WritableDatabase_allterms_end, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::postlist_begin", XS_Search__Xapian__WritableDatabase_postlist_begin, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::postlist_end", XS_Search__Xapian__WritableDatabase_postlist_end, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::get_doccount", XS_Search__Xapian__WritableDatabase_get_doccount, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::get_lastdocid", XS_Search__Xapian__WritableDatabase_get_lastdocid, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::get_avlength", XS_Search__Xapian__WritableDatabase_get_avlength, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::get_termfreq", XS_Search__Xapian__WritableDatabase_get_termfreq, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::term_exists", XS_Search__Xapian__WritableDatabase_term_exists, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::get_collection_freq", XS_Search__Xapian__WritableDatabase_get_collection_freq, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::get_doclength", XS_Search__Xapian__WritableDatabase_get_doclength, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::keep_alive", XS_Search__Xapian__WritableDatabase_keep_alive, file, "$");
        newXSproto("Search::Xapian::WritableDatabase::get_document", XS_Search__Xapian__WritableDatabase_get_document, file, "$$");
        newXSproto("Search::Xapian::WritableDatabase::DESTROY", XS_Search__Xapian__WritableDatabase_DESTROY, file, "$");
        newXSproto("Search::Xapian::ValueIterator::new1", XS_Search__Xapian__ValueIterator_new1, file, "");
        newXSproto("Search::Xapian::ValueIterator::new2", XS_Search__Xapian__ValueIterator_new2, file, "$");
        newXSproto("Search::Xapian::ValueIterator::DESTROY", XS_Search__Xapian__ValueIterator_DESTROY, file, "$");
        newXSproto("Search::Xapian::ValueIterator::inc", XS_Search__Xapian__ValueIterator_inc, file, "$");
        newXSproto("Search::Xapian::ValueIterator::equal", XS_Search__Xapian__ValueIterator_equal, file, "$$");
        newXSproto("Search::Xapian::ValueIterator::nequal", XS_Search__Xapian__ValueIterator_nequal, file, "$$");
        newXSproto("Search::Xapian::ValueIterator::get_value", XS_Search__Xapian__ValueIterator_get_value, file, "$");
        newXSproto("Search::Xapian::ValueIterator::get_valueno", XS_Search__Xapian__ValueIterator_get_valueno, file, "$");
        newXSproto("Search::Xapian::ValueIterator::get_description", XS_Search__Xapian__ValueIterator_get_description, file, "$");
        newXSproto("Search::Xapian::PositionIterator::new1", XS_Search__Xapian__PositionIterator_new1, file, "");
        newXSproto("Search::Xapian::PositionIterator::new2", XS_Search__Xapian__PositionIterator_new2, file, "$");
        newXSproto("Search::Xapian::PositionIterator::DESTROY", XS_Search__Xapian__PositionIterator_DESTROY, file, "$");
        newXSproto("Search::Xapian::PositionIterator::inc", XS_Search__Xapian__PositionIterator_inc, file, "$");
        newXSproto("Search::Xapian::PositionIterator::equal", XS_Search__Xapian__PositionIterator_equal, file, "$$");
        newXSproto("Search::Xapian::PositionIterator::nequal", XS_Search__Xapian__PositionIterator_nequal, file, "$$");
        newXSproto("Search::Xapian::PositionIterator::get_termpos", XS_Search__Xapian__PositionIterator_get_termpos, file, "$");
        newXSproto("Search::Xapian::PositionIterator::skip_to", XS_Search__Xapian__PositionIterator_skip_to, file, "$$");
        newXSproto("Search::Xapian::PositionIterator::get_description", XS_Search__Xapian__PositionIterator_get_description, file, "$");
        newXSproto("Search::Xapian::PostingIterator::new1", XS_Search__Xapian__PostingIterator_new1, file, "");
        newXSproto("Search::Xapian::PostingIterator::new2", XS_Search__Xapian__PostingIterator_new2, file, "$");
        newXSproto("Search::Xapian::PostingIterator::DESTROY", XS_Search__Xapian__PostingIterator_DESTROY, file, "$");
        newXSproto("Search::Xapian::PostingIterator::inc", XS_Search__Xapian__PostingIterator_inc, file, "$");
        newXSproto("Search::Xapian::PostingIterator::equal", XS_Search__Xapian__PostingIterator_equal, file, "$$");
        newXSproto("Search::Xapian::PostingIterator::nequal", XS_Search__Xapian__PostingIterator_nequal, file, "$$");
        newXSproto("Search::Xapian::PostingIterator::get_docid", XS_Search__Xapian__PostingIterator_get_docid, file, "$");
        newXSproto("Search::Xapian::PostingIterator::get_doclength", XS_Search__Xapian__PostingIterator_get_doclength, file, "$");
        newXSproto("Search::Xapian::PostingIterator::get_wdf", XS_Search__Xapian__PostingIterator_get_wdf, file, "$");
        newXSproto("Search::Xapian::PostingIterator::get_description", XS_Search__Xapian__PostingIterator_get_description, file, "$");
        newXSproto("Search::Xapian::PostingIterator::positionlist_begin", XS_Search__Xapian__PostingIterator_positionlist_begin, file, "$");
        newXSproto("Search::Xapian::PostingIterator::positionlist_end", XS_Search__Xapian__PostingIterator_positionlist_end, file, "$");
        newXSproto("Search::Xapian::PostingIterator::skip_to", XS_Search__Xapian__PostingIterator_skip_to, file, "$$");
        newXSproto("Search::Xapian::TermIterator::new1", XS_Search__Xapian__TermIterator_new1, file, "");
        newXSproto("Search::Xapian::TermIterator::new2", XS_Search__Xapian__TermIterator_new2, file, "$");
        newXSproto("Search::Xapian::TermIterator::DESTROY", XS_Search__Xapian__TermIterator_DESTROY, file, "$");
        newXSproto("Search::Xapian::TermIterator::inc", XS_Search__Xapian__TermIterator_inc, file, "$");
        newXSproto("Search::Xapian::TermIterator::equal", XS_Search__Xapian__TermIterator_equal, file, "$$");
        newXSproto("Search::Xapian::TermIterator::nequal", XS_Search__Xapian__TermIterator_nequal, file, "$$");
        newXSproto("Search::Xapian::TermIterator::get_termname", XS_Search__Xapian__TermIterator_get_termname, file, "$");
        newXSproto("Search::Xapian::TermIterator::skip_to", XS_Search__Xapian__TermIterator_skip_to, file, "$$");
        newXSproto("Search::Xapian::TermIterator::get_wdf", XS_Search__Xapian__TermIterator_get_wdf, file, "$");
        newXSproto("Search::Xapian::TermIterator::get_termfreq", XS_Search__Xapian__TermIterator_get_termfreq, file, "$");
        newXSproto("Search::Xapian::TermIterator::positionlist_begin", XS_Search__Xapian__TermIterator_positionlist_begin, file, "$");
        newXSproto("Search::Xapian::TermIterator::positionlist_end", XS_Search__Xapian__TermIterator_positionlist_end, file, "$");
        newXSproto("Search::Xapian::TermIterator::get_description", XS_Search__Xapian__TermIterator_get_description, file, "$");
        newXSproto("Search::Xapian::SimpleStopper::new1", XS_Search__Xapian__SimpleStopper_new1, file, "");
        newXSproto("Search::Xapian::SimpleStopper::new2", XS_Search__Xapian__SimpleStopper_new2, file, ";@");
        newXSproto("Search::Xapian::SimpleStopper::new", XS_Search__Xapian__SimpleStopper_new, file, "$");
        newXSproto("Search::Xapian::SimpleStopper::stopword", XS_Search__Xapian__SimpleStopper_stopword, file, "$$");
        newXSproto("Search::Xapian::SimpleStopper::add", XS_Search__Xapian__SimpleStopper_add, file, "$$");
        newXSproto("Search::Xapian::SimpleStopper::DESTROY", XS_Search__Xapian__SimpleStopper_DESTROY, file, "$");
        newXSproto("Search::Xapian::QueryParser::new0", XS_Search__Xapian__QueryParser_new0, file, "");
        newXSproto("Search::Xapian::QueryParser::set_stemming_options", XS_Search__Xapian__QueryParser_set_stemming_options, file, "$$;$");
        newXSproto("Search::Xapian::QueryParser::set_default_op", XS_Search__Xapian__QueryParser_set_default_op, file, "$$");
        newXSproto("Search::Xapian::QueryParser::set_database", XS_Search__Xapian__QueryParser_set_database, file, "$$");
        newXSproto("Search::Xapian::QueryParser::parse_query", XS_Search__Xapian__QueryParser_parse_query, file, "$$;$");
        newXSproto("Search::Xapian::QueryParser::add_prefix", XS_Search__Xapian__QueryParser_add_prefix, file, "$$$");
        newXSproto("Search::Xapian::QueryParser::add_boolean_prefix", XS_Search__Xapian__QueryParser_add_boolean_prefix, file, "$$$");
        newXSproto("Search::Xapian::QueryParser::DESTROY", XS_Search__Xapian__QueryParser_DESTROY, file, "$");
        newXSproto("Search::Xapian::Query::new1", XS_Search__Xapian__Query_new1, file, "$");
        newXSproto("Search::Xapian::Query::new2sv", XS_Search__Xapian__Query_new2sv, file, "$$");
        newXSproto("Search::Xapian::Query::new2obj", XS_Search__Xapian__Query_new2obj, file, "$$");
        newXSproto("Search::Xapian::Query::newXsv", XS_Search__Xapian__Query_newXsv, file, "$;@");
        newXSproto("Search::Xapian::Query::newXobj", XS_Search__Xapian__Query_newXobj, file, "$;@");
        newXSproto("Search::Xapian::Query::get_length", XS_Search__Xapian__Query_get_length, file, "$");
        newXSproto("Search::Xapian::Query::get_terms_begin", XS_Search__Xapian__Query_get_terms_begin, file, "$");
        newXSproto("Search::Xapian::Query::get_terms_end", XS_Search__Xapian__Query_get_terms_end, file, "$");
        newXSproto("Search::Xapian::Query::empty", XS_Search__Xapian__Query_empty, file, "$");
        newXSproto("Search::Xapian::Query::is_empty", XS_Search__Xapian__Query_is_empty, file, "$");
        newXSproto("Search::Xapian::Query::get_description", XS_Search__Xapian__Query_get_description, file, "$");
        newXSproto("Search::Xapian::Query::DESTROY", XS_Search__Xapian__Query_DESTROY, file, "$");
        newXSproto("Search::Xapian::RSet::new1", XS_Search__Xapian__RSet_new1, file, "");
        newXSproto("Search::Xapian::RSet::new2", XS_Search__Xapian__RSet_new2, file, "$");
        newXSproto("Search::Xapian::RSet::size", XS_Search__Xapian__RSet_size, file, "$");
        newXSproto("Search::Xapian::RSet::empty", XS_Search__Xapian__RSet_empty, file, "$");
        newXSproto("Search::Xapian::RSet::add_document1", XS_Search__Xapian__RSet_add_document1, file, "$$");
        newXSproto("Search::Xapian::RSet::add_document2", XS_Search__Xapian__RSet_add_document2, file, "$$");
        newXSproto("Search::Xapian::RSet::remove_document1", XS_Search__Xapian__RSet_remove_document1, file, "$$");
        newXSproto("Search::Xapian::RSet::remove_document2", XS_Search__Xapian__RSet_remove_document2, file, "$$");
        newXSproto("Search::Xapian::RSet::contains1", XS_Search__Xapian__RSet_contains1, file, "$$");
        newXSproto("Search::Xapian::RSet::contains2", XS_Search__Xapian__RSet_contains2, file, "$$");
        newXSproto("Search::Xapian::RSet::get_description", XS_Search__Xapian__RSet_get_description, file, "$");
        newXSproto("Search::Xapian::RSet::DESTROY", XS_Search__Xapian__RSet_DESTROY, file, "$");
        newXSproto("Search::Xapian::ESetIterator::new1", XS_Search__Xapian__ESetIterator_new1, file, "");
        newXSproto("Search::Xapian::ESetIterator::new2", XS_Search__Xapian__ESetIterator_new2, file, "$");
        newXSproto("Search::Xapian::ESetIterator::inc", XS_Search__Xapian__ESetIterator_inc, file, "$");
        newXSproto("Search::Xapian::ESetIterator::dec", XS_Search__Xapian__ESetIterator_dec, file, "$");
        newXSproto("Search::Xapian::ESetIterator::equal", XS_Search__Xapian__ESetIterator_equal, file, "$$");
        newXSproto("Search::Xapian::ESetIterator::nequal", XS_Search__Xapian__ESetIterator_nequal, file, "$$");
        newXSproto("Search::Xapian::ESetIterator::get_termname", XS_Search__Xapian__ESetIterator_get_termname, file, "$");
        newXSproto("Search::Xapian::ESetIterator::get_weight", XS_Search__Xapian__ESetIterator_get_weight, file, "$");
        newXSproto("Search::Xapian::ESetIterator::get_description", XS_Search__Xapian__ESetIterator_get_description, file, "$");
        newXSproto("Search::Xapian::ESetIterator::DESTROY", XS_Search__Xapian__ESetIterator_DESTROY, file, "$");
        newXSproto("Search::Xapian::ESet::new1", XS_Search__Xapian__ESet_new1, file, "");
        newXSproto("Search::Xapian::ESet::new2", XS_Search__Xapian__ESet_new2, file, "$");
        newXSproto("Search::Xapian::ESet::get_ebound", XS_Search__Xapian__ESet_get_ebound, file, "$");
        newXSproto("Search::Xapian::ESet::size", XS_Search__Xapian__ESet_size, file, "$");
        newXSproto("Search::Xapian::ESet::empty", XS_Search__Xapian__ESet_empty, file, "$");
        newXSproto("Search::Xapian::ESet::begin", XS_Search__Xapian__ESet_begin, file, "$");
        newXSproto("Search::Xapian::ESet::end", XS_Search__Xapian__ESet_end, file, "$");
        newXSproto("Search::Xapian::ESet::back", XS_Search__Xapian__ESet_back, file, "$");
        newXSproto("Search::Xapian::ESet::get_description", XS_Search__Xapian__ESet_get_description, file, "$");
        newXSproto("Search::Xapian::ESet::DESTROY", XS_Search__Xapian__ESet_DESTROY, file, "$");
        newXSproto("Search::Xapian::MSetIterator::new1", XS_Search__Xapian__MSetIterator_new1, file, "");
        newXSproto("Search::Xapian::MSetIterator::new2", XS_Search__Xapian__MSetIterator_new2, file, "$");
        newXSproto("Search::Xapian::MSetIterator::inc", XS_Search__Xapian__MSetIterator_inc, file, "$");
        newXSproto("Search::Xapian::MSetIterator::dec", XS_Search__Xapian__MSetIterator_dec, file, "$");
        newXSproto("Search::Xapian::MSetIterator::equal", XS_Search__Xapian__MSetIterator_equal, file, "$$");
        newXSproto("Search::Xapian::MSetIterator::nequal", XS_Search__Xapian__MSetIterator_nequal, file, "$$");
        newXSproto("Search::Xapian::MSetIterator::get_docid", XS_Search__Xapian__MSetIterator_get_docid, file, "$");
        newXSproto("Search::Xapian::MSetIterator::get_document", XS_Search__Xapian__MSetIterator_get_document, file, "$");
        newXSproto("Search::Xapian::MSetIterator::get_rank", XS_Search__Xapian__MSetIterator_get_rank, file, "$");
        newXSproto("Search::Xapian::MSetIterator::get_weight", XS_Search__Xapian__MSetIterator_get_weight, file, "$");
        newXSproto("Search::Xapian::MSetIterator::get_collapse_count", XS_Search__Xapian__MSetIterator_get_collapse_count, file, "$");
        newXSproto("Search::Xapian::MSetIterator::get_percent", XS_Search__Xapian__MSetIterator_get_percent, file, "$");
        newXSproto("Search::Xapian::MSetIterator::get_description", XS_Search__Xapian__MSetIterator_get_description, file, "$");
        newXSproto("Search::Xapian::MSetIterator::DESTROY", XS_Search__Xapian__MSetIterator_DESTROY, file, "$");
        newXSproto("Search::Xapian::MSet::new1", XS_Search__Xapian__MSet_new1, file, "");
        newXSproto("Search::Xapian::MSet::new2", XS_Search__Xapian__MSet_new2, file, "$");
        newXSproto("Search::Xapian::MSet::fetch1", XS_Search__Xapian__MSet_fetch1, file, "$$$");
        newXSproto("Search::Xapian::MSet::fetch2", XS_Search__Xapian__MSet_fetch2, file, "$$");
        newXSproto("Search::Xapian::MSet::fetch3", XS_Search__Xapian__MSet_fetch3, file, "$");
        newXSproto("Search::Xapian::MSet::convert_to_percent1", XS_Search__Xapian__MSet_convert_to_percent1, file, "$$");
        newXSproto("Search::Xapian::MSet::convert_to_percent2", XS_Search__Xapian__MSet_convert_to_percent2, file, "$$");
        newXSproto("Search::Xapian::MSet::get_termfreq", XS_Search__Xapian__MSet_get_termfreq, file, "$$");
        newXSproto("Search::Xapian::MSet::get_termweight", XS_Search__Xapian__MSet_get_termweight, file, "$$");
        newXSproto("Search::Xapian::MSet::get_firstitem", XS_Search__Xapian__MSet_get_firstitem, file, "$");
        newXSproto("Search::Xapian::MSet::get_matches_lower_bound", XS_Search__Xapian__MSet_get_matches_lower_bound, file, "$");
        newXSproto("Search::Xapian::MSet::get_matches_estimated", XS_Search__Xapian__MSet_get_matches_estimated, file, "$");
        newXSproto("Search::Xapian::MSet::get_matches_upper_bound", XS_Search__Xapian__MSet_get_matches_upper_bound, file, "$");
        newXSproto("Search::Xapian::MSet::get_max_possible", XS_Search__Xapian__MSet_get_max_possible, file, "$");
        newXSproto("Search::Xapian::MSet::get_max_attained", XS_Search__Xapian__MSet_get_max_attained, file, "$");
        newXSproto("Search::Xapian::MSet::size", XS_Search__Xapian__MSet_size, file, "$");
        newXSproto("Search::Xapian::MSet::max_size", XS_Search__Xapian__MSet_max_size, file, "$");
        newXSproto("Search::Xapian::MSet::empty", XS_Search__Xapian__MSet_empty, file, "$");
        newXSproto("Search::Xapian::MSet::swap", XS_Search__Xapian__MSet_swap, file, "$$");
        newXSproto("Search::Xapian::MSet::begin", XS_Search__Xapian__MSet_begin, file, "$");
        newXSproto("Search::Xapian::MSet::end", XS_Search__Xapian__MSet_end, file, "$");
        newXSproto("Search::Xapian::MSet::back", XS_Search__Xapian__MSet_back, file, "$");
        newXSproto("Search::Xapian::MSet::get_msetiterator", XS_Search__Xapian__MSet_get_msetiterator, file, "$$");
        newXSproto("Search::Xapian::MSet::get_description", XS_Search__Xapian__MSet_get_description, file, "$");
        newXSproto("Search::Xapian::MSet::DESTROY", XS_Search__Xapian__MSet_DESTROY, file, "$");
        newXSproto("Search::Xapian::Enquire::new", XS_Search__Xapian__Enquire_new, file, "$$");
        newXSproto("Search::Xapian::Enquire::set_query_object", XS_Search__Xapian__Enquire_set_query_object, file, "$$");
        newXSproto("Search::Xapian::Enquire::get_query", XS_Search__Xapian__Enquire_get_query, file, "$");
        newXSproto("Search::Xapian::Enquire::set_collapse_key", XS_Search__Xapian__Enquire_set_collapse_key, file, "$$");
        newXSproto("Search::Xapian::Enquire::set_sort_forward", XS_Search__Xapian__Enquire_set_sort_forward, file, "$$");
        newXSproto("Search::Xapian::Enquire::set_cutoff", XS_Search__Xapian__Enquire_set_cutoff, file, "$$;$");
        newXSproto("Search::Xapian::Enquire::set_sorting", XS_Search__Xapian__Enquire_set_sorting, file, "$$$;$");
        newXSproto("Search::Xapian::Enquire::set_bias", XS_Search__Xapian__Enquire_set_bias, file, "$$$");
        newXSproto("Search::Xapian::Enquire::get_mset", XS_Search__Xapian__Enquire_get_mset, file, "$$$");
        newXSproto("Search::Xapian::Enquire::get_eset", XS_Search__Xapian__Enquire_get_eset, file, "$$$");
        newXSproto("Search::Xapian::Enquire::get_matching_terms_begin1", XS_Search__Xapian__Enquire_get_matching_terms_begin1, file, "$$");
        newXSproto("Search::Xapian::Enquire::get_matching_terms_begin2", XS_Search__Xapian__Enquire_get_matching_terms_begin2, file, "$$");
        newXSproto("Search::Xapian::Enquire::get_matching_terms_end1", XS_Search__Xapian__Enquire_get_matching_terms_end1, file, "$$");
        newXSproto("Search::Xapian::Enquire::get_matching_terms_end2", XS_Search__Xapian__Enquire_get_matching_terms_end2, file, "$$");
        newXSproto("Search::Xapian::Enquire::register_match_decoder", XS_Search__Xapian__Enquire_register_match_decoder, file, "$$$");
        newXSproto("Search::Xapian::Enquire::set_docid_order", XS_Search__Xapian__Enquire_set_docid_order, file, "$$");
        newXSproto("Search::Xapian::Enquire::set_weighting_scheme", XS_Search__Xapian__Enquire_set_weighting_scheme, file, "$$");
        newXSproto("Search::Xapian::Enquire::get_description", XS_Search__Xapian__Enquire_get_description, file, "$");
        newXSproto("Search::Xapian::Enquire::DESTROY", XS_Search__Xapian__Enquire_DESTROY, file, "$");
        newXSproto("Search::Xapian::Document::new1", XS_Search__Xapian__Document_new1, file, "");
        newXSproto("Search::Xapian::Document::new2", XS_Search__Xapian__Document_new2, file, "$");
        newXSproto("Search::Xapian::Document::get_value", XS_Search__Xapian__Document_get_value, file, "$$");
        newXSproto("Search::Xapian::Document::add_value", XS_Search__Xapian__Document_add_value, file, "$$$");
        newXSproto("Search::Xapian::Document::remove_value", XS_Search__Xapian__Document_remove_value, file, "$$");
        newXSproto("Search::Xapian::Document::clear_values", XS_Search__Xapian__Document_clear_values, file, "$");
        newXSproto("Search::Xapian::Document::get_data", XS_Search__Xapian__Document_get_data, file, "$");
        newXSproto("Search::Xapian::Document::set_data", XS_Search__Xapian__Document_set_data, file, "$$");
        newXSproto("Search::Xapian::Document::add_posting", XS_Search__Xapian__Document_add_posting, file, "$$$;$");
        newXSproto("Search::Xapian::Document::add_term", XS_Search__Xapian__Document_add_term, file, "$$;$");
        newXSproto("Search::Xapian::Document::remove_posting", XS_Search__Xapian__Document_remove_posting, file, "$$$;$");
        newXSproto("Search::Xapian::Document::remove_term", XS_Search__Xapian__Document_remove_term, file, "$$");
        newXSproto("Search::Xapian::Document::clear_terms", XS_Search__Xapian__Document_clear_terms, file, "$");
        newXSproto("Search::Xapian::Document::termlist_count", XS_Search__Xapian__Document_termlist_count, file, "$");
        newXSproto("Search::Xapian::Document::termlist_begin", XS_Search__Xapian__Document_termlist_begin, file, "$");
        newXSproto("Search::Xapian::Document::termlist_end", XS_Search__Xapian__Document_termlist_end, file, "$");
        newXSproto("Search::Xapian::Document::values_count", XS_Search__Xapian__Document_values_count, file, "$");
        newXSproto("Search::Xapian::Document::values_begin", XS_Search__Xapian__Document_values_begin, file, "$");
        newXSproto("Search::Xapian::Document::values_end", XS_Search__Xapian__Document_values_end, file, "$");
        newXSproto("Search::Xapian::Document::get_description", XS_Search__Xapian__Document_get_description, file, "$");
        newXSproto("Search::Xapian::Document::DESTROY", XS_Search__Xapian__Document_DESTROY, file, "$");
        newXSproto("Search::Xapian::Database::new1", XS_Search__Xapian__Database_new1, file, "$");
        newXSproto("Search::Xapian::Database::new2", XS_Search__Xapian__Database_new2, file, "$");
        newXSproto("Search::Xapian::Database::add_database", XS_Search__Xapian__Database_add_database, file, "$$");
        newXSproto("Search::Xapian::Database::reopen", XS_Search__Xapian__Database_reopen, file, "$");
        newXSproto("Search::Xapian::Database::get_description", XS_Search__Xapian__Database_get_description, file, "$");
        newXSproto("Search::Xapian::Database::termlist_begin", XS_Search__Xapian__Database_termlist_begin, file, "$$");
        newXSproto("Search::Xapian::Database::termlist_end", XS_Search__Xapian__Database_termlist_end, file, "$$");
        newXSproto("Search::Xapian::Database::positionlist_begin", XS_Search__Xapian__Database_positionlist_begin, file, "$$$");
        newXSproto("Search::Xapian::Database::positionlist_end", XS_Search__Xapian__Database_positionlist_end, file, "$$$");
        newXSproto("Search::Xapian::Database::allterms_begin", XS_Search__Xapian__Database_allterms_begin, file, "$");
        newXSproto("Search::Xapian::Database::allterms_end", XS_Search__Xapian__Database_allterms_end, file, "$");
        newXSproto("Search::Xapian::Database::postlist_begin", XS_Search__Xapian__Database_postlist_begin, file, "$$");
        newXSproto("Search::Xapian::Database::postlist_end", XS_Search__Xapian__Database_postlist_end, file, "$$");
        newXSproto("Search::Xapian::Database::get_doccount", XS_Search__Xapian__Database_get_doccount, file, "$");
        newXSproto("Search::Xapian::Database::get_lastdocid", XS_Search__Xapian__Database_get_lastdocid, file, "$");
        newXSproto("Search::Xapian::Database::get_avlength", XS_Search__Xapian__Database_get_avlength, file, "$");
        newXSproto("Search::Xapian::Database::get_termfreq", XS_Search__Xapian__Database_get_termfreq, file, "$$");
        newXSproto("Search::Xapian::Database::term_exists", XS_Search__Xapian__Database_term_exists, file, "$$");
        newXSproto("Search::Xapian::Database::get_collection_freq", XS_Search__Xapian__Database_get_collection_freq, file, "$$");
        newXSproto("Search::Xapian::Database::get_doclength", XS_Search__Xapian__Database_get_doclength, file, "$$");
        newXSproto("Search::Xapian::Database::keep_alive", XS_Search__Xapian__Database_keep_alive, file, "$");
        newXSproto("Search::Xapian::Database::get_document", XS_Search__Xapian__Database_get_document, file, "$$");
        newXSproto("Search::Xapian::Database::DESTROY", XS_Search__Xapian__Database_DESTROY, file, "$");
        newXSproto("Search::Xapian::Stem::new", XS_Search__Xapian__Stem_new, file, "$$");
        newXSproto("Search::Xapian::Stem::stem_word", XS_Search__Xapian__Stem_stem_word, file, "$$");
        newXSproto("Search::Xapian::Stem::get_description", XS_Search__Xapian__Stem_get_description, file, "$");
        newXSproto("Search::Xapian::Stem::DESTROY", XS_Search__Xapian__Stem_DESTROY, file, "$");

    /* Initialisation Section */

#line 48 "Xapian.xs"
    { HV *mHvStash = gv_stashpv( "Search::Xapian", TRUE );

        newCONSTSUB( mHvStash, "OP_AND", newSViv(Query::OP_AND) );
        newCONSTSUB( mHvStash, "OP_OR", newSViv(Query::OP_OR) );
        newCONSTSUB( mHvStash, "OP_AND_NOT", newSViv(Query::OP_AND_NOT) );
        newCONSTSUB( mHvStash, "OP_XOR", newSViv(Query::OP_XOR) );
        newCONSTSUB( mHvStash, "OP_AND_MAYBE", newSViv(Query::OP_AND_MAYBE) );
        newCONSTSUB( mHvStash, "OP_FILTER", newSViv(Query::OP_FILTER) );
        newCONSTSUB( mHvStash, "OP_NEAR", newSViv(Query::OP_NEAR) );
        newCONSTSUB( mHvStash, "OP_PHRASE", newSViv(Query::OP_PHRASE) );
        newCONSTSUB( mHvStash, "OP_ELITE_SET", newSViv(Query::OP_ELITE_SET) );

        newCONSTSUB( mHvStash, "ENQ_DESCENDING", newSViv(Enquire::DESCENDING) );
        newCONSTSUB( mHvStash, "ENQ_ASCENDING", newSViv(Enquire::ASCENDING) );
        newCONSTSUB( mHvStash, "ENQ_DONT_CARE", newSViv(Enquire::DONT_CARE) );

        newCONSTSUB( mHvStash, "DB_OPEN", newSViv(DB_OPEN) );
        newCONSTSUB( mHvStash, "DB_CREATE", newSViv(DB_CREATE) );
        newCONSTSUB( mHvStash, "DB_CREATE_OR_OPEN", newSViv(DB_CREATE_OR_OPEN) );
        newCONSTSUB( mHvStash, "DB_CREATE_OR_OVERWRITE", newSViv(DB_CREATE_OR_OVERWRITE) );
    }

#line 6877 "Xapian.c"

    /* End of Initialisation Section */

    XSRETURN_YES;
}

