/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.5
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

#define SWIGPERL
#define SWIG_CASTRANK_MODE


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif 
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif


/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "4"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  
  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/* 
   Flags/methods for returning states.
   
   The SWIG conversion methods, as ConvertPtr, return an integer 
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).
   
   Use the following macros/flags to set or process the returning
   states.
   
   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }
    
   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {         
        if (<obj is ok>) {			       
          if (<need new object>) {		       
            *ptr = <ptr to new allocated object>; 
            return SWIG_NEWOBJ;		       
          } else {				       
            *ptr = <ptr to old object>;	       
            return SWIG_OLDOBJ;		       
          } 				       
        } else {				       
          return SWIG_BADOBJ;		       
        }					       
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows to return the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call
 
      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0) 
#define SWIG_ERROR                 (-1)
#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)  

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporal objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) { 
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) { 
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; 
}
#else /* no cast-rank mode */
#  define SWIG_AddCast
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/* 
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCompare(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}


/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(iter->type->name, c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/* 
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (iter->type == from) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/* 
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/* 
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;
  
  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }    
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}
  
/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start, 
                            swig_module_info *end, 
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      register size_t l = 0;
      register size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	register size_t i = (l + r) >> 1; 
	const char *iname = iter->types[i]->name;
	if (iname) {
	  register int compare = strcmp(name, iname);
	  if (compare == 0) {	    
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start, 
                     swig_module_info *end, 
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      register size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }
  
  /* neither found a match */
  return 0;
}

/* 
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  register const unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    register unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/* 
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  register unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    register char d = *(c++);
    register unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else 
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    else 
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/* 
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1 
#define  SWIG_IOError        	   -2 
#define  SWIG_RuntimeError   	   -3 
#define  SWIG_IndexError     	   -4 
#define  SWIG_TypeError      	   -5 
#define  SWIG_DivisionByZero 	   -6 
#define  SWIG_OverflowError  	   -7 
#define  SWIG_SyntaxError    	   -8 
#define  SWIG_ValueError     	   -9 
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12 
#define  SWIG_NullReferenceError   -13



#ifdef __cplusplus
/* Needed on some windows machines---since MS plays funny games with the header files under C++ */
#include <math.h>
#include <stdlib.h>
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */

/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
#  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
#    define PERL_PATCHLEVEL_H_IMPLICIT
#    include <patchlevel.h>
#  endif
#  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
#    include <could_not_find_Perl_patchlevel.h>
#  endif
#  ifndef PERL_REVISION
#    define PERL_REVISION       (5)
#    define PERL_VERSION        PATCHLEVEL
#    define PERL_SUBVERSION     SUBVERSION
#  endif
#endif

#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
#endif

#ifndef SvIOK_UV
# define SvIOK_UV(sv)       (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
#endif

#ifndef SvUOK
# define SvUOK(sv)           SvIOK_UV(sv)
#endif

#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
#  define PL_sv_undef               sv_undef
#  define PL_na	                    na
#  define PL_errgv                  errgv
#  define PL_sv_no                  sv_no
#  define PL_sv_yes                 sv_yes
#  define PL_markstack_ptr          markstack_ptr
#endif

#ifndef IVSIZE
#  ifdef LONGSIZE
#    define IVSIZE LONGSIZE
#  else
#    define IVSIZE 4 /* A bold guess, but the best we can make. */
#  endif
#endif

#ifndef INT2PTR
#  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
#    define PTRV                  UV
#    define INT2PTR(any,d)        (any)(d)
#  else
#    if PTRSIZE == LONGSIZE
#      define PTRV                unsigned long
#    else
#      define PTRV                unsigned
#    endif
#    define INT2PTR(any,d)        (any)(PTRV)(d)
#  endif

#  define NUM2PTR(any,d)  (any)(PTRV)(d)
#  define PTR2IV(p)       INT2PTR(IV,p)
#  define PTR2UV(p)       INT2PTR(UV,p)
#  define PTR2NV(p)       NUM2PTR(NV,p)

#  if PTRSIZE == LONGSIZE
#    define PTR2ul(p)     (unsigned long)(p)
#  else
#    define PTR2ul(p)     INT2PTR(unsigned long,p)
#  endif
#endif /* !INT2PTR */

#ifndef SvPV_nolen
# define SvPV_nolen(x) SvPV(x,PL_na)
#endif

#ifndef get_sv
#  define get_sv perl_get_sv
#endif

#ifndef ERRSV
#  define ERRSV get_sv("@",FALSE)
#endif

#ifndef pTHX_
#define pTHX_
#endif   

#include <string.h>
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * error manipulation
 * ----------------------------------------------------------------------------- */

SWIGINTERN const char*
SWIG_Perl_ErrorType(int code) {
  const char* type = 0;
  switch(code) {
  case SWIG_MemoryError:
    type = "MemoryError";
    break;
  case SWIG_IOError:
    type = "IOError";
    break;
  case SWIG_RuntimeError:
    type = "RuntimeError";
    break;
  case SWIG_IndexError:
    type = "IndexError";
    break;
  case SWIG_TypeError:
    type = "TypeError";
    break;
  case SWIG_DivisionByZero:
    type = "ZeroDivisionError";
    break;
  case SWIG_OverflowError:
    type = "OverflowError";
    break;
  case SWIG_SyntaxError:
    type = "SyntaxError";
    break;
  case SWIG_ValueError:
    type = "ValueError";
    break;
  case SWIG_SystemError:
    type = "SystemError";
    break;
  case SWIG_AttributeError:
    type = "AttributeError";
    break;
  default:
    type = "RuntimeError";
  }
  return type;
}




/* -----------------------------------------------------------------------------
 * perlrun.swg
 *
 * This file contains the runtime support for Perl modules
 * and includes code for managing global variables and pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

#ifdef PERL_OBJECT
#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
#define SWIG_PERL_OBJECT_CALL pPerl,
#else
#define SWIG_PERL_OBJECT_DECL
#define SWIG_PERL_OBJECT_CALL
#endif

/* Common SWIG API */

/* for raw pointers */
#define SWIG_ConvertPtr(obj, pp, type, flags)           SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
#define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
#define SWIG_NewPointerObj(p, type, flags)              SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)

/* for raw packed data */
#define SWIG_ConvertPacked(obj, p, s, type)             SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
#define SWIG_NewPackedObj(p, s, type)	                SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)

/* for C or C++ function pointers */
#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_ConvertPtr(obj, pptr, type, 0)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)

/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_NewPackedObj(ptr, sz, type)


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Perl_GetModule()
#define SWIG_SetModule(clientdata, pointer)             SWIG_Perl_SetModule(pointer)


/* Error manipulation */

#define SWIG_ErrorType(code)                            SWIG_Perl_ErrorType(code)               
#define SWIG_Error(code, msg)            		sv_setpvf(GvSV(PL_errgv),"%s %s\n", SWIG_ErrorType(code), msg)
#define SWIG_fail                        		goto fail						    

/* Perl-specific SWIG API */

#define SWIG_MakePtr(sv, ptr, type, flags)              SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
#define SWIG_MakePackedObj(sv, p, s, type)	        SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
#define SWIG_SetError(str)                              SWIG_Error(SWIG_RuntimeError, str)


#define SWIG_PERL_DECL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_DECL arg1)
#define SWIG_PERL_CALL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_CALL arg1)
#define SWIG_PERL_DECL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_DECL arg1, arg2)
#define SWIG_PERL_CALL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_CALL arg1, arg2)

/* -----------------------------------------------------------------------------
 * pointers/data manipulation
 * ----------------------------------------------------------------------------- */

/* For backward compatibility only */
#define SWIG_POINTER_EXCEPTION  0

#ifdef __cplusplus
extern "C" {
#endif

#define SWIG_OWNER   SWIG_POINTER_OWN
#define SWIG_SHADOW  SWIG_OWNER << 1

#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL

/* SWIG Perl macros */

/* Macro to declare an XS function */
#ifndef XSPROTO
#   define XSPROTO(name) void name(pTHX_ CV* cv)
#endif

/* Macro to call an XS function */
#ifdef PERL_OBJECT 
#  define SWIG_CALLXS(_name) _name(cv,pPerl) 
#else 
#  ifndef MULTIPLICITY 
#    define SWIG_CALLXS(_name) _name(cv) 
#  else 
#    define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) 
#  endif 
#endif 

#ifdef PERL_OBJECT
#define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;

#ifdef __cplusplus
extern "C" {
#endif
typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
#define SWIGCLASS_STATIC

#else /* PERL_OBJECT */

#define MAGIC_PPERL
#define SWIGCLASS_STATIC static SWIGUNUSED

#ifndef MULTIPLICITY
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)

#ifdef __cplusplus
extern "C" {
#endif
typedef int (*SwigMagicFunc)(SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#else /* MULTIPLICITY */

#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)

#ifdef __cplusplus
extern "C" {
#endif
typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#endif /* MULTIPLICITY */
#endif /* PERL_OBJECT */

/* Workaround for bug in perl 5.6.x croak and earlier */
#if (PERL_VERSION < 8)
#  ifdef PERL_OBJECT
#    define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
static void SWIG_Perl_croak_null(CPerlObj *pPerl)
#  else
static void SWIG_croak_null()
#  endif
{
  SV *err=ERRSV;
#  if (PERL_VERSION < 6)
  croak("%_", err);
#  else
  if (SvOK(err) && !SvROK(err)) croak("%_", err);
  croak(Nullch);
#  endif
}
#else
#  define SWIG_croak_null() croak(Nullch)
#endif


/* 
   Define how strict is the cast between strings and integers/doubles
   when overloading between these types occurs.
   
   The default is making it as strict as possible by using SWIG_AddCast
   when needed.
   
   You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
   disable the SWIG_AddCast, making the casting between string and
   numbers less strict.

   In the end, we try to solve the overloading between strings and
   numerical types in the more natural way, but if you can avoid it,
   well, avoid it using %rename, for example.
*/
#ifndef SWIG_PERL_NO_STRICT_STR2NUM
# ifndef SWIG_PERL_STRICT_STR2NUM
#  define SWIG_PERL_STRICT_STR2NUM
# endif
#endif
#ifdef SWIG_PERL_STRICT_STR2NUM
/* string takes precedence */
#define SWIG_Str2NumCast(x) SWIG_AddCast(x)  
#else
/* number takes precedence */
#define SWIG_Str2NumCast(x) x
#endif



#include <stdlib.h>

SWIGRUNTIME const char *
SWIG_Perl_TypeProxyName(const swig_type_info *type) {
  if (!type) return NULL;
  if (type->clientdata != NULL) {
    return (const char*) type->clientdata;
  } 
  else {
    return type->name;
  }
}

/* Identical to SWIG_TypeCheck, except for strcmp comparison */
SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if ( (!iter->type->clientdata && (strcmp(iter->type->name, c) == 0)) ||
            (iter->type->clientdata && (strcmp((char*)iter->type->clientdata, c) == 0)) ) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/* Function for getting a pointer value */

SWIGRUNTIME int
SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) {
  swig_cast_info *tc;
  void *voidptr = (void *)0;
  SV *tsv = 0;

  if (own)
    *own = 0;

  /* If magical, apply more magic */
  if (SvGMAGICAL(sv))
    mg_get(sv);

  /* Check to see if this is an object */
  if (sv_isobject(sv)) {
    IV tmp = 0;
    tsv = (SV*) SvRV(sv);
    if ((SvTYPE(tsv) == SVt_PVHV)) {
      MAGIC *mg;
      if (SvMAGICAL(tsv)) {
        mg = mg_find(tsv,'P');
        if (mg) {
          sv = mg->mg_obj;
          if (sv_isobject(sv)) {
	    tsv = (SV*)SvRV(sv);
            tmp = SvIV(tsv);
          }
        }
      } else {
        return SWIG_ERROR;
      }
    } else {
      tmp = SvIV(tsv);
    }
    voidptr = INT2PTR(void *,tmp);
  } else if (! SvOK(sv)) {            /* Check for undef */
    *(ptr) = (void *) 0;
    return SWIG_OK;
  } else if (SvTYPE(sv) == SVt_RV) {  /* Check for NULL pointer */
    if (!SvROK(sv)) {
      /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value.  */
      if (SvIOK(sv)) {
        return SWIG_ERROR;
      } else {
        /* NULL pointer (reference to undef). */
        *(ptr) = (void *) 0;
        return SWIG_OK;
      }
    } else {
      return SWIG_ERROR;
    }
  } else {                            /* Don't know what it is */
    return SWIG_ERROR;
  }
  if (_t) {
    /* Now see if the types match */
    char *_c = HvNAME(SvSTASH(SvRV(sv)));
    tc = SWIG_TypeProxyCheck(_c,_t);
    if (!tc) {
      return SWIG_ERROR;
    }
    {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc,voidptr,&newmemory);
      if (newmemory == SWIG_CAST_NEW_MEMORY) {
        assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
        if (own)
          *own = *own | SWIG_CAST_NEW_MEMORY;
      }
    }
  } else {
    *ptr = voidptr;
  }

  /* 
   *  DISOWN implementation: we need a perl guru to check this one.
   */
  if (tsv && (flags & SWIG_POINTER_DISOWN)) {
    /* 
     *  almost copy paste code from below SWIG_POINTER_OWN setting
     */
    SV *obj = sv;
    HV *stash = SvSTASH(SvRV(obj));
    GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
    if (isGV(gv)) {
      HV *hv = GvHVn(gv);
      /*
       * To set ownership (see below), a newSViv(1) entry is added. 
       * Hence, to remove ownership, we delete the entry.
       */
      if (hv_exists_ent(hv, obj, 0)) {
	hv_delete_ent(hv, obj, 0, 0);
      }
    }
  }
  return SWIG_OK;
}

SWIGRUNTIME int
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
  return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0);
}

SWIGRUNTIME void
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
  if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) {
    SV *self;
    SV *obj=newSV(0);
    HV *hash=newHV();
    HV *stash;
    sv_setref_pv(obj, (char *) SWIG_Perl_TypeProxyName(t), ptr);
    stash=SvSTASH(SvRV(obj));
    if (flags & SWIG_POINTER_OWN) {
      HV *hv;
      GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
      if (!isGV(gv))
        gv_init(gv, stash, "OWNER", 5, FALSE);
      hv=GvHVn(gv);
      hv_store_ent(hv, obj, newSViv(1), 0);
    }
    sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
    SvREFCNT_dec(obj);
    self=newRV_noinc((SV *)hash);
    sv_setsv(sv, self);
    SvREFCNT_dec((SV *)self);
    sv_bless(sv, stash);
  }
  else {
    sv_setref_pv(sv, (char *) SWIG_Perl_TypeProxyName(t), ptr);
  }
}

SWIGRUNTIMEINLINE SV *
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
  SV *result = sv_newmortal();
  SWIG_MakePtr(result, ptr, t, flags);
  return result;
}

SWIGRUNTIME void
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
  char result[1024];
  char *r = result;
  if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  strcpy(r,SWIG_Perl_TypeProxyName(type));
  sv_setpv(sv, result);
}

SWIGRUNTIME SV *
SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
  SV *result = sv_newmortal();
  SWIG_Perl_MakePackedObj(result, ptr, sz, type);
  return result;
}

/* Convert a packed value value */
SWIGRUNTIME int
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
  swig_cast_info *tc;
  const char  *c = 0;

  if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
  c = SvPV_nolen(obj);
  /* Pointer values must start with leading underscore */
  if (*c != '_') return SWIG_ERROR;
  c++;
  c = SWIG_UnpackData(c,ptr,sz);
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) return SWIG_ERROR;
  }
  return SWIG_OK;
}


/* Macros for low-level exception handling */
#define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }


typedef XSPROTO(SwigPerlWrapper);
typedef SwigPerlWrapper *SwigPerlWrapperPtr;

/* Structure for command table */
typedef struct {
  const char         *name;
  SwigPerlWrapperPtr  wrapper;
} swig_command_info;

/* Information for constant table */

#define SWIG_INT     1
#define SWIG_FLOAT   2
#define SWIG_STRING  3
#define SWIG_POINTER 4
#define SWIG_BINARY  5

/* Constant information structure */
typedef struct swig_constant_info {
    int              type;
    const char      *name;
    long             lvalue;
    double           dvalue;
    void            *pvalue;
    swig_type_info **ptype;
} swig_constant_info;


/* Structure for variable table */
typedef struct {
  const char   *name;
  SwigMagicFunc   set;
  SwigMagicFunc   get;
  swig_type_info  **type;
} swig_variable_info;

/* Magic variable code */
#ifndef PERL_OBJECT
#define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
  #ifndef MULTIPLICITY
     SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) 
  #else
     SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) 
  #endif
#else
#  define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) 
#endif
{
  MAGIC *mg;
  sv_magic(sv,sv,'U',(char *) name,strlen(name));
  mg = mg_find(sv,'U');
  mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
  mg->mg_virtual->svt_get = (SwigMagicFunc) get;
  mg->mg_virtual->svt_set = (SwigMagicFunc) set;
  mg->mg_virtual->svt_len = 0;
  mg->mg_virtual->svt_clear = 0;
  mg->mg_virtual->svt_free = 0;
}


SWIGRUNTIME swig_module_info *
SWIG_Perl_GetModule(void) {
  static void *type_pointer = (void *)0;
  SV *pointer;

  /* first check if pointer already created */
  if (!type_pointer) {
    pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
    if (pointer && SvOK(pointer)) {
      type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
    }
  }

  return (swig_module_info *) type_pointer;
}

SWIGRUNTIME void
SWIG_Perl_SetModule(swig_module_info *module) {
  SV *pointer;

  /* create a new pointer */
  pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
  sv_setiv(pointer, PTR2IV(module));
}

#ifdef __cplusplus
}
#endif

/* Workaround perl5 global namespace pollution. Note that undefining library
 * functions like fopen will not solve the problem on all platforms as fopen
 * might be a macro on Windows but not necessarily on other operating systems. */
#ifdef do_open
  #undef do_open
#endif
#ifdef do_close
  #undef do_close
#endif
#ifdef do_exec
  #undef do_exec
#endif
#ifdef scalar
  #undef scalar
#endif
#ifdef list
  #undef list
#endif
#ifdef apply
  #undef apply
#endif
#ifdef convert
  #undef convert
#endif
#ifdef Error
  #undef Error
#endif
#ifdef form
  #undef form
#endif
#ifdef vform
  #undef vform
#endif
#ifdef LABEL
  #undef LABEL
#endif
#ifdef METHOD
  #undef METHOD
#endif
#ifdef Move
  #undef Move
#endif
#ifdef yylex
  #undef yylex
#endif
#ifdef yyparse
  #undef yyparse
#endif
#ifdef yyerror
  #undef yyerror
#endif
#ifdef invert
  #undef invert
#endif
#ifdef ref
  #undef ref
#endif
#ifdef read
  #undef read
#endif
#ifdef write
  #undef write
#endif
#ifdef eof
  #undef eof
#endif
#ifdef bool
  #undef bool
#endif
#ifdef close
  #undef close
#endif
#ifdef rewind
  #undef rewind
#endif
#ifdef free
  #undef free
#endif
#ifdef malloc
  #undef malloc
#endif
#ifdef calloc
  #undef calloc
#endif
#ifdef Stat
  #undef Stat
#endif
#ifdef check
  #undef check
#endif
#ifdef seekdir
  #undef seekdir
#endif
#ifdef open
  #undef open
#endif
#ifdef readdir
  #undef readdir
#endif
#ifdef bind
  #undef bind
#endif
#ifdef access
  #undef access
#endif
#ifdef stat
  #undef stat
#endif



#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 

#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 



  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 


/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_Xapian__AssertionError swig_types[0]
#define SWIGTYPE_p_Xapian__BM25Weight swig_types[1]
#define SWIGTYPE_p_Xapian__BoolWeight swig_types[2]
#define SWIGTYPE_p_Xapian__Compactor swig_types[3]
#define SWIGTYPE_p_Xapian__Database swig_types[4]
#define SWIGTYPE_p_Xapian__DatabaseCorruptError swig_types[5]
#define SWIGTYPE_p_Xapian__DatabaseCreateError swig_types[6]
#define SWIGTYPE_p_Xapian__DatabaseError swig_types[7]
#define SWIGTYPE_p_Xapian__DatabaseLockError swig_types[8]
#define SWIGTYPE_p_Xapian__DatabaseModifiedError swig_types[9]
#define SWIGTYPE_p_Xapian__DatabaseOpeningError swig_types[10]
#define SWIGTYPE_p_Xapian__DatabaseVersionError swig_types[11]
#define SWIGTYPE_p_Xapian__DateValueRangeProcessor swig_types[12]
#define SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource swig_types[13]
#define SWIGTYPE_p_Xapian__DocNotFoundError swig_types[14]
#define SWIGTYPE_p_Xapian__Document swig_types[15]
#define SWIGTYPE_p_Xapian__ESet swig_types[16]
#define SWIGTYPE_p_Xapian__ESetIterator swig_types[17]
#define SWIGTYPE_p_Xapian__Enquire swig_types[18]
#define SWIGTYPE_p_Xapian__Error swig_types[19]
#define SWIGTYPE_p_Xapian__FeatureUnavailableError swig_types[20]
#define SWIGTYPE_p_Xapian__FixedWeightPostingSource swig_types[21]
#define SWIGTYPE_p_Xapian__InternalError swig_types[22]
#define SWIGTYPE_p_Xapian__InvalidArgumentError swig_types[23]
#define SWIGTYPE_p_Xapian__InvalidOperationError swig_types[24]
#define SWIGTYPE_p_Xapian__KeyMaker swig_types[25]
#define SWIGTYPE_p_Xapian__LogicError swig_types[26]
#define SWIGTYPE_p_Xapian__MSet swig_types[27]
#define SWIGTYPE_p_Xapian__MSetIterator swig_types[28]
#define SWIGTYPE_p_Xapian__MatchDecider swig_types[29]
#define SWIGTYPE_p_Xapian__MatchSpy swig_types[30]
#define SWIGTYPE_p_Xapian__MultiValueKeyMaker swig_types[31]
#define SWIGTYPE_p_Xapian__MultiValueSorter swig_types[32]
#define SWIGTYPE_p_Xapian__NetworkError swig_types[33]
#define SWIGTYPE_p_Xapian__NetworkTimeoutError swig_types[34]
#define SWIGTYPE_p_Xapian__NumberValueRangeProcessor swig_types[35]
#define SWIGTYPE_p_Xapian__PositionIterator swig_types[36]
#define SWIGTYPE_p_Xapian__PostingIterator swig_types[37]
#define SWIGTYPE_p_Xapian__PostingSource swig_types[38]
#define SWIGTYPE_p_Xapian__Query swig_types[39]
#define SWIGTYPE_p_Xapian__QueryParser swig_types[40]
#define SWIGTYPE_p_Xapian__QueryParserError swig_types[41]
#define SWIGTYPE_p_Xapian__RSet swig_types[42]
#define SWIGTYPE_p_Xapian__RangeError swig_types[43]
#define SWIGTYPE_p_Xapian__Registry swig_types[44]
#define SWIGTYPE_p_Xapian__RuntimeError swig_types[45]
#define SWIGTYPE_p_Xapian__SerialisationError swig_types[46]
#define SWIGTYPE_p_Xapian__SimpleStopper swig_types[47]
#define SWIGTYPE_p_Xapian__Sorter swig_types[48]
#define SWIGTYPE_p_Xapian__Stem swig_types[49]
#define SWIGTYPE_p_Xapian__StemImplementation swig_types[50]
#define SWIGTYPE_p_Xapian__Stopper swig_types[51]
#define SWIGTYPE_p_Xapian__StringValueRangeProcessor swig_types[52]
#define SWIGTYPE_p_Xapian__TermGenerator swig_types[53]
#define SWIGTYPE_p_Xapian__TermIterator swig_types[54]
#define SWIGTYPE_p_Xapian__TradWeight swig_types[55]
#define SWIGTYPE_p_Xapian__UnimplementedError swig_types[56]
#define SWIGTYPE_p_Xapian__ValueCountMatchSpy swig_types[57]
#define SWIGTYPE_p_Xapian__ValueIterator swig_types[58]
#define SWIGTYPE_p_Xapian__ValueMapPostingSource swig_types[59]
#define SWIGTYPE_p_Xapian__ValuePostingSource swig_types[60]
#define SWIGTYPE_p_Xapian__ValueRangeProcessor swig_types[61]
#define SWIGTYPE_p_Xapian__ValueSetMatchDecider swig_types[62]
#define SWIGTYPE_p_Xapian__ValueWeightPostingSource swig_types[63]
#define SWIGTYPE_p_Xapian__Weight swig_types[64]
#define SWIGTYPE_p_Xapian__WritableDatabase swig_types[65]
#define SWIGTYPE_p_char swig_types[66]
#define SWIGTYPE_p_compaction_level swig_types[67]
#define SWIGTYPE_p_docid_order swig_types[68]
#define SWIGTYPE_p_double swig_types[69]
#define SWIGTYPE_p_feature_flag swig_types[70]
#define SWIGTYPE_p_int swig_types[71]
#define SWIGTYPE_p_op swig_types[72]
#define SWIGTYPE_p_std__string swig_types[73]
#define SWIGTYPE_p_std__vectorT_Xapian__Query_t swig_types[74]
#define SWIGTYPE_p_std__vectorT_std__string_t swig_types[75]
#define SWIGTYPE_p_stem_strategy swig_types[76]
#define SWIGTYPE_p_unsigned_int swig_types[77]
static swig_type_info *swig_types[79];
static swig_module_info swig_module = {swig_types, 78, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#define SWIG_init    boot_Search__Xapian

#define SWIG_name   "Search::Xapianc::boot_Search__Xapian"
#define SWIG_prefix "Search::Xapianc::"

#define SWIGVERSION 0x020005 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 


#include <stdexcept>


#ifdef __cplusplus
extern "C"
#endif
#ifndef PERL_OBJECT
#ifndef MULTIPLICITY
SWIGEXPORT void SWIG_init (CV* cv);
#else
SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
#endif
#else
SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
#endif


/* xapian.i: the Xapian scripting interface.
 *
 * Copyright 1999,2000,2001 BrightStation PLC
 * Copyright 2001,2002 Ananova Ltd
 * Copyright 2002,2003,2005 James Aylett
 * Copyright 2002,2003,2004,2005,2006,2007,2008,2009,2010,2011 Olly Betts
 * Copyright 2007 Lemur Consulting Ltd
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */


/** @file xapian-head.i
 * @brief Header for SWIG interface file for Xapian.
 */
/* Copyright (C) 2005,2006,2007,2008,2009,2011 Olly Betts
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

// Disable any deprecation warnings for Xapian methods/functions/classes.
#define XAPIAN_DEPRECATED(D) D
#define XAPIAN_DEPRECATED_CLASS

#include <xapian.h>

#include <string>
#include <vector>

using namespace std;

// If a backend has been disabled in xapian-core (manually or automatically) we
// include a stub definition here so the bindings can still be built.
namespace Xapian {
#ifndef XAPIAN_HAS_BRASS_BACKEND
    namespace Brass {
	static Database open(const string &) {
	    throw FeatureUnavailableError("Brass backend not supported");
	}
	static WritableDatabase open(const string &, int, int = 8192) {
	    throw FeatureUnavailableError("Brass backend not supported");
	}
    }
#endif

#ifndef XAPIAN_HAS_CHERT_BACKEND
    namespace Chert {
	static Database open(const string &) {
	    throw FeatureUnavailableError("Chert backend not supported");
	}
	static WritableDatabase open(const string &, int, int = 8192) {
	    throw FeatureUnavailableError("Chert backend not supported");
	}
    }
#endif

#ifndef XAPIAN_HAS_FLINT_BACKEND
    namespace Flint {
	static Database open(const string &) {
	    throw FeatureUnavailableError("Flint backend not supported");
	}
	static WritableDatabase open(const string &, int, int = 8192) {
	    throw FeatureUnavailableError("Flint backend not supported");
	}
    }
#endif

#ifndef XAPIAN_HAS_INMEMORY_BACKEND
    namespace InMemory {
	static WritableDatabase open() {
	    throw FeatureUnavailableError("InMemory backend not supported");
	}
    }
#endif

#ifndef XAPIAN_HAS_REMOTE_BACKEND
    namespace Remote {
	static Database open(const string &, unsigned int, timeout = 0, timeout = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}

	static WritableDatabase open_writable(const string &, unsigned int, timeout = 0, timeout = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}

	static Database open(const string &, const string &, timeout = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}

	static WritableDatabase open_writable(const string &, const string &, timeout = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}
    }
#endif
}


#include <stdexcept>


#include <string>

double SwigSvToNumber(SV* sv) {
    return SvIOK(sv) ? double(SvIVX(sv)) : SvNVX(sv);
}
std::string SwigSvToString(SV* sv) {
    STRLEN len;
    char *ptr = SvPV(sv, len);
    return std::string(ptr, len);
}
void SwigSvFromString(SV* sv, const std::string& s) {
    sv_setpvn(sv,s.data(),s.size());
}


#include <string>


#include <vector>
#include <algorithm>
#include <stdexcept>


#include <map>
#include <algorithm>
#include <stdexcept>


#include <utility>


/* perl/util.i: custom Perl typemaps for xapian-bindings
 *
 * Based on the perl XS wrapper files.
 *
 * Copyright (C) 2009 Kosei Moriyama
 * Copyright (C) 2011 Olly Betts
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */


SWIGINTERNINLINE SV *
SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
{    
  SV *obj = sv_newmortal();
  sv_setiv(obj, (IV) value);
  return obj;
}


SWIGINTERNINLINE SV *
SWIG_From_int  SWIG_PERL_DECL_ARGS_1(int value)
{    
  return SWIG_From_long  SWIG_PERL_CALL_ARGS_1(value);
}


Xapian::Query * newN(int op_, SV *q_) {
	Xapian::Query::op op = (Xapian::Query::op)op_;
	AV *q = (AV *) SvRV(q_);
	Xapian::Query * ret;

	try {
	    int items = av_len(q) + 1;
	    vector<Xapian::Query> queries;
	    queries.reserve(items);

	    for( int i = 0; i < items; i++ ) {
		SV **svp = av_fetch(q, i, NULL);
		if( svp == NULL )
		    croak("Unexpected NULL returned by av_fetch()");
		SV *sv = *svp;
		if ( sv_isa(sv, "Search::Xapian::Query")) {
		    Xapian::Query *query;
		    SWIG_ConvertPtr(sv, (void **)&query, SWIGTYPE_p_Xapian__Query, 0);
		    queries.push_back(*query);
		} else if ( SvOK(sv) ) {
		    STRLEN len;
		    const char * ptr = SvPV(sv, len);
		    queries.push_back(Xapian::Query(string(ptr, len)));
		} else {
		    croak( "USAGE: Search::Xapian::Query->new(OP, @TERMS_OR_QUERY_OBJECTS)" );
		}
	    }
            ret = new Xapian::Query(op, queries.begin(), queries.end());
        } catch (const Xapian::Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
	return ret;
}


#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
#   define LLONG_MAX __LONG_LONG_MAX__
#   define LLONG_MIN (-LLONG_MAX - 1LL)
#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
# endif
#endif


SWIGINTERN int
SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
{
  if (SvNIOK(obj)) {
    if (val) *val = SvNV(obj);
    return SWIG_OK;
  } else if (SvIOK(obj)) {
    if (val) *val = (double) SvIV(obj);
    return SWIG_AddCast(SWIG_OK);
  } else {
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      double v;
      errno = 0;
      v = strtod(nptr, &endptr);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
  }
  return SWIG_TypeError;
}


#include <float.h>


#include <math.h>


SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double *d, double min, double max) {
  double x = *d;
  if ((min <= x && x <= max)) {
   double fx = floor(x);
   double cx = ceil(x);
   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
   if ((errno == EDOM) || (errno == ERANGE)) {
     errno = 0;
   } else {
     double summ, reps, diff;
     if (rd < x) {
       diff = x - rd;
     } else if (rd > x) {
       diff = rd - x;
     } else {
       return 1;
     }
     summ = rd + x;
     reps = diff/summ;
     if (reps < 8*DBL_EPSILON) {
       *d = rd;
       return 1;
     }
   }
  }
  return 0;
}


SWIGINTERN int
SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
{
  if (SvIOK(obj)) {
    if (val) *val = SvIV(obj);
    return SWIG_OK;
  } else {
    int dispatch = 0;
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      long v;
      errno = 0;
      v = strtol(nptr, &endptr,0);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_int SWIG_PERL_DECL_ARGS_2(SV * obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long SWIG_PERL_CALL_ARGS_2(obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < INT_MIN || v > INT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< int >(v);
    }
  }  
  return res;
}


Xapian::WritableDatabase * new3_WritableDatabase() {
        try {
	    return new Xapian::WritableDatabase(Xapian::InMemory::open());
        }
        catch (const Xapian::Error &error) {
            croak( "Exception: %s", error.get_msg().c_str() );
        }
}


SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  SV *obj = sv_newmortal();
  if (carray) {
    sv_setpvn(obj, carray, size);
  } else {
    sv_setsv(obj, &PL_sv_undef);
  }
  return obj;
}


SWIGINTERNINLINE SV * 
SWIG_FromCharPtr(const char *cptr)
{ 
  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
}


SWIGINTERNINLINE SV *
SWIG_From_std_string  SWIG_PERL_DECL_ARGS_1(const std::string& s)
{
  return SWIG_FromCharPtrAndSize(s.data(), s.size());
}


SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
  static int init = 0;
  static swig_type_info* info = 0;
  if (!init) {
    info = SWIG_TypeQuery("_p_char");
    init = 1;
  }
  return info;
}


SWIGINTERN int
SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
{
  if (SvMAGICAL(obj)) {
     SV *tmp = sv_newmortal();
     SvSetSV(tmp, obj);
     obj = tmp;
  }
  if (SvPOK(obj)) {
    STRLEN len = 0;
    char *cstr = SvPV(obj, len); 
    size_t size = len + 1;
    if (cptr)  {
      if (alloc) {
	if (*alloc == SWIG_NEWOBJ) {
	  *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
	} else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      }
    }
    if (psize) *psize = size;
    return SWIG_OK;
  } else {
    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      char* vptr = 0; 
      if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = vptr;
	if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsPtr_std_string SWIG_PERL_DECL_ARGS_2(SV * obj, std::string **val) 
{
  char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
  if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
    if (buf) {
      if (val) *val = new std::string(buf, size - 1);
      if (alloc == SWIG_NEWOBJ) delete[] buf;
      return SWIG_NEWOBJ;
    } else {
      if (val) *val = 0;
      return SWIG_OLDOBJ;
    }
  } else {
    static int init = 0;
    static swig_type_info* descriptor = 0;
    if (!init) {
      descriptor = SWIG_TypeQuery("std::string" " *");
      init = 1;
    }
    if (descriptor) {
      std::string *vptr;
      int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
      if (SWIG_IsOK(res) && val) *val = vptr;
      return res;
    }
  }
  return SWIG_ERROR;
}





namespace Xapian {
void handle_exception() {
    try {
	throw;
    } catch (const Xapian::RangeError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::RangeError", (void *) new Xapian::RangeError(e));
        croak(Nullch);
    } catch (const Xapian::SerialisationError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::SerialisationError", (void *) new Xapian::SerialisationError(e));
        croak(Nullch);
    } catch (const Xapian::QueryParserError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::QueryParserError", (void *) new Xapian::QueryParserError(e));
        croak(Nullch);
    } catch (const Xapian::NetworkTimeoutError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::NetworkTimeoutError", (void *) new Xapian::NetworkTimeoutError(e));
        croak(Nullch);
    } catch (const Xapian::NetworkError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::NetworkError", (void *) new Xapian::NetworkError(e));
        croak(Nullch);
    } catch (const Xapian::InternalError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::InternalError", (void *) new Xapian::InternalError(e));
        croak(Nullch);
    } catch (const Xapian::FeatureUnavailableError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::FeatureUnavailableError", (void *) new Xapian::FeatureUnavailableError(e));
        croak(Nullch);
    } catch (const Xapian::DocNotFoundError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::DocNotFoundError", (void *) new Xapian::DocNotFoundError(e));
        croak(Nullch);
    } catch (const Xapian::DatabaseVersionError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::DatabaseVersionError", (void *) new Xapian::DatabaseVersionError(e));
        croak(Nullch);
    } catch (const Xapian::DatabaseOpeningError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::DatabaseOpeningError", (void *) new Xapian::DatabaseOpeningError(e));
        croak(Nullch);
    } catch (const Xapian::DatabaseModifiedError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::DatabaseModifiedError", (void *) new Xapian::DatabaseModifiedError(e));
        croak(Nullch);
    } catch (const Xapian::DatabaseLockError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::DatabaseLockError", (void *) new Xapian::DatabaseLockError(e));
        croak(Nullch);
    } catch (const Xapian::DatabaseCreateError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::DatabaseCreateError", (void *) new Xapian::DatabaseCreateError(e));
        croak(Nullch);
    } catch (const Xapian::DatabaseCorruptError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::DatabaseCorruptError", (void *) new Xapian::DatabaseCorruptError(e));
        croak(Nullch);
    } catch (const Xapian::DatabaseError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::DatabaseError", (void *) new Xapian::DatabaseError(e));
        croak(Nullch);
    } catch (const Xapian::UnimplementedError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::UnimplementedError", (void *) new Xapian::UnimplementedError(e));
        croak(Nullch);
    } catch (const Xapian::InvalidOperationError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::InvalidOperationError", (void *) new Xapian::InvalidOperationError(e));
        croak(Nullch);
    } catch (const Xapian::InvalidArgumentError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::InvalidArgumentError", (void *) new Xapian::InvalidArgumentError(e));
        croak(Nullch);
    } catch (const Xapian::AssertionError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::AssertionError", (void *) new Xapian::AssertionError(e));
        croak(Nullch);
    } catch (const Xapian::RuntimeError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::RuntimeError", (void *) new Xapian::RuntimeError(e));
        croak(Nullch);
    } catch (const Xapian::LogicError &e) {
	SV * errsv = get_sv("@", TRUE);
	sv_setref_pv(errsv, "Search::Xapian::LogicError", (void *) new Xapian::LogicError(e));
        croak(Nullch);
    } catch (const std::exception& e) {
        croak( "std::exception: %s", e.what());
    } catch (...) {
        croak("something terrible happened");
    }
}
};


SWIGINTERNINLINE SV *
SWIG_From_unsigned_SS_long  SWIG_PERL_DECL_ARGS_1(unsigned long value)
{    
  SV *obj = sv_newmortal();
  sv_setuv(obj, (UV) value);
  return obj;
}


SWIGINTERNINLINE SV *
SWIG_From_unsigned_SS_int  SWIG_PERL_DECL_ARGS_1(unsigned int value)
{    
  return SWIG_From_unsigned_SS_long  SWIG_PERL_CALL_ARGS_1(value);
}

SWIGINTERN Xapian::termpos Xapian_PositionIterator_get_termpos(Xapian::PositionIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_PositionIterator_next(Xapian::PositionIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_PositionIterator_equals(Xapian::PositionIterator const *self,Xapian::PositionIterator const &other){
	    return (*self) == other;
	}

SWIGINTERNINLINE SV *
SWIG_From_bool  SWIG_PERL_DECL_ARGS_1(bool value)
{    
  SV *obj = sv_newmortal();
  if (value) {
    sv_setsv(obj, &PL_sv_yes);
  } else {
    sv_setsv(obj, &PL_sv_no); 
  }
  return obj;
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val) 
{
  if (SvUOK(obj)) {
    if (val) *val = SvUV(obj);
    return SWIG_OK;
  } else  if (SvIOK(obj)) {
    long v = SvIV(obj);
    if (v >= 0) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else {
    int dispatch = 0;
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      unsigned long v;
      errno = 0;
      v = strtoul(nptr, &endptr,0);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_int SWIG_PERL_DECL_ARGS_2(SV * obj, unsigned int *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v > UINT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< unsigned int >(v);
    }
  }  
  return res;
}

SWIGINTERN bool Xapian_PositionIterator_equal1(Xapian::PositionIterator *self,Xapian::PositionIterator *that){
     return ((*self) == (*that));
}
SWIGINTERN bool Xapian_PositionIterator_nequal1(Xapian::PositionIterator *self,Xapian::PositionIterator *that){
     return ((*self) != (*that));
}
SWIGINTERN Xapian::docid Xapian_PostingIterator_get_docid(Xapian::PostingIterator const *self){
	return *(*self);
    }
SWIGINTERN void Xapian_PostingIterator_next(Xapian::PostingIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_PostingIterator_equals(Xapian::PostingIterator const *self,Xapian::PostingIterator const &other){
	return (*self) == other;
    }
SWIGINTERN std::string Xapian_TermIterator_get_term(Xapian::TermIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_TermIterator_next(Xapian::TermIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_TermIterator_equals(Xapian::TermIterator const *self,Xapian::TermIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN bool Xapian_TermIterator_equal(Xapian::TermIterator *self,Xapian::TermIterator *that){
     return ((*self) == (*that));
}
SWIGINTERN bool Xapian_TermIterator_nequal(Xapian::TermIterator *self,Xapian::TermIterator *that){
     return ((*self) != (*that));
}
SWIGINTERN std::string Xapian_ValueIterator_get_value(Xapian::ValueIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_ValueIterator_next(Xapian::ValueIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_ValueIterator_equals(Xapian::ValueIterator const *self,Xapian::ValueIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN bool Xapian_ValueIterator_equal(Xapian::ValueIterator *self,Xapian::ValueIterator *that){
     return ((*self) == (*that));
}
SWIGINTERN bool Xapian_ValueIterator_nequal(Xapian::ValueIterator *self,Xapian::ValueIterator *that){
     return ((*self) != (*that));
}

SWIGINTERNINLINE SV *
SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value)
{    
  SV *obj = sv_newmortal();
  sv_setnv(obj, value);
  return obj;
}

SWIGINTERN Xapian::MSetIterator Xapian_MSet_get_hit(Xapian::MSet const *self,Xapian::doccount i){
	    return ((*self)[i]);
	}
SWIGINTERN int Xapian_MSet_get_document_percentage(Xapian::MSet const *self,Xapian::doccount i){
	    return (*self).convert_to_percent( ((*self)[i]) );
	}
SWIGINTERN Xapian::Document const Xapian_MSet_get_document(Xapian::MSet const *self,Xapian::doccount i){
	    return ((*self)[i]).get_document();
	}
SWIGINTERN Xapian::docid Xapian_MSet_get_docid(Xapian::MSet const *self,Xapian::doccount i){
	    return *((*self)[i]);
	}
SWIGINTERN Xapian::MSetIterator Xapian_MSet_FETCH(Xapian::MSet *self,int index){
    return ((*self)[index]);
}
SWIGINTERN Xapian::docid Xapian_MSetIterator_get_docid(Xapian::MSetIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_MSetIterator_next(Xapian::MSetIterator *self){ ++(*self); }
SWIGINTERN void Xapian_MSetIterator_prev(Xapian::MSetIterator *self){ --(*self); }
SWIGINTERN bool Xapian_MSetIterator_equals(Xapian::MSetIterator const *self,Xapian::MSetIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN bool Xapian_MSetIterator_equal(Xapian::MSetIterator *self,Xapian::MSetIterator *that){
     return ((*self) == (*that));
}
SWIGINTERN bool Xapian_MSetIterator_nequal(Xapian::MSetIterator *self,Xapian::MSetIterator *that){
     return ((*self) != (*that));
}
SWIGINTERN Xapian::ESetIterator Xapian_ESet_FETCH(Xapian::ESet *self,int index){
    return ((*self)[index]);
}
SWIGINTERN std::string Xapian_ESetIterator_get_term(Xapian::ESetIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_ESetIterator_next(Xapian::ESetIterator *self){ ++(*self); }
SWIGINTERN void Xapian_ESetIterator_prev(Xapian::ESetIterator *self){ --(*self); }
SWIGINTERN bool Xapian_ESetIterator_equals(Xapian::ESetIterator const *self,Xapian::ESetIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN std::string Xapian_ESetIterator_get_termname(Xapian::ESetIterator *self){
    return self->operator*();
}
SWIGINTERN bool Xapian_ESetIterator_equal(Xapian::ESetIterator *self,Xapian::ESetIterator *that){
    return ((*self) == (*that));
}
SWIGINTERN bool Xapian_ESetIterator_nequal(Xapian::ESetIterator *self,Xapian::ESetIterator *that){
    return ((*self) != (*that));
}

SWIGINTERN int
SWIG_AsVal_bool SWIG_PERL_DECL_ARGS_2(SV *obj, bool* val)
{
  if (obj == &PL_sv_yes) {
    if (val) *val = true;
    return SWIG_OK;
  } else if (obj == &PL_sv_no) { 
    if (val) *val = false;
    return SWIG_OK;
  } else {
    if (val) *val = SvTRUE(obj) ? true: false;
    return SWIG_AddCast(SWIG_OK);    
  }
  return SWIG_TypeError;
}


SWIGINTERNINLINE SV *
SWIG_From_size_t  SWIG_PERL_DECL_ARGS_1(size_t value)
{    
  return SWIG_From_unsigned_SS_long  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long >(value));
}


SWIGINTERNINLINE int
SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
  if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  return res;
}

SWIGINTERN Xapian::Query *new_Xapian_Query__SWIG_13(Xapian::Query::op op,std::vector< std::string > const &subqs,Xapian::termcount param=0){
		return new Xapian::Query(op, subqs.begin(), subqs.end(), param);
	    }
SWIGINTERN Xapian::Query *new_Xapian_Query__SWIG_15(Xapian::Query::op op,std::vector< Xapian::Query > const &subqs,Xapian::termcount param=0){
		return new Xapian::Query(op, subqs.begin(), subqs.end(), param);
	    }
SWIGINTERN bool Xapian_SimpleStopper_stop_word(Xapian::SimpleStopper *self,std::string term){
     return (*self)(term);
}
SWIGINTERN std::string Xapian_Stem_stem_word(Xapian::Stem *self,std::string word){
	    return (*self)(word);
}
#ifdef __cplusplus
extern "C" {
#endif

#ifdef PERL_OBJECT
#define MAGIC_CLASS _wrap_Search__Xapian_var::
class _wrap_Search__Xapian_var : public CPerlObj {
public:
#else
#define MAGIC_CLASS
#endif
SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
    MAGIC_PPERL
    croak("Value is read-only.");
    return 0;
}
SWIGCLASS_STATIC int _wrap_BAD_VALUENO_get(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) {
  MAGIC_PPERL
  sv_setsv(sv,SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(Xapian::BAD_VALUENO)))  ;
  return 1;
}




#ifdef PERL_OBJECT
};
#endif

#ifdef __cplusplus
}
#endif

#ifdef __cplusplus
extern "C" {
#endif
XS(_wrap_newN) {
  {
    int arg1 ;
    SV *arg2 = (SV *) 0 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: newN(op_,q_);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "newN" "', argument " "1"" of type '" "int""'");
    } 
    arg1 = static_cast< int >(val1);
    arg2 = ST(1);
    result = (Xapian::Query *)newN(arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new3_WritableDatabase) {
  {
    int argvi = 0;
    Xapian::WritableDatabase *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new3_WritableDatabase();");
    }
    result = (Xapian::WritableDatabase *)new3_WritableDatabase();
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase, 0 | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Error_get_type) {
  {
    Xapian::Error *arg1 = (Xapian::Error *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Error_get_type(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Error, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Error_get_type" "', argument " "1"" of type '" "Xapian::Error const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Error * >(argp1);
    result = (char *)((Xapian::Error const *)arg1)->get_type();
    ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Error_get_msg) {
  {
    Xapian::Error *arg1 = (Xapian::Error *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Error_get_msg(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Error, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Error_get_msg" "', argument " "1"" of type '" "Xapian::Error const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Error * >(argp1);
    result = (std::string *) &((Xapian::Error const *)arg1)->get_msg();
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Error_get_context) {
  {
    Xapian::Error *arg1 = (Xapian::Error *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Error_get_context(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Error, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Error_get_context" "', argument " "1"" of type '" "Xapian::Error const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Error * >(argp1);
    result = (std::string *) &((Xapian::Error const *)arg1)->get_context();
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(*result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Error_get_error_string) {
  {
    Xapian::Error *arg1 = (Xapian::Error *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Error_get_error_string(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Error, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Error_get_error_string" "', argument " "1"" of type '" "Xapian::Error const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Error * >(argp1);
    result = (char *)((Xapian::Error const *)arg1)->get_error_string();
    ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Error_get_description) {
  {
    Xapian::Error *arg1 = (Xapian::Error *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Error_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Error, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Error_get_description" "', argument " "1"" of type '" "Xapian::Error const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Error * >(argp1);
    result = ((Xapian::Error const *)arg1)->get_description();
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Error) {
  {
    Xapian::Error *arg1 = (Xapian::Error *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Error(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Error, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Error" "', argument " "1"" of type '" "Xapian::Error *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Error * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_LogicError) {
  {
    Xapian::LogicError *arg1 = (Xapian::LogicError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LogicError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LogicError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogicError" "', argument " "1"" of type '" "Xapian::LogicError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LogicError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_RuntimeError) {
  {
    Xapian::RuntimeError *arg1 = (Xapian::RuntimeError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RuntimeError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RuntimeError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RuntimeError" "', argument " "1"" of type '" "Xapian::RuntimeError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RuntimeError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssertionError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::AssertionError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_AssertionError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_AssertionError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssertionError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::AssertionError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_AssertionError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AssertionError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssertionError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::AssertionError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AssertionError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssertionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssertionError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::AssertionError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_AssertionError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssertionError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::AssertionError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_AssertionError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_AssertionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AssertionError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_AssertionError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AssertionError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AssertionError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AssertionError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AssertionError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_AssertionError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_AssertionError'");
  XSRETURN(0);
}


XS(_wrap_delete_AssertionError) {
  {
    Xapian::AssertionError *arg1 = (Xapian::AssertionError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_AssertionError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__AssertionError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AssertionError" "', argument " "1"" of type '" "Xapian::AssertionError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::AssertionError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidArgumentError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::InvalidArgumentError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_InvalidArgumentError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_InvalidArgumentError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidArgumentError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::InvalidArgumentError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_InvalidArgumentError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InvalidArgumentError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidArgumentError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::InvalidArgumentError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InvalidArgumentError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidArgumentError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::InvalidArgumentError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvalidArgumentError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidArgumentError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::InvalidArgumentError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InvalidArgumentError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidArgumentError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InvalidArgumentError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidArgumentError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InvalidArgumentError'");
  XSRETURN(0);
}


XS(_wrap_delete_InvalidArgumentError) {
  {
    Xapian::InvalidArgumentError *arg1 = (Xapian::InvalidArgumentError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvalidArgumentError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvalidArgumentError" "', argument " "1"" of type '" "Xapian::InvalidArgumentError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InvalidArgumentError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidOperationError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::InvalidOperationError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_InvalidOperationError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_InvalidOperationError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidOperationError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::InvalidOperationError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_InvalidOperationError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InvalidOperationError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidOperationError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::InvalidOperationError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InvalidOperationError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidOperationError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::InvalidOperationError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InvalidOperationError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidOperationError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::InvalidOperationError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InvalidOperationError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InvalidOperationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InvalidOperationError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InvalidOperationError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InvalidOperationError'");
  XSRETURN(0);
}


XS(_wrap_delete_InvalidOperationError) {
  {
    Xapian::InvalidOperationError *arg1 = (Xapian::InvalidOperationError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InvalidOperationError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvalidOperationError" "', argument " "1"" of type '" "Xapian::InvalidOperationError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InvalidOperationError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnimplementedError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::UnimplementedError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_UnimplementedError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_UnimplementedError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnimplementedError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::UnimplementedError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_UnimplementedError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_UnimplementedError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnimplementedError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::UnimplementedError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_UnimplementedError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnimplementedError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::UnimplementedError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_UnimplementedError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnimplementedError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::UnimplementedError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_UnimplementedError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_UnimplementedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_UnimplementedError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_UnimplementedError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_UnimplementedError'");
  XSRETURN(0);
}


XS(_wrap_delete_UnimplementedError) {
  {
    Xapian::UnimplementedError *arg1 = (Xapian::UnimplementedError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_UnimplementedError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__UnimplementedError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnimplementedError" "', argument " "1"" of type '" "Xapian::UnimplementedError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::UnimplementedError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatabaseError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DatabaseError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DatabaseError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseError) {
  {
    Xapian::DatabaseError *arg1 = (Xapian::DatabaseError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseError" "', argument " "1"" of type '" "Xapian::DatabaseError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCorruptError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseCorruptError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseCorruptError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatabaseCorruptError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCorruptError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseCorruptError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseCorruptError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DatabaseCorruptError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCorruptError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseCorruptError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseCorruptError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCorruptError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseCorruptError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseCorruptError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCorruptError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseCorruptError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseCorruptError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCorruptError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DatabaseCorruptError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCorruptError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseCorruptError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseCorruptError) {
  {
    Xapian::DatabaseCorruptError *arg1 = (Xapian::DatabaseCorruptError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseCorruptError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseCorruptError" "', argument " "1"" of type '" "Xapian::DatabaseCorruptError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseCorruptError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCreateError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseCreateError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseCreateError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatabaseCreateError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCreateError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseCreateError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseCreateError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DatabaseCreateError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCreateError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseCreateError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseCreateError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCreateError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseCreateError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseCreateError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCreateError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseCreateError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseCreateError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseCreateError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DatabaseCreateError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseCreateError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseCreateError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseCreateError) {
  {
    Xapian::DatabaseCreateError *arg1 = (Xapian::DatabaseCreateError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseCreateError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseCreateError" "', argument " "1"" of type '" "Xapian::DatabaseCreateError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseCreateError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseLockError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseLockError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseLockError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatabaseLockError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseLockError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseLockError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseLockError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DatabaseLockError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseLockError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseLockError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseLockError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseLockError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseLockError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseLockError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseLockError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseLockError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseLockError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseLockError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DatabaseLockError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseLockError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseLockError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseLockError) {
  {
    Xapian::DatabaseLockError *arg1 = (Xapian::DatabaseLockError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseLockError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseLockError" "', argument " "1"" of type '" "Xapian::DatabaseLockError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseLockError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseModifiedError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseModifiedError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseModifiedError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatabaseModifiedError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseModifiedError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseModifiedError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseModifiedError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DatabaseModifiedError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseModifiedError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseModifiedError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseModifiedError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseModifiedError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseModifiedError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseModifiedError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseModifiedError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseModifiedError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseModifiedError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseModifiedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DatabaseModifiedError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseModifiedError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseModifiedError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseModifiedError) {
  {
    Xapian::DatabaseModifiedError *arg1 = (Xapian::DatabaseModifiedError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseModifiedError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseModifiedError" "', argument " "1"" of type '" "Xapian::DatabaseModifiedError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseModifiedError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseOpeningError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseOpeningError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseOpeningError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatabaseOpeningError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseOpeningError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseOpeningError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseOpeningError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DatabaseOpeningError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseOpeningError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseOpeningError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseOpeningError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseOpeningError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseOpeningError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseOpeningError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseOpeningError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseOpeningError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseOpeningError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseOpeningError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DatabaseOpeningError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseOpeningError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseOpeningError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseOpeningError) {
  {
    Xapian::DatabaseOpeningError *arg1 = (Xapian::DatabaseOpeningError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseOpeningError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseOpeningError" "', argument " "1"" of type '" "Xapian::DatabaseOpeningError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseOpeningError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseVersionError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseVersionError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseVersionError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DatabaseVersionError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseVersionError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DatabaseVersionError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseVersionError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DatabaseVersionError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseVersionError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseVersionError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseVersionError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseVersionError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseVersionError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseVersionError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseVersionError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseVersionError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseVersionError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseVersionError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DatabaseVersionError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseVersionError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseVersionError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseVersionError) {
  {
    Xapian::DatabaseVersionError *arg1 = (Xapian::DatabaseVersionError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseVersionError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseVersionError" "', argument " "1"" of type '" "Xapian::DatabaseVersionError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseVersionError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DocNotFoundError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::DocNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DocNotFoundError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_DocNotFoundError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DocNotFoundError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DocNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DocNotFoundError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DocNotFoundError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DocNotFoundError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DocNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DocNotFoundError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DocNotFoundError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DocNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DocNotFoundError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DocNotFoundError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DocNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DocNotFoundError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DocNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DocNotFoundError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DocNotFoundError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DocNotFoundError'");
  XSRETURN(0);
}


XS(_wrap_delete_DocNotFoundError) {
  {
    Xapian::DocNotFoundError *arg1 = (Xapian::DocNotFoundError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DocNotFoundError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DocNotFoundError" "', argument " "1"" of type '" "Xapian::DocNotFoundError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DocNotFoundError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FeatureUnavailableError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::FeatureUnavailableError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FeatureUnavailableError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_FeatureUnavailableError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_FeatureUnavailableError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::FeatureUnavailableError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_FeatureUnavailableError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_FeatureUnavailableError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FeatureUnavailableError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::FeatureUnavailableError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FeatureUnavailableError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_FeatureUnavailableError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::FeatureUnavailableError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FeatureUnavailableError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_FeatureUnavailableError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::FeatureUnavailableError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_FeatureUnavailableError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_FeatureUnavailableError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FeatureUnavailableError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FeatureUnavailableError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_FeatureUnavailableError'");
  XSRETURN(0);
}


XS(_wrap_delete_FeatureUnavailableError) {
  {
    Xapian::FeatureUnavailableError *arg1 = (Xapian::FeatureUnavailableError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FeatureUnavailableError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FeatureUnavailableError" "', argument " "1"" of type '" "Xapian::FeatureUnavailableError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FeatureUnavailableError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InternalError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::InternalError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_InternalError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_InternalError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InternalError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::InternalError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_InternalError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_InternalError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InternalError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::InternalError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InternalError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InternalError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InternalError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::InternalError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InternalError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_InternalError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::InternalError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_InternalError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_InternalError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_InternalError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InternalError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InternalError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InternalError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InternalError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InternalError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_InternalError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InternalError'");
  XSRETURN(0);
}


XS(_wrap_delete_InternalError) {
  {
    Xapian::InternalError *arg1 = (Xapian::InternalError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InternalError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InternalError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InternalError" "', argument " "1"" of type '" "Xapian::InternalError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InternalError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::NetworkError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_NetworkError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NetworkError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::NetworkError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_NetworkError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NetworkError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::NetworkError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NetworkError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::NetworkError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NetworkError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::NetworkError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NetworkError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NetworkError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NetworkError'");
  XSRETURN(0);
}


XS(_wrap_delete_NetworkError) {
  {
    Xapian::NetworkError *arg1 = (Xapian::NetworkError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NetworkError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__NetworkError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NetworkError" "', argument " "1"" of type '" "Xapian::NetworkError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::NetworkError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkTimeoutError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::NetworkTimeoutError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_NetworkTimeoutError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_NetworkTimeoutError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkTimeoutError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::NetworkTimeoutError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_NetworkTimeoutError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NetworkTimeoutError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkTimeoutError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::NetworkTimeoutError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NetworkTimeoutError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkTimeoutError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::NetworkTimeoutError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NetworkTimeoutError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkTimeoutError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::NetworkTimeoutError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NetworkTimeoutError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NetworkTimeoutError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NetworkTimeoutError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NetworkTimeoutError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NetworkTimeoutError'");
  XSRETURN(0);
}


XS(_wrap_delete_NetworkTimeoutError) {
  {
    Xapian::NetworkTimeoutError *arg1 = (Xapian::NetworkTimeoutError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NetworkTimeoutError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NetworkTimeoutError" "', argument " "1"" of type '" "Xapian::NetworkTimeoutError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::NetworkTimeoutError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QueryParserError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::QueryParserError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_QueryParserError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_QueryParserError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_QueryParserError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::QueryParserError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_QueryParserError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_QueryParserError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QueryParserError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::QueryParserError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_QueryParserError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QueryParserError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_QueryParserError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::QueryParserError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_QueryParserError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_QueryParserError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::QueryParserError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_QueryParserError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_QueryParserError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_QueryParserError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QueryParserError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_QueryParserError'");
  XSRETURN(0);
}


XS(_wrap_delete_QueryParserError) {
  {
    Xapian::QueryParserError *arg1 = (Xapian::QueryParserError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QueryParserError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParserError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QueryParserError" "', argument " "1"" of type '" "Xapian::QueryParserError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParserError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SerialisationError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::SerialisationError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SerialisationError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_SerialisationError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_SerialisationError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::SerialisationError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_SerialisationError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_SerialisationError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SerialisationError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::SerialisationError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SerialisationError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SerialisationError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_SerialisationError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::SerialisationError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SerialisationError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_SerialisationError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::SerialisationError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_SerialisationError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SerialisationError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_SerialisationError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SerialisationError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SerialisationError'");
  XSRETURN(0);
}


XS(_wrap_delete_SerialisationError) {
  {
    Xapian::SerialisationError *arg1 = (Xapian::SerialisationError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SerialisationError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__SerialisationError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SerialisationError" "', argument " "1"" of type '" "Xapian::SerialisationError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::SerialisationError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RangeError__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    Xapian::RangeError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_RangeError(msg_,context_,error_string_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RangeError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_RangeError__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::RangeError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_RangeError(msg_,context_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_RangeError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RangeError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::RangeError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_RangeError(msg_,context_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_RangeError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::RangeError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RangeError(msg_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_RangeError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::RangeError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_RangeError(msg_,errno_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RangeError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RangeError) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RangeError__SWIG_3); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RangeError__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RangeError__SWIG_2); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RangeError__SWIG_1); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RangeError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RangeError'");
  XSRETURN(0);
}


XS(_wrap_delete_RangeError) {
  {
    Xapian::RangeError *arg1 = (Xapian::RangeError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RangeError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RangeError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RangeError" "', argument " "1"" of type '" "Xapian::RangeError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RangeError * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_version_string) {
  {
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: version_string();");
    }
    result = (char *)Xapian::version_string();
    ST(argvi) = SWIG_FromCharPtr((const char *)result); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_major_version) {
  {
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: major_version();");
    }
    result = (int)Xapian::major_version();
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_minor_version) {
  {
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: minor_version();");
    }
    result = (int)Xapian::minor_version();
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_revision) {
  {
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: revision();");
    }
    result = (int)Xapian::revision();
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_PositionIterator__SWIG_0) {
  {
    int argvi = 0;
    Xapian::PositionIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PositionIterator();");
    }
    {
      try {
        result = (Xapian::PositionIterator *)new Xapian::PositionIterator();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PositionIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_PositionIterator__SWIG_1) {
  {
    Xapian::PositionIterator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::PositionIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_PositionIterator(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__PositionIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    {
      try {
        result = (Xapian::PositionIterator *)new Xapian::PositionIterator((Xapian::PositionIterator const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PositionIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PositionIterator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__PositionIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_PositionIterator__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_PositionIterator__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PositionIterator'");
  XSRETURN(0);
}


XS(_wrap_delete_PositionIterator) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PositionIterator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PositionIterator_get_termpos) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termpos result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PositionIterator_get_termpos(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_get_termpos" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    {
      try {
        result = (Xapian::termpos)Xapian_PositionIterator_get_termpos((Xapian::PositionIterator const *)arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PositionIterator_increment) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PositionIterator_increment(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_increment" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    {
      try {
        Xapian_PositionIterator_next(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PositionIterator_equals) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    Xapian::PositionIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PositionIterator_equals(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_equals" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__PositionIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PositionIterator_equals" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PositionIterator_equals" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1,(Xapian::PositionIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PositionIterator_skip_to) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    Xapian::termpos arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PositionIterator_skip_to(self,pos);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_skip_to" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PositionIterator_skip_to" "', argument " "2"" of type '" "Xapian::termpos""'");
    } 
    arg2 = static_cast< Xapian::termpos >(val2);
    {
      try {
        (arg1)->skip_to(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PositionIterator_get_description) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PositionIterator_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_get_description" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    {
      try {
        result = ((Xapian::PositionIterator const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PositionIterator_equal1) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    Xapian::PositionIterator *arg2 = (Xapian::PositionIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PositionIterator_equal1(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_equal1" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PositionIterator_equal1" "', argument " "2"" of type '" "Xapian::PositionIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
    result = (bool)Xapian_PositionIterator_equal1(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PositionIterator_nequal1) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    Xapian::PositionIterator *arg2 = (Xapian::PositionIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PositionIterator_nequal1(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_nequal1" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PositionIterator_nequal1" "', argument " "2"" of type '" "Xapian::PositionIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
    result = (bool)Xapian_PositionIterator_nequal1(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PostingIterator__SWIG_0) {
  {
    int argvi = 0;
    Xapian::PostingIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PostingIterator();");
    }
    {
      try {
        result = (Xapian::PostingIterator *)new Xapian::PostingIterator();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PostingIterator) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PostingIterator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PostingIterator__SWIG_1) {
  {
    Xapian::PostingIterator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::PostingIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_PostingIterator(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__PostingIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        result = (Xapian::PostingIterator *)new Xapian::PostingIterator((Xapian::PostingIterator const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PostingIterator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__PostingIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_PostingIterator__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_PostingIterator__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PostingIterator'");
  XSRETURN(0);
}


XS(_wrap_PostingIterator_skip_to) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PostingIterator_skip_to(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_skip_to" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PostingIterator_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        (arg1)->skip_to(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingIterator_get_doclength) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingIterator_get_doclength(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_get_doclength" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_doclength();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingIterator_get_wdf) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingIterator_get_wdf(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_get_wdf" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_wdf();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingIterator_positionlist_begin) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::PositionIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingIterator_positionlist_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_positionlist_begin" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        result = ((Xapian::PostingIterator const *)arg1)->positionlist_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingIterator_positionlist_end) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::PositionIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingIterator_positionlist_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_positionlist_end" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        result = ((Xapian::PostingIterator const *)arg1)->positionlist_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingIterator_get_description) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingIterator_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_get_description" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        result = ((Xapian::PostingIterator const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingIterator_get_docid) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingIterator_get_docid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_get_docid" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        result = (Xapian::docid)Xapian_PostingIterator_get_docid((Xapian::PostingIterator const *)arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingIterator_increment) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingIterator_increment(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_increment" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        Xapian_PostingIterator_next(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingIterator_equals) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    Xapian::PostingIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PostingIterator_equals(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_equals" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostingIterator_equals" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingIterator_equals" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_PostingIterator_equals((Xapian::PostingIterator const *)arg1,(Xapian::PostingIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap___eq__) {
  {
    Xapian::PostingIterator *arg1 = 0 ;
    Xapian::PostingIterator *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: __eq__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__PostingIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator ==((Xapian::PostingIterator const &)*arg1,(Xapian::PostingIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap___ne__) {
  {
    Xapian::PostingIterator *arg1 = 0 ;
    Xapian::PostingIterator *arg2 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: __ne__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__PostingIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator !=((Xapian::PostingIterator const &)*arg1,(Xapian::PostingIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TermIterator__SWIG_0) {
  {
    int argvi = 0;
    Xapian::TermIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TermIterator();");
    }
    {
      try {
        result = (Xapian::TermIterator *)new Xapian::TermIterator();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_TermIterator__SWIG_1) {
  {
    Xapian::TermIterator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_TermIterator(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__TermIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = (Xapian::TermIterator *)new Xapian::TermIterator((Xapian::TermIterator const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TermIterator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_TermIterator__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_TermIterator__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TermIterator'");
  XSRETURN(0);
}


XS(_wrap_delete_TermIterator) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TermIterator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_get_termname) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermIterator_get_termname(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_get_termname" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = Xapian_TermIterator_get_term((Xapian::TermIterator const *)arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_increment) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermIterator_increment(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_increment" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        Xapian_TermIterator_next(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_equals) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    Xapian::TermIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermIterator_equals(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_equals" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__TermIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator_equals" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator_equals" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_TermIterator_equals((Xapian::TermIterator const *)arg1,(Xapian::TermIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_skip_to) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermIterator_skip_to(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_skip_to" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator_skip_to" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator_skip_to" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->skip_to((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_get_wdf) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermIterator_get_wdf(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_get_wdf" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->get_wdf();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_get_termfreq) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermIterator_get_termfreq(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_get_termfreq" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::TermIterator const *)arg1)->get_termfreq();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_positionlist_count) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermIterator_positionlist_count(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_positionlist_count" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->positionlist_count();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_positionlist_begin) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::PositionIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermIterator_positionlist_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_positionlist_begin" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = (arg1)->positionlist_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_positionlist_end) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::PositionIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermIterator_positionlist_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_positionlist_end" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = (arg1)->positionlist_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_get_description) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermIterator_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_get_description" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = ((Xapian::TermIterator const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_equal) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    Xapian::TermIterator *arg2 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermIterator_equal(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_equal" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator_equal" "', argument " "2"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
    result = (bool)Xapian_TermIterator_equal(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermIterator_nequal) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    Xapian::TermIterator *arg2 = (Xapian::TermIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermIterator_nequal(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_nequal" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator_nequal" "', argument " "2"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
    result = (bool)Xapian_TermIterator_nequal(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueIterator__SWIG_0) {
  {
    int argvi = 0;
    Xapian::ValueIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ValueIterator();");
    }
    {
      try {
        result = (Xapian::ValueIterator *)new Xapian::ValueIterator();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueIterator__SWIG_1) {
  {
    Xapian::ValueIterator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ValueIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ValueIterator(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ValueIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    {
      try {
        result = (Xapian::ValueIterator *)new Xapian::ValueIterator((Xapian::ValueIterator const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueIterator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__ValueIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ValueIterator__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ValueIterator__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ValueIterator'");
  XSRETURN(0);
}


XS(_wrap_delete_ValueIterator) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ValueIterator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_get_value) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueIterator_get_value(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_get_value" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    {
      try {
        result = Xapian_ValueIterator_get_value((Xapian::ValueIterator const *)arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_increment) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueIterator_increment(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_increment" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    {
      try {
        Xapian_ValueIterator_next(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_equals) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    Xapian::ValueIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueIterator_equals(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_equals" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__ValueIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueIterator_equals" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueIterator_equals" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_ValueIterator_equals((Xapian::ValueIterator const *)arg1,(Xapian::ValueIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_get_docid) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueIterator_get_docid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_get_docid" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    {
      try {
        result = (Xapian::docid)((Xapian::ValueIterator const *)arg1)->get_docid();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_get_valueno) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::valueno result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueIterator_get_valueno(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_get_valueno" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    {
      try {
        result = (Xapian::valueno)((Xapian::ValueIterator const *)arg1)->get_valueno();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_skip_to) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueIterator_skip_to(self,docid_or_slot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_skip_to" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueIterator_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        (arg1)->skip_to(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_check) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueIterator_check(self,docid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_check" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueIterator_check" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = (bool)(arg1)->check(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_get_description) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueIterator_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_get_description" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    {
      try {
        result = ((Xapian::ValueIterator const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_equal) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    Xapian::ValueIterator *arg2 = (Xapian::ValueIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueIterator_equal(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_equal" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueIterator_equal" "', argument " "2"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
    result = (bool)Xapian_ValueIterator_equal(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueIterator_nequal) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    Xapian::ValueIterator *arg2 = (Xapian::ValueIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueIterator_nequal(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_nequal" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueIterator_nequal" "', argument " "2"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
    result = (bool)Xapian_ValueIterator_nequal(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Document__SWIG_0) {
  {
    Xapian::Document *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Document *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Document(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Document" "', argument " "1"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Document" "', argument " "1"" of type '" "Xapian::Document const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = (Xapian::Document *)new Xapian::Document((Xapian::Document const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Document__SWIG_1) {
  {
    int argvi = 0;
    Xapian::Document *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Document();");
    }
    {
      try {
        result = (Xapian::Document *)new Xapian::Document();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Document) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Document__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Document__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Document'");
  XSRETURN(0);
}


XS(_wrap_delete_Document) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Document(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Document" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_get_value) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Document_get_value(self,slot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_get_value" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_get_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        result = ((Xapian::Document const *)arg1)->get_value(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_add_value) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    Xapian::valueno arg2 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Document_add_value(self,slot,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_value" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_add_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_add_value" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_value" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        (arg1)->add_value(arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_Document_remove_value) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Document_remove_value(self,slot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_remove_value" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_remove_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        (arg1)->remove_value(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_clear_values) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_clear_values(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_clear_values" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        (arg1)->clear_values();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_get_data) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_get_data(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_get_data" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = ((Xapian::Document const *)arg1)->get_data();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_set_data) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Document_set_data(self,data);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_set_data" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_set_data" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_set_data" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->set_data((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Document_add_posting__SWIG_0) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termpos arg3 ;
    Xapian::termcount arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Document_add_posting(self,tname,tpos,wdfinc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_add_posting" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_posting" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_add_posting" "', argument " "3"" of type '" "Xapian::termpos""'");
    } 
    arg3 = static_cast< Xapian::termpos >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Document_add_posting" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        (arg1)->add_posting((std::string const &)*arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_add_posting__SWIG_1) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termpos arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Document_add_posting(self,tname,tpos);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_add_posting" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_posting" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_add_posting" "', argument " "3"" of type '" "Xapian::termpos""'");
    } 
    arg3 = static_cast< Xapian::termpos >(val3);
    {
      try {
        (arg1)->add_posting((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_add_posting) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Document_add_posting__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Document_add_posting__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Document_add_posting'");
  XSRETURN(0);
}


XS(_wrap_Document_add_term__SWIG_0) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Document_add_term(self,tname,wdfinc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_term" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_add_term" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        (arg1)->add_term((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_add_term__SWIG_1) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Document_add_term(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_term" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->add_term((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Document_add_term) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Document_add_term__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Document_add_term__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Document_add_term'");
  XSRETURN(0);
}


XS(_wrap_Document_add_boolean_term) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Document_add_boolean_term(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_boolean_term" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_add_boolean_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_boolean_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->add_boolean_term((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Document_remove_posting__SWIG_0) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termpos arg3 ;
    Xapian::termcount arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Document_remove_posting(self,tname,tpos,wdfdec);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_remove_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_remove_posting" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_remove_posting" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_remove_posting" "', argument " "3"" of type '" "Xapian::termpos""'");
    } 
    arg3 = static_cast< Xapian::termpos >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Document_remove_posting" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        (arg1)->remove_posting((std::string const &)*arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_remove_posting__SWIG_1) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termpos arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Document_remove_posting(self,tname,tpos);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_remove_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_remove_posting" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_remove_posting" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_remove_posting" "', argument " "3"" of type '" "Xapian::termpos""'");
    } 
    arg3 = static_cast< Xapian::termpos >(val3);
    {
      try {
        (arg1)->remove_posting((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_remove_posting) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Document_remove_posting__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Document_remove_posting__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Document_remove_posting'");
  XSRETURN(0);
}


XS(_wrap_Document_remove_term) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Document_remove_term(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_remove_term" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_remove_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_remove_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->remove_term((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Document_clear_terms) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_clear_terms(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_clear_terms" "', argument " "1"" of type '" "Xapian::Document *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        (arg1)->clear_terms();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_termlist_count) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_termlist_count(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_termlist_count" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::Document const *)arg1)->termlist_count();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_termlist_begin) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_termlist_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_termlist_begin" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = ((Xapian::Document const *)arg1)->termlist_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_termlist_end) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_termlist_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_termlist_end" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = ((Xapian::Document const *)arg1)->termlist_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_values_count) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_values_count(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_values_count" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::Document const *)arg1)->values_count();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_values_begin) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ValueIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_values_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_values_begin" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = ((Xapian::Document const *)arg1)->values_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_values_end) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ValueIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_values_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_values_end" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = ((Xapian::Document const *)arg1)->values_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_get_docid) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_get_docid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_get_docid" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = (Xapian::docid)((Xapian::Document const *)arg1)->get_docid();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_serialise) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_serialise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_serialise" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = ((Xapian::Document const *)arg1)->serialise();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Document_unserialise) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Document result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_unserialise(s);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = Xapian::Document::unserialise((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_Document_get_description) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Document_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_get_description" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Document * >(argp1);
    {
      try {
        result = ((Xapian::Document const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_PostingSource) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PostingSource(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PostingSource" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_get_termfreq_min) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_get_termfreq_min(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_termfreq_min" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_min();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_get_termfreq_est) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_get_termfreq_est(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_termfreq_est" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_est();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_get_termfreq_max) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_get_termfreq_max(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_termfreq_max" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_max();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_get_maxweight) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_get_maxweight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_maxweight" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_maxweight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_get_weight) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_get_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_weight" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_weight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_get_docid) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_get_docid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_docid" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (Xapian::docid)((Xapian::PostingSource const *)arg1)->get_docid();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_increment_weight) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    Xapian::weight arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PostingSource_increment_weight(self,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_increment_weight" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PostingSource_increment_weight" "', argument " "2"" of type '" "Xapian::weight""'");
    } 
    arg2 = static_cast< Xapian::weight >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_skip_to) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    Xapian::docid arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: PostingSource_skip_to(self,did,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_skip_to" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PostingSource_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_check) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    Xapian::docid arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: PostingSource_check(self,did,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_check" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PostingSource_check" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        result = (bool)(arg1)->check(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_at_end) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_at_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_at_end" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (bool)((Xapian::PostingSource const *)arg1)->at_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_name) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_name" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = ((Xapian::PostingSource const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_init) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    Xapian::Database *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: PostingSource_init(self,db);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_init" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Database * >(argp2);
    {
      try {
        (arg1)->init((Xapian::Database const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_get_description) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_description" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = ((Xapian::PostingSource const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValuePostingSource) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::ValuePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ValuePostingSource(slot_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValuePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::ValuePostingSource *)new Xapian::ValuePostingSource(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValuePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_get_termfreq_min) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_get_termfreq_min(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_get_termfreq_min" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_min();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_get_termfreq_est) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_get_termfreq_est(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_get_termfreq_est" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_est();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_get_termfreq_max) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_get_termfreq_max(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_get_termfreq_max" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_max();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_increment_weight) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::weight arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValuePostingSource_increment_weight(self,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_increment_weight" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValuePostingSource_increment_weight" "', argument " "2"" of type '" "Xapian::weight""'");
    } 
    arg2 = static_cast< Xapian::weight >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_skip_to) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::docid arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ValuePostingSource_skip_to(self,min_docid,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_skip_to" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValuePostingSource_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ValuePostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_check) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::docid arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ValuePostingSource_check(self,min_docid,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_check" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValuePostingSource_check" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ValuePostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        result = (bool)(arg1)->check(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_at_end) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_at_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_at_end" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = (bool)((Xapian::ValuePostingSource const *)arg1)->at_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_get_docid) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_get_docid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_get_docid" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = (Xapian::docid)((Xapian::ValuePostingSource const *)arg1)->get_docid();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_init) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::Database *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValuePostingSource_init(self,db_);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_init" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValuePostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValuePostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Database * >(argp2);
    {
      try {
        (arg1)->init((Xapian::Database const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ValuePostingSource) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ValuePostingSource(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValuePostingSource" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueWeightPostingSource) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::ValueWeightPostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ValueWeightPostingSource(slot_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::ValueWeightPostingSource *)new Xapian::ValueWeightPostingSource(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueWeightPostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueWeightPostingSource_get_weight) {
  {
    Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueWeightPostingSource_get_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_get_weight" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::ValueWeightPostingSource const *)arg1)->get_weight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueWeightPostingSource_name) {
  {
    Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueWeightPostingSource_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_name" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
    {
      try {
        result = ((Xapian::ValueWeightPostingSource const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueWeightPostingSource_init) {
  {
    Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
    Xapian::Database *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueWeightPostingSource_init(self,db_);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_init" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Database * >(argp2);
    {
      try {
        (arg1)->init((Xapian::Database const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueWeightPostingSource_get_description) {
  {
    Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueWeightPostingSource_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_get_description" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
    {
      try {
        result = ((Xapian::ValueWeightPostingSource const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ValueWeightPostingSource) {
  {
    Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ValueWeightPostingSource(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DecreasingValueWeightPostingSource__SWIG_0) {
  {
    Xapian::valueno arg1 ;
    Xapian::docid arg2 ;
    Xapian::docid arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DecreasingValueWeightPostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DecreasingValueWeightPostingSource(slot_,range_start_,range_end_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "3"" of type '" "Xapian::docid""'");
    } 
    arg3 = static_cast< Xapian::docid >(val3);
    {
      try {
        result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DecreasingValueWeightPostingSource__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    Xapian::docid arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DecreasingValueWeightPostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DecreasingValueWeightPostingSource(slot_,range_start_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DecreasingValueWeightPostingSource__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::DecreasingValueWeightPostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DecreasingValueWeightPostingSource(slot_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DecreasingValueWeightPostingSource) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DecreasingValueWeightPostingSource__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DecreasingValueWeightPostingSource__SWIG_1); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DecreasingValueWeightPostingSource__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DecreasingValueWeightPostingSource'");
  XSRETURN(0);
}


XS(_wrap_DecreasingValueWeightPostingSource_get_weight) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DecreasingValueWeightPostingSource_get_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_get_weight" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_weight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_name) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DecreasingValueWeightPostingSource_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_name" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
    {
      try {
        result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_init) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    Xapian::Database *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DecreasingValueWeightPostingSource_init(self,db_);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_init" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecreasingValueWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DecreasingValueWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Database * >(argp2);
    {
      try {
        (arg1)->init((Xapian::Database const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_increment_weight) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    Xapian::weight arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: DecreasingValueWeightPostingSource_increment_weight(self,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_increment_weight" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DecreasingValueWeightPostingSource_increment_weight" "', argument " "2"" of type '" "Xapian::weight""'");
    } 
    arg2 = static_cast< Xapian::weight >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_skip_to) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    Xapian::docid arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DecreasingValueWeightPostingSource_skip_to(self,min_docid,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_skip_to" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DecreasingValueWeightPostingSource_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecreasingValueWeightPostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_check) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    Xapian::docid arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DecreasingValueWeightPostingSource_check(self,min_docid,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_check" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DecreasingValueWeightPostingSource_check" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecreasingValueWeightPostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        result = (bool)(arg1)->check(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_get_description) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DecreasingValueWeightPostingSource_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_get_description" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
    {
      try {
        result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DecreasingValueWeightPostingSource) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DecreasingValueWeightPostingSource(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueMapPostingSource) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::ValueMapPostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ValueMapPostingSource(slot_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValueMapPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::ValueMapPostingSource *)new Xapian::ValueMapPostingSource(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueMapPostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueMapPostingSource_add_mapping) {
  {
    Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
    std::string *arg2 = 0 ;
    double arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ValueMapPostingSource_add_mapping(self,key,wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_add_mapping" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueMapPostingSource_add_mapping" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueMapPostingSource_add_mapping" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ValueMapPostingSource_add_mapping" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->add_mapping((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueMapPostingSource_clear_mappings) {
  {
    Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueMapPostingSource_clear_mappings(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_clear_mappings" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
    {
      try {
        (arg1)->clear_mappings();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueMapPostingSource_set_default_weight) {
  {
    Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
    double arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueMapPostingSource_set_default_weight(self,wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_set_default_weight" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueMapPostingSource_set_default_weight" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->set_default_weight(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueMapPostingSource_get_weight) {
  {
    Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueMapPostingSource_get_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_get_weight" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::ValueMapPostingSource const *)arg1)->get_weight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueMapPostingSource_name) {
  {
    Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueMapPostingSource_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_name" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
    {
      try {
        result = ((Xapian::ValueMapPostingSource const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueMapPostingSource_init) {
  {
    Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
    Xapian::Database *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueMapPostingSource_init(self,db_);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_init" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueMapPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueMapPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Database * >(argp2);
    {
      try {
        (arg1)->init((Xapian::Database const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueMapPostingSource_get_description) {
  {
    Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueMapPostingSource_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_get_description" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
    {
      try {
        result = ((Xapian::ValueMapPostingSource const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ValueMapPostingSource) {
  {
    Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ValueMapPostingSource(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueMapPostingSource" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedWeightPostingSource) {
  {
    Xapian::weight arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::FixedWeightPostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_FixedWeightPostingSource(wt);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedWeightPostingSource" "', argument " "1"" of type '" "Xapian::weight""'");
    } 
    arg1 = static_cast< Xapian::weight >(val1);
    {
      try {
        result = (Xapian::FixedWeightPostingSource *)new Xapian::FixedWeightPostingSource(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FixedWeightPostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_get_termfreq_min) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedWeightPostingSource_get_termfreq_min(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_termfreq_min" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_min();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_get_termfreq_est) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedWeightPostingSource_get_termfreq_est(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_termfreq_est" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_est();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_get_termfreq_max) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedWeightPostingSource_get_termfreq_max(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_termfreq_max" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_max();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_get_weight) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedWeightPostingSource_get_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_weight" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::FixedWeightPostingSource const *)arg1)->get_weight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_increment_weight) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    Xapian::weight arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FixedWeightPostingSource_increment_weight(self,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_increment_weight" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FixedWeightPostingSource_increment_weight" "', argument " "2"" of type '" "Xapian::weight""'");
    } 
    arg2 = static_cast< Xapian::weight >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_skip_to) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    Xapian::docid arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FixedWeightPostingSource_skip_to(self,min_docid,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_skip_to" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FixedWeightPostingSource_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FixedWeightPostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_check) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    Xapian::docid arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: FixedWeightPostingSource_check(self,min_docid,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_check" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FixedWeightPostingSource_check" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FixedWeightPostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        result = (bool)(arg1)->check(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_at_end) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedWeightPostingSource_at_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_at_end" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        result = (bool)((Xapian::FixedWeightPostingSource const *)arg1)->at_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_get_docid) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedWeightPostingSource_get_docid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_docid" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        result = (Xapian::docid)((Xapian::FixedWeightPostingSource const *)arg1)->get_docid();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_name) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedWeightPostingSource_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_name" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        result = ((Xapian::FixedWeightPostingSource const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_init) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    Xapian::Database *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FixedWeightPostingSource_init(self,db_);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_init" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FixedWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Database * >(argp2);
    {
      try {
        (arg1)->init((Xapian::Database const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_get_description) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FixedWeightPostingSource_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_description" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        result = ((Xapian::FixedWeightPostingSource const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FixedWeightPostingSource) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FixedWeightPostingSource(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FixedWeightPostingSource" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MSet__SWIG_0) {
  {
    int argvi = 0;
    Xapian::MSet *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MSet();");
    }
    {
      try {
        result = (Xapian::MSet *)new Xapian::MSet();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSet, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_MSet__SWIG_1) {
  {
    Xapian::MSet *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::MSet *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MSet(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__MSet,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MSet" "', argument " "1"" of type '" "Xapian::MSet const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MSet" "', argument " "1"" of type '" "Xapian::MSet const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::MSet *)new Xapian::MSet((Xapian::MSet const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSet, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MSet) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_MSet__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_MSet__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MSet'");
  XSRETURN(0);
}


XS(_wrap_delete_MSet) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MSet(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MSet" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_fetch__SWIG_0) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    Xapian::MSetIterator *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MSet_fetch(self,begin,end);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_fetch" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::MSetIterator * >(argp3);
    {
      try {
        ((Xapian::MSet const *)arg1)->fetch(*arg2,*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_fetch__SWIG_1) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_fetch(self,item);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_fetch" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        ((Xapian::MSet const *)arg1)->fetch(*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_fetch__SWIG_2) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_fetch(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_fetch" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        ((Xapian::MSet const *)arg1)->fetch();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_fetch) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MSet_fetch__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MSet_fetch__SWIG_1); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MSet_fetch__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MSet_fetch'");
  XSRETURN(0);
}


XS(_wrap_MSet_convert_to_percent__SWIG_0) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    Xapian::weight arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::percent result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_convert_to_percent(self,wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_convert_to_percent" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::weight""'");
    } 
    arg2 = static_cast< Xapian::weight >(val2);
    {
      try {
        result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_convert_to_percent__SWIG_1) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::percent result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_convert_to_percent(self,item);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_convert_to_percent" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent((Xapian::MSetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_convert_to_percent) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MSet_convert_to_percent__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MSet_convert_to_percent__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MSet_convert_to_percent'");
  XSRETURN(0);
}


XS(_wrap_MSet_get_termfreq) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_get_termfreq(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_termfreq" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MSet_get_termfreq" "', argument " "2"" of type '" "std::string""'"); 
      }
      arg2 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_termfreq(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_termweight) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_get_termweight(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_termweight" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MSet_get_termweight" "', argument " "2"" of type '" "std::string""'"); 
      }
      arg2 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    {
      try {
        result = (Xapian::weight)((Xapian::MSet const *)arg1)->get_termweight(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_firstitem) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_firstitem(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_firstitem" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_firstitem();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_matches_lower_bound) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_matches_lower_bound(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_matches_lower_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_lower_bound();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_matches_estimated) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_matches_estimated(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_matches_estimated" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_estimated();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_matches_upper_bound) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_matches_upper_bound(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_matches_upper_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_upper_bound();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_uncollapsed_matches_lower_bound) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_uncollapsed_matches_lower_bound(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_uncollapsed_matches_lower_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_lower_bound();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_uncollapsed_matches_estimated) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_uncollapsed_matches_estimated(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_uncollapsed_matches_estimated" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_estimated();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_uncollapsed_matches_upper_bound) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_uncollapsed_matches_upper_bound(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_uncollapsed_matches_upper_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_upper_bound();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_max_possible) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_max_possible(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_max_possible" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::weight)(arg1)->get_max_possible();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_max_attained) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_max_attained(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_max_attained" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::weight)(arg1)->get_max_attained();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_size) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_size" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->size();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_empty) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_empty" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (bool)((Xapian::MSet const *)arg1)->empty();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_begin) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::MSetIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_begin" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = ((Xapian::MSet const *)arg1)->begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_end) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::MSetIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_end" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = ((Xapian::MSet const *)arg1)->end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_back) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::MSetIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_back(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_back" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = ((Xapian::MSet const *)arg1)->back();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_hit) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    Xapian::doccount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::MSetIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_get_hit(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_hit" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_get_hit" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    {
      try {
        result = Xapian_MSet_get_hit((Xapian::MSet const *)arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_document_percentage) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    Xapian::doccount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_get_document_percentage(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_document_percentage" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_get_document_percentage" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    {
      try {
        result = (int)Xapian_MSet_get_document_percentage((Xapian::MSet const *)arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_document) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    Xapian::doccount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::Document result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_get_document(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_document" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_get_document" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    {
      try {
        result = Xapian_MSet_get_document((Xapian::MSet const *)arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_docid) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    Xapian::doccount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_get_docid(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_docid" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_get_docid" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    {
      try {
        result = (Xapian::docid)Xapian_MSet_get_docid((Xapian::MSet const *)arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_get_description) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSet_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_description" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = ((Xapian::MSet const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_FETCH) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::MSetIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_FETCH(self,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_FETCH" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_FETCH" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = Xapian_MSet_FETCH(arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MSetIterator__SWIG_0) {
  {
    int argvi = 0;
    Xapian::MSetIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MSetIterator();");
    }
    {
      try {
        result = (Xapian::MSetIterator *)new Xapian::MSetIterator();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSetIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_MSetIterator__SWIG_1) {
  {
    Xapian::MSetIterator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::MSetIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_MSetIterator(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = (Xapian::MSetIterator *)new Xapian::MSetIterator((Xapian::MSetIterator const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSetIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MSetIterator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_MSetIterator__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_MSetIterator__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_MSetIterator'");
  XSRETURN(0);
}


XS(_wrap_delete_MSetIterator) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MSetIterator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_get_docid) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_get_docid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_docid" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = (Xapian::docid)Xapian_MSetIterator_get_docid((Xapian::MSetIterator const *)arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_increment) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_increment(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_increment" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        Xapian_MSetIterator_next(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_prev) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_prev(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_prev" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        Xapian_MSetIterator_prev(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_equals) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSetIterator_equals(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_equals" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSetIterator_equals" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSetIterator_equals" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_MSetIterator_equals((Xapian::MSetIterator const *)arg1,(Xapian::MSetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_get_document) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Document result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_get_document(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_document" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = ((Xapian::MSetIterator const *)arg1)->get_document();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_get_rank) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_get_rank(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_rank" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_rank();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_get_weight) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_get_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_weight" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::MSetIterator const *)arg1)->get_weight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_get_collapse_key) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_get_collapse_key(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_collapse_key" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = ((Xapian::MSetIterator const *)arg1)->get_collapse_key();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_get_collapse_count) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_get_collapse_count(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_collapse_count" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_collapse_count();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_get_percent) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::percent result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_get_percent(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_percent" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = (Xapian::percent)((Xapian::MSetIterator const *)arg1)->get_percent();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_get_description) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_description" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = ((Xapian::MSetIterator const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_equal) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    Xapian::MSetIterator *arg2 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSetIterator_equal(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_equal" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSetIterator_equal" "', argument " "2"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    result = (bool)Xapian_MSetIterator_equal(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_nequal) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    Xapian::MSetIterator *arg2 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSetIterator_nequal(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_nequal" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSetIterator_nequal" "', argument " "2"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    result = (bool)Xapian_MSetIterator_nequal(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ESet__SWIG_0) {
  {
    int argvi = 0;
    Xapian::ESet *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ESet();");
    }
    {
      try {
        result = (Xapian::ESet *)new Xapian::ESet();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESet, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ESet__SWIG_1) {
  {
    Xapian::ESet *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ESet *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ESet(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ESet,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESet" "', argument " "1"" of type '" "Xapian::ESet const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ESet" "', argument " "1"" of type '" "Xapian::ESet const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        result = (Xapian::ESet *)new Xapian::ESet((Xapian::ESet const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESet, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ESet) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__ESet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESet__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESet__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ESet'");
  XSRETURN(0);
}


XS(_wrap_delete_ESet) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ESet(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESet" "', argument " "1"" of type '" "Xapian::ESet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESet_get_ebound) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESet_get_ebound(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_get_ebound" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::ESet const *)arg1)->get_ebound();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESet_size) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESet_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_size" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::ESet const *)arg1)->size();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESet_empty) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESet_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_empty" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        result = (bool)((Xapian::ESet const *)arg1)->empty();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESet_begin) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ESetIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESet_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_begin" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        result = ((Xapian::ESet const *)arg1)->begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESet_end) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ESetIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESet_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_end" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        result = ((Xapian::ESet const *)arg1)->end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESet_back) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ESetIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESet_back(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_back" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        result = ((Xapian::ESet const *)arg1)->back();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESet_get_description) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESet_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_get_description" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    {
      try {
        result = ((Xapian::ESet const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESet_FETCH) {
  {
    Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::ESetIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ESet_FETCH(self,index);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_FETCH" "', argument " "1"" of type '" "Xapian::ESet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ESet_FETCH" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = Xapian_ESet_FETCH(arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ESetIterator__SWIG_0) {
  {
    int argvi = 0;
    Xapian::ESetIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ESetIterator();");
    }
    {
      try {
        result = (Xapian::ESetIterator *)new Xapian::ESetIterator();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESetIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ESetIterator__SWIG_1) {
  {
    Xapian::ESetIterator *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ESetIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ESetIterator(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        result = (Xapian::ESetIterator *)new Xapian::ESetIterator((Xapian::ESetIterator const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESetIterator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ESetIterator) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESetIterator__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ESetIterator__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ESetIterator'");
  XSRETURN(0);
}


XS(_wrap_delete_ESetIterator) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ESetIterator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_get_term) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESetIterator_get_term(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_get_term" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        result = Xapian_ESetIterator_get_term((Xapian::ESetIterator const *)arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_increment) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESetIterator_increment(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_increment" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        Xapian_ESetIterator_next(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_prev) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESetIterator_prev(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_prev" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        Xapian_ESetIterator_prev(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_equals) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    Xapian::ESetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ESetIterator_equals(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_equals" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESetIterator_equals" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESetIterator_equals" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_ESetIterator_equals((Xapian::ESetIterator const *)arg1,(Xapian::ESetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_get_weight) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESetIterator_get_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_get_weight" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::ESetIterator const *)arg1)->get_weight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_get_description) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESetIterator_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_get_description" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        result = ((Xapian::ESetIterator const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_get_termname) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESetIterator_get_termname(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_get_termname" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    result = Xapian_ESetIterator_get_termname(arg1);
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_equal) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    Xapian::ESetIterator *arg2 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ESetIterator_equal(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_equal" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESetIterator_equal" "', argument " "2"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    result = (bool)Xapian_ESetIterator_equal(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_nequal) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    Xapian::ESetIterator *arg2 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ESetIterator_nequal(self,that);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_nequal" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESetIterator_nequal" "', argument " "2"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    result = (bool)Xapian_ESetIterator_nequal(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RSet__SWIG_0) {
  {
    Xapian::RSet *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::RSet *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RSet(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__RSet,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RSet" "', argument " "1"" of type '" "Xapian::RSet const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RSet" "', argument " "1"" of type '" "Xapian::RSet const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    {
      try {
        result = (Xapian::RSet *)new Xapian::RSet((Xapian::RSet const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RSet, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RSet__SWIG_1) {
  {
    int argvi = 0;
    Xapian::RSet *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_RSet();");
    }
    {
      try {
        result = (Xapian::RSet *)new Xapian::RSet();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RSet, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_RSet) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RSet__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_RSet__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RSet'");
  XSRETURN(0);
}


XS(_wrap_delete_RSet) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RSet(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RSet" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_size) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RSet_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_size" "', argument " "1"" of type '" "Xapian::RSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::RSet const *)arg1)->size();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_empty) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RSet_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_empty" "', argument " "1"" of type '" "Xapian::RSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    {
      try {
        result = (bool)((Xapian::RSet const *)arg1)->empty();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_add_document__SWIG_0) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RSet_add_document(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_add_document" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        (arg1)->add_document(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_add_document__SWIG_1) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RSet_add_document(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_add_document" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        (arg1)->add_document(*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_add_document) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_RSet_add_document__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_RSet_add_document__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'RSet_add_document'");
  XSRETURN(0);
}


XS(_wrap_RSet_remove_document__SWIG_0) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RSet_remove_document(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_remove_document" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        (arg1)->remove_document(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_remove_document__SWIG_1) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RSet_remove_document(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_remove_document" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        (arg1)->remove_document(*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_remove_document) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_RSet_remove_document__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_RSet_remove_document__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'RSet_remove_document'");
  XSRETURN(0);
}


XS(_wrap_RSet_contains__SWIG_0) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RSet_contains(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_contains" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = (bool)(arg1)->contains(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_contains__SWIG_1) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: RSet_contains(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_contains" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)(arg1)->contains(*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_RSet_contains) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_RSet_contains__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_RSet_contains__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'RSet_contains'");
  XSRETURN(0);
}


XS(_wrap_RSet_get_description) {
  {
    Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RSet_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_get_description" "', argument " "1"" of type '" "Xapian::RSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
    {
      try {
        result = ((Xapian::RSet const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MatchDecider___call__) {
  {
    Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MatchDecider___call__(self,doc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchDecider___call__" "', argument " "1"" of type '" "Xapian::MatchDecider const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MatchDecider___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatchDecider___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    {
      try {
        result = (bool)((Xapian::MatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MatchDecider) {
  {
    Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MatchDecider(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MatchDecider, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatchDecider" "', argument " "1"" of type '" "Xapian::MatchDecider *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Enquire) {
  {
    Xapian::Database *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Enquire *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Enquire(databases);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Enquire" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Enquire" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::Enquire *)new Xapian::Enquire((Xapian::Database const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Enquire, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Enquire) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Enquire(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Enquire" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_query__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::Query *arg2 = 0 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_query(self,query,qlen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_query" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Query,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Query * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_query" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        (arg1)->set_query((Xapian::Query const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_query__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::Query *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_query(self,query);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_query" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Query,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Query * >(argp2);
    {
      try {
        (arg1)->set_query((Xapian::Query const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_query) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Query, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Query, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_query__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_query__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_query'");
  XSRETURN(0);
}


XS(_wrap_Enquire_get_query) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Enquire_get_query(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_query" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    {
      try {
        result = (Xapian::Query *) &(arg1)->get_query();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_add_matchspy) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::MatchSpy *arg2 = (Xapian::MatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_add_matchspy(self,spy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_add_matchspy" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_add_matchspy" "', argument " "2"" of type '" "Xapian::MatchSpy *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2);
    {
      try {
        (arg1)->add_matchspy(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_clear_matchspies) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Enquire_clear_matchspies(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_clear_matchspies" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    {
      try {
        (arg1)->clear_matchspies();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_weighting_scheme) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::Weight *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_weighting_scheme(self,weight);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_weighting_scheme" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Weight,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_set_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Weight * >(argp2);
    {
      try {
        (arg1)->set_weighting_scheme((Xapian::Weight const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_collapse_key__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::valueno arg2 ;
    Xapian::doccount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_collapse_key(self,collapse_key,collapse_max);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_collapse_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_collapse_key" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_collapse_key" "', argument " "3"" of type '" "Xapian::doccount""'");
    } 
    arg3 = static_cast< Xapian::doccount >(val3);
    {
      try {
        (arg1)->set_collapse_key(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_collapse_key__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_collapse_key(self,collapse_key);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_collapse_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_collapse_key" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        (arg1)->set_collapse_key(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_collapse_key) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_collapse_key__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_collapse_key__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_collapse_key'");
  XSRETURN(0);
}


XS(_wrap_Enquire_set_docid_order) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::Enquire::docid_order arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_docid_order(self,order);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_docid_order" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_docid_order" "', argument " "2"" of type '" "Xapian::Enquire::docid_order""'");
    } 
    arg2 = static_cast< Xapian::Enquire::docid_order >(val2);
    {
      try {
        (arg1)->set_docid_order(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_cutoff__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    int arg2 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_cutoff(self,percent_cutoff,weight_cutoff);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_cutoff" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_cutoff" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_cutoff" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        (arg1)->set_cutoff(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_cutoff__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_cutoff(self,percent_cutoff);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_cutoff" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_cutoff" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        (arg1)->set_cutoff(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_cutoff) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_cutoff__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_cutoff__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_cutoff'");
  XSRETURN(0);
}


XS(_wrap_Enquire_set_sort_by_relevance) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Enquire_set_sort_by_relevance(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    {
      try {
        (arg1)->set_sort_by_relevance();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_value__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::valueno arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_sort_by_value(self,sort_key,reverse);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_value" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_value" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        (arg1)->set_sort_by_value(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_value__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_sort_by_value(self,sort_key);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_value" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        (arg1)->set_sort_by_value(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_value) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_value__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_value__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_sort_by_value'");
  XSRETURN(0);
}


XS(_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::valueno arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_sort_by_value_then_relevance(self,sort_key,reverse);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        (arg1)->set_sort_by_value_then_relevance(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_sort_by_value_then_relevance(self,sort_key);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        (arg1)->set_sort_by_value_then_relevance(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_value_then_relevance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_sort_by_value_then_relevance'");
  XSRETURN(0);
}


XS(_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::valueno arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_sort_by_relevance_then_value(self,sort_key,reverse);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        (arg1)->set_sort_by_relevance_then_value(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_sort_by_relevance_then_value(self,sort_key);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        (arg1)->set_sort_by_relevance_then_value(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_relevance_then_value) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_sort_by_relevance_then_value'");
  XSRETURN(0);
}


XS(_wrap_Enquire_set_sort_by_key__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_sort_by_key(self,sorter,reverse);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_key" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        (arg1)->set_sort_by_key(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_key__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_sort_by_key(self,sorter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
    {
      try {
        (arg1)->set_sort_by_key(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_key) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Sorter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__KeyMaker, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_key__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_key__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_sort_by_key'");
  XSRETURN(0);
}


XS(_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_sort_by_key_then_relevance(self,sorter,reverse);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        (arg1)->set_sort_by_key_then_relevance(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_sort_by_key_then_relevance(self,sorter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
    {
      try {
        (arg1)->set_sort_by_key_then_relevance(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_key_then_relevance) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Sorter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__KeyMaker, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_sort_by_key_then_relevance'");
  XSRETURN(0);
}


XS(_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_set_sort_by_relevance_then_key(self,sorter,reverse);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        (arg1)->set_sort_by_relevance_then_key(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_set_sort_by_relevance_then_key(self,sorter);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
    {
      try {
        (arg1)->set_sort_by_relevance_then_key(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_relevance_then_key) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Sorter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__KeyMaker, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_sort_by_relevance_then_key'");
  XSRETURN(0);
}


XS(_wrap_Enquire_get_mset__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::doccount arg2 ;
    Xapian::doccount arg3 ;
    Xapian::doccount arg4 ;
    Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
    Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ;
    Xapian::MatchDecider *arg7 = (Xapian::MatchDecider *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    void *argp5 = 0 ;
    int res5 = 0 ;
    void *argp6 = 0 ;
    int res6 = 0 ;
    void *argp7 = 0 ;
    int res7 = 0 ;
    int argvi = 0;
    Xapian::MSet result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: Enquire_get_mset(self,first,maxitems,checkatleast,omrset,mdecider,matchspy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'");
    } 
    arg3 = static_cast< Xapian::doccount >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'");
    } 
    arg4 = static_cast< Xapian::doccount >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); 
    }
    arg5 = reinterpret_cast< Xapian::RSet * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Enquire_get_mset" "', argument " "6"" of type '" "Xapian::MatchDecider const *""'"); 
    }
    arg6 = reinterpret_cast< Xapian::MatchDecider * >(argp6);
    res7 = SWIG_ConvertPtr(ST(6), &argp7,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
    if (!SWIG_IsOK(res7)) {
      SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Enquire_get_mset" "', argument " "7"" of type '" "Xapian::MatchDecider const *""'"); 
    }
    arg7 = reinterpret_cast< Xapian::MatchDecider * >(argp7);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6,(Xapian::MatchDecider const *)arg7);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_mset__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::doccount arg2 ;
    Xapian::doccount arg3 ;
    Xapian::doccount arg4 ;
    Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
    Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    void *argp5 = 0 ;
    int res5 = 0 ;
    void *argp6 = 0 ;
    int res6 = 0 ;
    int argvi = 0;
    Xapian::MSet result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Enquire_get_mset(self,first,maxitems,checkatleast,omrset,mdecider);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'");
    } 
    arg3 = static_cast< Xapian::doccount >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'");
    } 
    arg4 = static_cast< Xapian::doccount >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); 
    }
    arg5 = reinterpret_cast< Xapian::RSet * >(argp5);
    res6 = SWIG_ConvertPtr(ST(5), &argp6,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
    if (!SWIG_IsOK(res6)) {
      SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Enquire_get_mset" "', argument " "6"" of type '" "Xapian::MatchDecider const *""'"); 
    }
    arg6 = reinterpret_cast< Xapian::MatchDecider * >(argp6);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_mset__SWIG_2) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::doccount arg2 ;
    Xapian::doccount arg3 ;
    Xapian::doccount arg4 ;
    Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    void *argp5 = 0 ;
    int res5 = 0 ;
    int argvi = 0;
    Xapian::MSet result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Enquire_get_mset(self,first,maxitems,checkatleast,omrset);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'");
    } 
    arg3 = static_cast< Xapian::doccount >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'");
    } 
    arg4 = static_cast< Xapian::doccount >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); 
    }
    arg5 = reinterpret_cast< Xapian::RSet * >(argp5);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_mset__SWIG_3) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::doccount arg2 ;
    Xapian::doccount arg3 ;
    Xapian::doccount arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::MSet result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Enquire_get_mset(self,first,maxitems,checkatleast);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'");
    } 
    arg3 = static_cast< Xapian::doccount >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'");
    } 
    arg4 = static_cast< Xapian::doccount >(val4);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_mset__SWIG_4) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::doccount arg2 ;
    Xapian::doccount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::MSet result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_get_mset(self,first,maxitems);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'");
    } 
    arg3 = static_cast< Xapian::doccount >(val3);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_mset__SWIG_5) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::doccount arg2 ;
    Xapian::doccount arg3 ;
    Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
    Xapian::MatchDecider *arg5 = (Xapian::MatchDecider *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    void *argp5 = 0 ;
    int res5 = 0 ;
    int argvi = 0;
    Xapian::MSet result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Enquire_get_mset(self,first,maxitems,omrset,mdecider);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'");
    } 
    arg3 = static_cast< Xapian::doccount >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::RSet const *""'"); 
    }
    arg4 = reinterpret_cast< Xapian::RSet * >(argp4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::MatchDecider const *""'"); 
    }
    arg5 = reinterpret_cast< Xapian::MatchDecider * >(argp5);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4,(Xapian::MatchDecider const *)arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_mset__SWIG_6) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::doccount arg2 ;
    Xapian::doccount arg3 ;
    Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    int argvi = 0;
    Xapian::MSet result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Enquire_get_mset(self,first,maxitems,omrset);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_mset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_mset" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'");
    } 
    arg3 = static_cast< Xapian::doccount >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::RSet const *""'"); 
    }
    arg4 = reinterpret_cast< Xapian::RSet * >(argp4);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_mset) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 7) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(5), &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(6), &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_4); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_6); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_3); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_5); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_2); return;
    case 6:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_1); return;
    case 7:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_get_mset'");
  XSRETURN(0);
}


XS(_wrap_Enquire_get_eset__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::RSet *arg3 = 0 ;
    int arg4 ;
    double arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::ESet result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Enquire_get_eset(self,maxitems,omrset,flags,k);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_eset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_eset" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Enquire_get_eset" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Enquire_get_eset" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_eset__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::RSet *arg3 = 0 ;
    int arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::ESet result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Enquire_get_eset(self,maxitems,omrset,flags);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_eset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_eset" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Enquire_get_eset" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_eset__SWIG_2) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::RSet *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::ESet result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Enquire_get_eset(self,maxitems,omrset);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_eset" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_eset" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_eset) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_1); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_get_eset'");
  XSRETURN(0);
}


XS(_wrap_Enquire_get_matching_terms_begin__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_get_matching_terms_begin(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_matching_terms_begin" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_matching_terms_end__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_get_matching_terms_end(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_matching_terms_end" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_matching_terms_begin__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_get_matching_terms_begin(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_matching_terms_begin" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin((Xapian::MSetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_matching_terms_begin) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_matching_terms_begin__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_matching_terms_begin__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_get_matching_terms_begin'");
  XSRETURN(0);
}


XS(_wrap_Enquire_get_matching_terms_end__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::MSetIterator *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_get_matching_terms_end(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_matching_terms_end" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_matching_terms_end) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_matching_terms_end__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Enquire_get_matching_terms_end__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_get_matching_terms_end'");
  XSRETURN(0);
}


XS(_wrap_Enquire_get_description) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Enquire_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_description" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Registry__SWIG_0) {
  {
    Xapian::Registry *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Registry *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Registry(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__Registry,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Registry" "', argument " "1"" of type '" "Xapian::Registry const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Registry" "', argument " "1"" of type '" "Xapian::Registry const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    {
      try {
        result = (Xapian::Registry *)new Xapian::Registry((Xapian::Registry const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Registry, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Registry__SWIG_1) {
  {
    int argvi = 0;
    Xapian::Registry *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Registry();");
    }
    {
      try {
        result = (Xapian::Registry *)new Xapian::Registry();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Registry, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Registry) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Registry, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Registry__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Registry__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Registry'");
  XSRETURN(0);
}


XS(_wrap_delete_Registry) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Registry(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Registry, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Registry" "', argument " "1"" of type '" "Xapian::Registry *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Registry_register_weighting_scheme) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    Xapian::Weight *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Registry_register_weighting_scheme(self,wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_register_weighting_scheme" "', argument " "1"" of type '" "Xapian::Registry *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Weight,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_register_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_register_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Weight * >(argp2);
    {
      try {
        (arg1)->register_weighting_scheme((Xapian::Weight const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Registry_get_weighting_scheme) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Weight *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Registry_get_weighting_scheme(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_get_weighting_scheme" "', argument " "1"" of type '" "Xapian::Registry const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_get_weighting_scheme" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_get_weighting_scheme" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::Weight *)((Xapian::Registry const *)arg1)->get_weighting_scheme((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Weight, 0 | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Registry_register_posting_source) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    Xapian::PostingSource *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Registry_register_posting_source(self,source);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_register_posting_source" "', argument " "1"" of type '" "Xapian::Registry *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__PostingSource,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_register_posting_source" "', argument " "2"" of type '" "Xapian::PostingSource const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_register_posting_source" "', argument " "2"" of type '" "Xapian::PostingSource const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PostingSource * >(argp2);
    {
      try {
        (arg1)->register_posting_source((Xapian::PostingSource const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Registry_get_posting_source) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::PostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Registry_get_posting_source(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_get_posting_source" "', argument " "1"" of type '" "Xapian::Registry const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_get_posting_source" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_get_posting_source" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::PostingSource *)((Xapian::Registry const *)arg1)->get_posting_source((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingSource, 0 | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Registry_register_match_spy) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    Xapian::MatchSpy *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Registry_register_match_spy(self,spy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_register_match_spy" "', argument " "1"" of type '" "Xapian::Registry *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MatchSpy,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_register_match_spy" "', argument " "2"" of type '" "Xapian::MatchSpy const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_register_match_spy" "', argument " "2"" of type '" "Xapian::MatchSpy const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2);
    {
      try {
        (arg1)->register_match_spy((Xapian::MatchSpy const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Registry_get_match_spy) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::MatchSpy *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Registry_get_match_spy(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_get_match_spy" "', argument " "1"" of type '" "Xapian::Registry const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_get_match_spy" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_get_match_spy" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::MatchSpy *)((Xapian::Registry const *)arg1)->get_match_spy((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MatchSpy, 0 | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Weight) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Weight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Weight" "', argument " "1"" of type '" "Xapian::Weight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Weight_name) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Weight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_name" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
    {
      try {
        result = ((Xapian::Weight const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Weight_get_sumpart) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Weight_get_sumpart(self,wdf,doclen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weight_get_sumpart" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Weight_get_maxpart) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Weight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxpart();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Weight_get_sumextra) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    Xapian::termcount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Weight_get_sumextra(self,doclen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumextra(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Weight_get_maxextra) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Weight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxextra();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Weight_get_sumpart_needs_doclength_) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Weight_get_sumpart_needs_doclength_(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_sumpart_needs_doclength_" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
    {
      try {
        result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_doclength_();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Weight_get_sumpart_needs_wdf_) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Weight_get_sumpart_needs_wdf_(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_sumpart_needs_wdf_" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
    {
      try {
        result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_wdf_();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BoolWeight) {
  {
    int argvi = 0;
    Xapian::BoolWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BoolWeight();");
    }
    {
      try {
        result = (Xapian::BoolWeight *)new Xapian::BoolWeight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BoolWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_BoolWeight_name) {
  {
    Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoolWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_name" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
    {
      try {
        result = ((Xapian::BoolWeight const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolWeight_get_sumpart) {
  {
    Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BoolWeight_get_sumpart(self,wdf,doclen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoolWeight_get_sumpart" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BoolWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_sumpart(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolWeight_get_maxpart) {
  {
    Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoolWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_maxpart();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolWeight_get_sumextra) {
  {
    Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
    Xapian::termcount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BoolWeight_get_sumextra(self,doclen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoolWeight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_sumextra(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BoolWeight_get_maxextra) {
  {
    Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BoolWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_maxextra();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BoolWeight) {
  {
    Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BoolWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BoolWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoolWeight" "', argument " "1"" of type '" "Xapian::BoolWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BM25Weight__SWIG_0) {
  {
    double arg1 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::BM25Weight *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_BM25Weight(k1,k2,k3,b,min_normlen);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BM25Weight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_BM25Weight" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_BM25Weight" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_BM25Weight" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
    ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_BM25Weight" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
    {
      try {
        result = (Xapian::BM25Weight *)new Xapian::BM25Weight(arg1,arg2,arg3,arg4,arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BM25Weight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BM25Weight__SWIG_1) {
  {
    int argvi = 0;
    Xapian::BM25Weight *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_BM25Weight();");
    }
    {
      try {
        result = (Xapian::BM25Weight *)new Xapian::BM25Weight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BM25Weight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_BM25Weight) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BM25Weight__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_BM25Weight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BM25Weight'");
  XSRETURN(0);
}


XS(_wrap_BM25Weight_name) {
  {
    Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BM25Weight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_name" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
    {
      try {
        result = ((Xapian::BM25Weight const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BM25Weight_get_sumpart) {
  {
    Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BM25Weight_get_sumpart(self,wdf,doclen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BM25Weight_get_sumpart" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BM25Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_sumpart(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BM25Weight_get_maxpart) {
  {
    Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BM25Weight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_maxpart();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_BM25Weight_get_sumextra) {
  {
    Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
    Xapian::termcount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: BM25Weight_get_sumextra(self,doclen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BM25Weight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_sumextra(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_BM25Weight_get_maxextra) {
  {
    Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BM25Weight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_maxextra();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_BM25Weight) {
  {
    Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BM25Weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25Weight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BM25Weight" "', argument " "1"" of type '" "Xapian::BM25Weight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TradWeight__SWIG_0) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::TradWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_TradWeight(k);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TradWeight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (Xapian::TradWeight *)new Xapian::TradWeight(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TradWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TradWeight__SWIG_1) {
  {
    int argvi = 0;
    Xapian::TradWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TradWeight();");
    }
    {
      try {
        result = (Xapian::TradWeight *)new Xapian::TradWeight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TradWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_TradWeight) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_TradWeight__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_TradWeight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TradWeight'");
  XSRETURN(0);
}


XS(_wrap_TradWeight_name) {
  {
    Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TradWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_name" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
    {
      try {
        result = ((Xapian::TradWeight const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TradWeight_get_sumpart) {
  {
    Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: TradWeight_get_sumpart(self,wdf,doclen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TradWeight_get_sumpart" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TradWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_sumpart(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TradWeight_get_maxpart) {
  {
    Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TradWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_maxpart();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TradWeight_get_sumextra) {
  {
    Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
    Xapian::termcount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TradWeight_get_sumextra(self,doclen);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TradWeight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_sumextra(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TradWeight_get_maxextra) {
  {
    Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::weight result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TradWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
    {
      try {
        result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_maxextra();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TradWeight) {
  {
    Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TradWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TradWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TradWeight" "', argument " "1"" of type '" "Xapian::TradWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MatchSpy) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MatchSpy(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MatchSpy, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatchSpy" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MatchSpy___call__) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    Xapian::Document *arg2 = 0 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MatchSpy___call__(self,doc,wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy___call__" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MatchSpy___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatchSpy___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MatchSpy___call__" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MatchSpy_name) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MatchSpy_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_name" "', argument " "1"" of type '" "Xapian::MatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
    {
      try {
        result = ((Xapian::MatchSpy const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MatchSpy_merge_results) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MatchSpy_merge_results(self,s);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_merge_results" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->merge_results((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_MatchSpy_get_description) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MatchSpy_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_get_description" "', argument " "1"" of type '" "Xapian::MatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
    {
      try {
        result = ((Xapian::MatchSpy const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueCountMatchSpy__SWIG_0) {
  {
    int argvi = 0;
    Xapian::ValueCountMatchSpy *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ValueCountMatchSpy();");
    }
    {
      try {
        result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueCountMatchSpy, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueCountMatchSpy__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::ValueCountMatchSpy *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ValueCountMatchSpy(slot_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValueCountMatchSpy" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueCountMatchSpy, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueCountMatchSpy) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ValueCountMatchSpy__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_ValueCountMatchSpy__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_ValueCountMatchSpy'");
  XSRETURN(0);
}


XS(_wrap_ValueCountMatchSpy_get_total) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    size_t result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueCountMatchSpy_get_total(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_get_total" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    {
      try {
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueCountMatchSpy_values_begin) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueCountMatchSpy_values_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_values_begin" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    {
      try {
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueCountMatchSpy_values_end) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueCountMatchSpy_values_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_values_end" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    {
      try {
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueCountMatchSpy_top_values_begin) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    size_t arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueCountMatchSpy_top_values_begin(self,maxvalues);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_top_values_begin" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueCountMatchSpy_top_values_begin" "', argument " "2"" of type '" "size_t""'");
    } 
    arg2 = static_cast< size_t >(val2);
    {
      try {
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_begin(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueCountMatchSpy_top_values_end) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    size_t arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueCountMatchSpy_top_values_end(self,size_t);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_top_values_end" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueCountMatchSpy_top_values_end" "', argument " "2"" of type '" "size_t""'");
    } 
    arg2 = static_cast< size_t >(val2);
    {
      try {
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueCountMatchSpy___call__) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    Xapian::Document *arg2 = 0 ;
    Xapian::weight arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ValueCountMatchSpy___call__(self,doc,wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy___call__" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueCountMatchSpy___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueCountMatchSpy___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ValueCountMatchSpy___call__" "', argument " "3"" of type '" "Xapian::weight""'");
    } 
    arg3 = static_cast< Xapian::weight >(val3);
    {
      try {
        (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueCountMatchSpy_name) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueCountMatchSpy_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_name" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    {
      try {
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->name();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueCountMatchSpy_merge_results) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueCountMatchSpy_merge_results(self,s);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_merge_results" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueCountMatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueCountMatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->merge_results((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_ValueCountMatchSpy_get_description) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueCountMatchSpy_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_get_description" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    {
      try {
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ValueCountMatchSpy) {
  {
    Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ValueCountMatchSpy(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueCountMatchSpy" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_add_database) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::Database *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_add_database(self,database);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_add_database" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_add_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_add_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Database * >(argp2);
    {
      try {
        (arg1)->add_database((Xapian::Database const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Database__SWIG_0) {
  {
    int argvi = 0;
    Xapian::Database *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Database();");
    }
    {
      try {
        result = (Xapian::Database *)new Xapian::Database();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_Database__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Database *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Database(path);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Database" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Database" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Database) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Database(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Database" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Database__SWIG_2) {
  {
    Xapian::Database *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Database *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Database(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Database" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Database" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::Database *)new Xapian::Database((Xapian::Database const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Database) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Database__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Database__SWIG_2); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Database__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Database'");
  XSRETURN(0);
}


XS(_wrap_Database_reopen) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_reopen(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_reopen" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        (arg1)->reopen();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_close) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_close(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_close" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        (arg1)->close();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_description) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_description" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_postlist_begin) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::PostingIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_postlist_begin(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_postlist_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_postlist_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_postlist_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->postlist_begin((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_postlist_end) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::PostingIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_postlist_end(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_postlist_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_postlist_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_postlist_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_termlist_begin) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_termlist_begin(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_termlist_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_termlist_begin" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = ((Xapian::Database const *)arg1)->termlist_begin(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_termlist_end) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_termlist_end(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_termlist_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_termlist_end" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = ((Xapian::Database const *)arg1)->termlist_end(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_positionlist_begin) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::docid arg2 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::PositionIterator result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Database_positionlist_begin(self,did,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_positionlist_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_positionlist_begin" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Database_positionlist_begin" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_positionlist_begin" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->positionlist_begin(arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_positionlist_end) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::docid arg2 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::PositionIterator result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Database_positionlist_end(self,did,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_positionlist_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_positionlist_end" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Database_positionlist_end" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_positionlist_end" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_allterms_begin__SWIG_0) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_allterms_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->allterms_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_allterms_end__SWIG_0) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_allterms_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->allterms_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_allterms_begin__SWIG_1) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_allterms_begin(self,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_allterms_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_allterms_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->allterms_begin((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_allterms_begin) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_allterms_begin__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_allterms_begin__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_allterms_begin'");
  XSRETURN(0);
}


XS(_wrap_Database_allterms_end__SWIG_1) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_allterms_end(self,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_allterms_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_allterms_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_allterms_end) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_allterms_end__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_allterms_end__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_allterms_end'");
  XSRETURN(0);
}


XS(_wrap_Database_get_doccount) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_doccount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_doccount" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_doccount();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_lastdocid) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_lastdocid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_lastdocid" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::docid)((Xapian::Database const *)arg1)->get_lastdocid();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_avlength) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::doclength result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_avlength(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_avlength" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_avlength();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_termfreq) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_termfreq(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_termfreq" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_termfreq" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_termfreq" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_termfreq((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_term_exists) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_term_exists(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_term_exists" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_term_exists" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_term_exists" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (bool)((Xapian::Database const *)arg1)->term_exists((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_collection_freq) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_collection_freq(self,tname);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_collection_freq" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_collection_freq" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_collection_freq" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_collection_freq((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_value_freq) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::doccount result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_value_freq(self,valno);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_value_freq" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_value_freq" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_value_freq(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_value_lower_bound) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_value_lower_bound(self,valno);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_value_lower_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_value_lower_bound" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_value_lower_bound(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_value_upper_bound) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_value_upper_bound(self,valno);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_value_upper_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_value_upper_bound" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_value_upper_bound(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_doclength_lower_bound) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_doclength_lower_bound(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_doclength_lower_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_lower_bound();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_doclength_upper_bound) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_doclength_upper_bound(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_doclength_upper_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_upper_bound();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_wdf_upper_bound) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_wdf_upper_bound(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_wdf_upper_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_wdf_upper_bound" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_wdf_upper_bound" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_wdf_upper_bound((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_valuestream_begin) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::ValueIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_valuestream_begin(self,slot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_valuestream_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_valuestream_begin" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        result = ((Xapian::Database const *)arg1)->valuestream_begin(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_valuestream_end) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::ValueIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_valuestream_end(self,Xapian::valueno);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_valuestream_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_valuestream_end" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        result = ((Xapian::Database const *)arg1)->valuestream_end(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_doclength) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_doclength(self,docid);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_doclength" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_doclength" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_keep_alive) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_keep_alive(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_keep_alive" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        (arg1)->keep_alive();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_document) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::Document result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_document(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_document" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_document" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = (arg1)->get_document(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_spelling_suggestion__SWIG_0) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Database_get_spelling_suggestion(self,word,max_edit_distance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_spelling_suggestion" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Database_get_spelling_suggestion" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_spelling_suggestion__SWIG_1) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_spelling_suggestion(self,word);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_spelling_suggestion" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_spelling_suggestion) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_get_spelling_suggestion__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_get_spelling_suggestion__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_get_spelling_suggestion'");
  XSRETURN(0);
}


XS(_wrap_Database_spellings_begin) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_spellings_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_spellings_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->spellings_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_spellings_end) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_spellings_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_spellings_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->spellings_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_synonyms_begin) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_synonyms_begin(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonyms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonyms_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonyms_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->synonyms_begin((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_synonyms_end) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_synonyms_end(self,std::string const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonyms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonyms_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonyms_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_synonym_keys_begin__SWIG_0) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_synonym_keys_begin(self,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonym_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonym_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->synonym_keys_begin((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_synonym_keys_begin__SWIG_1) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_synonym_keys_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->synonym_keys_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_synonym_keys_begin) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_synonym_keys_begin__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_synonym_keys_begin__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_synonym_keys_begin'");
  XSRETURN(0);
}


XS(_wrap_Database_synonym_keys_end__SWIG_0) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_synonym_keys_end(self,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonym_keys_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonym_keys_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_synonym_keys_end__SWIG_1) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_synonym_keys_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->synonym_keys_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_synonym_keys_end) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_synonym_keys_end__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_synonym_keys_end__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_synonym_keys_end'");
  XSRETURN(0);
}


XS(_wrap_Database_get_metadata) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_get_metadata(self,key);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_metadata" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_metadata((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_metadata_keys_begin__SWIG_0) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_metadata_keys_begin(self,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_metadata_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_metadata_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_metadata_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->metadata_keys_begin((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_metadata_keys_begin__SWIG_1) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_metadata_keys_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_metadata_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->metadata_keys_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_metadata_keys_begin) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_metadata_keys_begin__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_metadata_keys_begin__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_metadata_keys_begin'");
  XSRETURN(0);
}


XS(_wrap_Database_metadata_keys_end__SWIG_0) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_metadata_keys_end(self,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_metadata_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_metadata_keys_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_metadata_keys_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_metadata_keys_end__SWIG_1) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_metadata_keys_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_metadata_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->metadata_keys_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_metadata_keys_end) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_metadata_keys_end__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Database_metadata_keys_end__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_metadata_keys_end'");
  XSRETURN(0);
}


XS(_wrap_Database_get_uuid) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_uuid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_uuid" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_uuid();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_has_positions) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_has_positions(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_has_positions" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (bool)((Xapian::Database const *)arg1)->has_positions();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_WritableDatabase) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_WritableDatabase(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_WritableDatabase__SWIG_0) {
  {
    int argvi = 0;
    Xapian::WritableDatabase *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_WritableDatabase();");
    }
    {
      try {
        result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_WritableDatabase__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_WritableDatabase(path,action);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_WritableDatabase" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_WritableDatabase__SWIG_2) {
  {
    Xapian::WritableDatabase *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_WritableDatabase(other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__WritableDatabase,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      try {
        result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((Xapian::WritableDatabase const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_WritableDatabase) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_WritableDatabase__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_WritableDatabase__SWIG_2); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_WritableDatabase__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_WritableDatabase'");
  XSRETURN(0);
}


XS(_wrap_WritableDatabase_commit) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: WritableDatabase_commit(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_commit" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      try {
        (arg1)->commit();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_flush) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: WritableDatabase_flush(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_flush" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      try {
        (arg1)->flush();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_begin_transaction__SWIG_0) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    bool arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: WritableDatabase_begin_transaction(self,flushed);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_begin_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WritableDatabase_begin_transaction" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        (arg1)->begin_transaction(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_begin_transaction__SWIG_1) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: WritableDatabase_begin_transaction(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_begin_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      try {
        (arg1)->begin_transaction();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_begin_transaction) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_WritableDatabase_begin_transaction__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_WritableDatabase_begin_transaction__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'WritableDatabase_begin_transaction'");
  XSRETURN(0);
}


XS(_wrap_WritableDatabase_commit_transaction) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: WritableDatabase_commit_transaction(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_commit_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      try {
        (arg1)->commit_transaction();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_cancel_transaction) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: WritableDatabase_cancel_transaction(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_cancel_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      try {
        (arg1)->cancel_transaction();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_add_document) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: WritableDatabase_add_document(self,document);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_add_document" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_add_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    {
      try {
        result = (Xapian::docid)(arg1)->add_document((Xapian::Document const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_delete_document) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    Xapian::docid arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: WritableDatabase_delete_document(self,did);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_delete_document" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WritableDatabase_delete_document" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        (arg1)->delete_document(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_replace_document) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    Xapian::docid arg2 ;
    Xapian::Document *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: WritableDatabase_replace_document(self,did,document);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_replace_document" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WritableDatabase_replace_document" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::Document * >(argp3);
    {
      try {
        (arg1)->replace_document(arg2,(Xapian::Document const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_delete_document_by_term) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: WritableDatabase_delete_document_by_term(self,unique_term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_delete_document_by_term" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_delete_document_by_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_delete_document_by_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->delete_document((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_replace_document_by_term) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::Document *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::docid result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: WritableDatabase_replace_document_by_term(self,unique_term,document);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_replace_document_by_term" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_replace_document_by_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_replace_document_by_term" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_replace_document_by_term" "', argument " "3"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_replace_document_by_term" "', argument " "3"" of type '" "Xapian::Document const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::Document * >(argp3);
    {
      try {
        result = (Xapian::docid)(arg1)->replace_document((std::string const &)*arg2,(Xapian::Document const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_add_spelling__SWIG_0) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: WritableDatabase_add_spelling(self,word,freqinc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_add_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "WritableDatabase_add_spelling" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_add_spelling__SWIG_1) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: WritableDatabase_add_spelling(self,word);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_add_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_add_spelling) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_WritableDatabase_add_spelling__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_WritableDatabase_add_spelling__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'WritableDatabase_add_spelling'");
  XSRETURN(0);
}


XS(_wrap_WritableDatabase_remove_spelling__SWIG_0) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: WritableDatabase_remove_spelling(self,word,freqdec);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_remove_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "WritableDatabase_remove_spelling" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_remove_spelling__SWIG_1) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: WritableDatabase_remove_spelling(self,word);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_remove_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_remove_spelling) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_WritableDatabase_remove_spelling__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_WritableDatabase_remove_spelling__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'WritableDatabase_remove_spelling'");
  XSRETURN(0);
}


XS(_wrap_WritableDatabase_add_synonym) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: WritableDatabase_add_synonym(self,term,synonym);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_add_synonym" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_add_synonym" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_synonym" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_add_synonym" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_synonym" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        ((Xapian::WritableDatabase const *)arg1)->add_synonym((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_remove_synonym) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: WritableDatabase_remove_synonym(self,term,synonym);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_remove_synonym" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_remove_synonym" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_remove_synonym" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_remove_synonym" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_remove_synonym" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        ((Xapian::WritableDatabase const *)arg1)->remove_synonym((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_clear_synonyms) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: WritableDatabase_clear_synonyms(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_clear_synonyms" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_clear_synonyms" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_clear_synonyms" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        ((Xapian::WritableDatabase const *)arg1)->clear_synonyms((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_set_metadata) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: WritableDatabase_set_metadata(self,key,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_set_metadata" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_set_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_set_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_set_metadata" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_set_metadata" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        (arg1)->set_metadata((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_WritableDatabase_get_description) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: WritableDatabase_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_get_description" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    {
      try {
        result = ((Xapian::WritableDatabase const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_open_stub) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: open_stub(file);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_stub" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "open_stub" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = Xapian::Auto::open_stub((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_brass_open__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: brass_open(dir);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = Xapian::Brass::open((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_brass_open__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: brass_open(dir,action,block_size);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "brass_open" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "brass_open" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    {
      try {
        result = Xapian::Brass::open((std::string const &)*arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_brass_open__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: brass_open(dir,action);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "brass_open" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = Xapian::Brass::open((std::string const &)*arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_brass_open) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_brass_open__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_brass_open__SWIG_2); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_brass_open__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'brass_open'");
  XSRETURN(0);
}


XS(_wrap_chert_open__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: chert_open(dir);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = Xapian::Chert::open((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_chert_open__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: chert_open(dir,action,block_size);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "chert_open" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "chert_open" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    {
      try {
        result = Xapian::Chert::open((std::string const &)*arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_chert_open__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: chert_open(dir,action);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "chert_open" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = Xapian::Chert::open((std::string const &)*arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_chert_open) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_chert_open__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_chert_open__SWIG_2); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_chert_open__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'chert_open'");
  XSRETURN(0);
}


XS(_wrap_flint_open__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: flint_open(dir);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = Xapian::Flint::open((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_flint_open__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: flint_open(dir,action,block_size);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flint_open" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "flint_open" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    {
      try {
        result = Xapian::Flint::open((std::string const &)*arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_flint_open__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: flint_open(dir,action);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flint_open" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = Xapian::Flint::open((std::string const &)*arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_flint_open) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_flint_open__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_flint_open__SWIG_2); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_flint_open__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'flint_open'");
  XSRETURN(0);
}


XS(_wrap_inmemory_open) {
  {
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: inmemory_open();");
    }
    {
      try {
        result = Xapian::InMemory::open();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    unsigned int arg2 ;
    Xapian::timeout arg3 ;
    Xapian::timeout arg4 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: remote_open(host,port,timeout,connect_timeout);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "remote_open" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'");
    } 
    arg3 = static_cast< Xapian::timeout >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "remote_open" "', argument " "4"" of type '" "Xapian::timeout""'");
    } 
    arg4 = static_cast< Xapian::timeout >(val4);
    {
      try {
        result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    unsigned int arg2 ;
    Xapian::timeout arg3 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: remote_open(host,port,timeout);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "remote_open" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'");
    } 
    arg3 = static_cast< Xapian::timeout >(val3);
    {
      try {
        result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    unsigned int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: remote_open(host,port);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "remote_open" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    {
      try {
        result = Xapian::Remote::open((std::string const &)*arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open_writable__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    unsigned int arg2 ;
    Xapian::timeout arg3 ;
    Xapian::timeout arg4 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: remote_open_writable(host,port,timeout,connect_timeout);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "remote_open_writable" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'");
    } 
    arg3 = static_cast< Xapian::timeout >(val3);
    ecode4 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "remote_open_writable" "', argument " "4"" of type '" "Xapian::timeout""'");
    } 
    arg4 = static_cast< Xapian::timeout >(val4);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open_writable__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    unsigned int arg2 ;
    Xapian::timeout arg3 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: remote_open_writable(host,port,timeout);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "remote_open_writable" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'");
    } 
    arg3 = static_cast< Xapian::timeout >(val3);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open_writable__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    unsigned int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: remote_open_writable(host,port);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "remote_open_writable" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Xapian::timeout arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: remote_open(program,args,timeout);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'");
    } 
    arg3 = static_cast< Xapian::timeout >(val3);
    {
      try {
        result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: remote_open(program,args);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open__SWIG_1); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open__SWIG_3); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'remote_open'");
  XSRETURN(0);
}


XS(_wrap_remote_open_writable__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    Xapian::timeout arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: remote_open_writable(program,args,timeout);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'");
    } 
    arg3 = static_cast< Xapian::timeout >(val3);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open_writable__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: remote_open_writable(program,args);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_remote_open_writable) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open_writable__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open_writable__SWIG_4); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open_writable__SWIG_1); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open_writable__SWIG_3); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_remote_open_writable__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'remote_open_writable'");
  XSRETURN(0);
}


XS(_wrap_new_Query__SWIG_0) {
  {
    Xapian::Query *arg1 = 0 ;
    void *argp1 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Query(copyme);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__Query,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query((Xapian::Query const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_1) {
  {
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Query();");
    }
    {
      try {
        result = (Xapian::Query *)new Xapian::Query();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Query) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Query(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Query, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Query" "', argument " "1"" of type '" "Xapian::Query *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    Xapian::termcount arg2 ;
    Xapian::termpos arg3 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Query(tname_,wqf_,pos_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::termpos""'");
    } 
    arg3 = static_cast< Xapian::termpos >(val3);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    Xapian::termcount arg2 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Query(tname_,wqf_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Query(tname_);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_5) {
  {
    Xapian::Query::op arg1 ;
    Xapian::Query *arg2 = 0 ;
    Xapian::Query *arg3 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    void *argp3 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Query(op_,left,right);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Query,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Query * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__Query,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::Query const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::Query const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::Query * >(argp3);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,(Xapian::Query const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_6) {
  {
    Xapian::Query::op arg1 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Query(op_,left,right);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_9) {
  {
    Xapian::Query::op arg1 ;
    Xapian::Query arg2 ;
    double arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Query(op_,q,parameter);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    {
      res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Query,  0 );
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query""'"); 
      }  
      if (!argp2) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query""'");
      } else {
        arg2 = *(reinterpret_cast< Xapian::Query * >(argp2));
      }
    }
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Query" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_10) {
  {
    Xapian::Query::op arg1 ;
    Xapian::valueno arg2 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int res3 = SWIG_OLDOBJ ;
    int res4 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_Query(op_,slot,begin,end);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr);
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Query" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      arg4 = ptr;
    }
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    if (SWIG_IsNewObj(res4)) delete arg4;
    XSRETURN(argvi);
  fail:
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    if (SWIG_IsNewObj(res4)) delete arg4;
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_11) {
  {
    Xapian::Query::op arg1 ;
    Xapian::valueno arg2 ;
    std::string *arg3 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Query(op_,slot,value);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_12) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Query(external_source);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_get_length) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_get_length(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_length" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_get_terms_begin) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_get_terms_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_terms_begin" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        result = ((Xapian::Query const *)arg1)->get_terms_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_get_terms_end) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_get_terms_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_terms_end" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        result = ((Xapian::Query const *)arg1)->get_terms_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_empty) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_empty" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        result = (bool)((Xapian::Query const *)arg1)->empty();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_serialise) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_serialise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_serialise" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        result = ((Xapian::Query const *)arg1)->serialise();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_unserialise__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_unserialise(s);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = Xapian::Query::unserialise((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_Query_unserialise__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    Xapian::Registry *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Query_unserialise(s,registry);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Registry,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Query_unserialise" "', argument " "2"" of type '" "Xapian::Registry const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Query_unserialise" "', argument " "2"" of type '" "Xapian::Registry const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Registry * >(argp2);
    {
      try {
        result = Xapian::Query::unserialise((std::string const &)*arg1,(Xapian::Registry const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_unserialise) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Registry, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Query_unserialise__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_Query_unserialise__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Query_unserialise'");
  XSRETURN(0);
}


XS(_wrap_Query_get_description) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_description" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        result = ((Xapian::Query const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_13) {
  {
    Xapian::Query::op arg1 ;
    std::vector< std::string > *arg2 = 0 ;
    Xapian::termcount arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Query(op,subqs,param);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__vectorT_std__string_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "std::vector< std::string > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "std::vector< std::string > const &""'"); 
    }
    arg2 = reinterpret_cast< std::vector< std::string > * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< std::string > const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_14) {
  {
    Xapian::Query::op arg1 ;
    std::vector< std::string > *arg2 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Query(op,subqs);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__vectorT_std__string_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "std::vector< std::string > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "std::vector< std::string > const &""'"); 
    }
    arg2 = reinterpret_cast< std::vector< std::string > * >(argp2);
    {
      try {
        result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< std::string > const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_15) {
  {
    Xapian::Query::op arg1 ;
    std::vector< Xapian::Query > *arg2 = 0 ;
    Xapian::termcount arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Query(op,subqs,param);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__vectorT_Xapian__Query_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "std::vector< Xapian::Query > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "std::vector< Xapian::Query > const &""'"); 
    }
    arg2 = reinterpret_cast< std::vector< Xapian::Query > * >(argp2);
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (Xapian::Query *)new_Xapian_Query__SWIG_15(arg1,(std::vector< Xapian::Query > const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_16) {
  {
    Xapian::Query::op arg1 ;
    std::vector< Xapian::Query > *arg2 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Query(op,subqs);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
    } 
    arg1 = static_cast< Xapian::Query::op >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__vectorT_Xapian__Query_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "std::vector< Xapian::Query > const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "std::vector< Xapian::Query > const &""'"); 
    }
    arg2 = reinterpret_cast< std::vector< Xapian::Query > * >(argp2);
    {
      try {
        result = (Xapian::Query *)new_Xapian_Query__SWIG_15(arg1,(std::vector< Xapian::Query > const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 0) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Query, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__PostingSource, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__vectorT_std__string_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__vectorT_Xapian__Query_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Query, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__Query, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__vectorT_std__string_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_9;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 9;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_9:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Query, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 10;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_10:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_std__vectorT_Xapian__Query_t, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_11;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 11;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_11:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_12;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 12;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_12:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 13;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_13:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_14;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 14;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_14:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 15;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_15:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_0); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_12); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_4); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_14); return;
    case 6:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_16); return;
    case 7:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_3); return;
    case 8:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_5); return;
    case 9:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_13); return;
    case 10:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_9); return;
    case 11:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_15); return;
    case 12:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_11); return;
    case 13:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_6); return;
    case 14:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_2); return;
    case 15:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Query__SWIG_10); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Query'");
  XSRETURN(0);
}


XS(_wrap_Stopper___call__) {
  {
    Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Stopper___call__(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stopper___call__" "', argument " "1"" of type '" "Xapian::Stopper const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stopper___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stopper___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (bool)((Xapian::Stopper const *)arg1)->operator ()((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Stopper) {
  {
    Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Stopper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Stopper, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stopper" "', argument " "1"" of type '" "Xapian::Stopper *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Stopper_get_description) {
  {
    Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Stopper_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stopper_get_description" "', argument " "1"" of type '" "Xapian::Stopper const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
    {
      try {
        result = ((Xapian::Stopper const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimpleStopper) {
  {
    int argvi = 0;
    Xapian::SimpleStopper *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_SimpleStopper();");
    }
    {
      try {
        result = (Xapian::SimpleStopper *)new Xapian::SimpleStopper();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SimpleStopper, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_SimpleStopper_add) {
  {
    Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SimpleStopper_add(self,word);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleStopper_add" "', argument " "1"" of type '" "Xapian::SimpleStopper *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimpleStopper_add" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleStopper_add" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->add((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_SimpleStopper___call__) {
  {
    Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SimpleStopper___call__(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleStopper___call__" "', argument " "1"" of type '" "Xapian::SimpleStopper const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimpleStopper___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleStopper___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (bool)((Xapian::SimpleStopper const *)arg1)->operator ()((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_SimpleStopper_get_description) {
  {
    Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SimpleStopper_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleStopper_get_description" "', argument " "1"" of type '" "Xapian::SimpleStopper const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
    {
      try {
        result = ((Xapian::SimpleStopper const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SimpleStopper_stop_word) {
  {
    Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
    std::string arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: SimpleStopper_stop_word(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleStopper_stop_word" "', argument " "1"" of type '" "Xapian::SimpleStopper *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "SimpleStopper_stop_word" "', argument " "2"" of type '" "std::string""'"); 
      }
      arg2 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    result = (bool)Xapian_SimpleStopper_stop_word(arg1,arg2);
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_SimpleStopper) {
  {
    Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_SimpleStopper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__SimpleStopper, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleStopper" "', argument " "1"" of type '" "Xapian::SimpleStopper *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ValueRangeProcessor) {
  {
    Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ValueRangeProcessor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueRangeProcessor" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueRangeProcessor___call__) {
  {
    Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::valueno result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: ValueRangeProcessor___call__(self,begin,end);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueRangeProcessor___call__" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); 
    }
    arg2 = reinterpret_cast< std::string * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__string,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); 
    }
    arg3 = reinterpret_cast< std::string * >(argp3);
    {
      try {
        result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StringValueRangeProcessor__SWIG_0) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::StringValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_StringValueRangeProcessor(slot_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StringValueRangeProcessor__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::StringValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_StringValueRangeProcessor(slot_,str_,prefix_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StringValueRangeProcessor" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_StringValueRangeProcessor__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::StringValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_StringValueRangeProcessor(slot_,str_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_StringValueRangeProcessor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StringValueRangeProcessor__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StringValueRangeProcessor__SWIG_2); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_StringValueRangeProcessor__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_StringValueRangeProcessor'");
  XSRETURN(0);
}


XS(_wrap_StringValueRangeProcessor___call__) {
  {
    Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::valueno result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StringValueRangeProcessor___call__(self,begin,end);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__StringValueRangeProcessor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringValueRangeProcessor___call__" "', argument " "1"" of type '" "Xapian::StringValueRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::StringValueRangeProcessor * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); 
    }
    arg2 = reinterpret_cast< std::string * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__string,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); 
    }
    arg3 = reinterpret_cast< std::string * >(argp3);
    {
      try {
        result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StringValueRangeProcessor) {
  {
    Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StringValueRangeProcessor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::StringValueRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::StringValueRangeProcessor * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateValueRangeProcessor__SWIG_0) {
  {
    Xapian::valueno arg1 ;
    bool arg2 ;
    int arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DateValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DateValueRangeProcessor(slot_,prefer_mdy_,epoch_year_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    {
      try {
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateValueRangeProcessor__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    bool arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DateValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DateValueRangeProcessor(slot_,prefer_mdy_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateValueRangeProcessor__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::DateValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DateValueRangeProcessor(slot_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateValueRangeProcessor__SWIG_3) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    int arg5 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::DateValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_DateValueRangeProcessor(slot_,str_,prefix_,prefer_mdy_,epoch_year_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DateValueRangeProcessor" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    ecode5 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_DateValueRangeProcessor" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
    {
      try {
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateValueRangeProcessor__SWIG_4) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    bool arg4 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::DateValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DateValueRangeProcessor(slot_,str_,prefix_,prefer_mdy_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DateValueRangeProcessor" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateValueRangeProcessor__SWIG_5) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DateValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DateValueRangeProcessor(slot_,str_,prefix_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateValueRangeProcessor__SWIG_6) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DateValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DateValueRangeProcessor(slot_,str_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateValueRangeProcessor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_1); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_6); return;
    case 4:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_0); return;
    case 5:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_5); return;
    case 6:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_4); return;
    case 7:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DateValueRangeProcessor'");
  XSRETURN(0);
}


XS(_wrap_DateValueRangeProcessor___call__) {
  {
    Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::valueno result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DateValueRangeProcessor___call__(self,begin,end);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DateValueRangeProcessor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateValueRangeProcessor___call__" "', argument " "1"" of type '" "Xapian::DateValueRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DateValueRangeProcessor * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DateValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); 
    }
    arg2 = reinterpret_cast< std::string * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__string,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DateValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); 
    }
    arg3 = reinterpret_cast< std::string * >(argp3);
    {
      try {
        result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_DateValueRangeProcessor) {
  {
    Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DateValueRangeProcessor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::DateValueRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DateValueRangeProcessor * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumberValueRangeProcessor__SWIG_0) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::NumberValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NumberValueRangeProcessor(slot_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumberValueRangeProcessor__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    bool arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::NumberValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_NumberValueRangeProcessor(slot_,str_,prefix_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NumberValueRangeProcessor" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumberValueRangeProcessor__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::NumberValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NumberValueRangeProcessor(slot_,str_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumberValueRangeProcessor) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NumberValueRangeProcessor__SWIG_0); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NumberValueRangeProcessor__SWIG_2); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_NumberValueRangeProcessor__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NumberValueRangeProcessor'");
  XSRETURN(0);
}


XS(_wrap_NumberValueRangeProcessor___call__) {
  {
    Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::valueno result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: NumberValueRangeProcessor___call__(self,begin,end);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NumberValueRangeProcessor___call__" "', argument " "1"" of type '" "Xapian::NumberValueRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::NumberValueRangeProcessor * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_std__string,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NumberValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NumberValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'"); 
    }
    arg2 = reinterpret_cast< std::string * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_std__string,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NumberValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NumberValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'"); 
    }
    arg3 = reinterpret_cast< std::string * >(argp3);
    {
      try {
        result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_NumberValueRangeProcessor) {
  {
    Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NumberValueRangeProcessor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::NumberValueRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::NumberValueRangeProcessor * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_QueryParser) {
  {
    int argvi = 0;
    Xapian::QueryParser *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_QueryParser();");
    }
    {
      try {
        result = (Xapian::QueryParser *)new Xapian::QueryParser();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParser, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_QueryParser) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_QueryParser(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QueryParser" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_stemmer) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::Stem *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_set_stemmer(self,stemmer);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_stemmer" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Stem,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Stem * >(argp2);
    {
      try {
        (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_stemming_strategy) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::QueryParser::stem_strategy arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_set_stemming_strategy(self,strategy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_stemming_strategy" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QueryParser_set_stemming_strategy" "', argument " "2"" of type '" "Xapian::QueryParser::stem_strategy""'");
    } 
    arg2 = static_cast< Xapian::QueryParser::stem_strategy >(val2);
    {
      try {
        (arg1)->set_stemming_strategy(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_stopper__SWIG_0) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_set_stopper(self,stop);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_stopper" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_set_stopper" "', argument " "2"" of type '" "Xapian::Stopper const *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Stopper * >(argp2);
    {
      try {
        (arg1)->set_stopper((Xapian::Stopper const *)arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_stopper__SWIG_1) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QueryParser_set_stopper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_stopper" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      try {
        (arg1)->set_stopper();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_stopper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Stopper, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_QueryParser_set_stopper__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_QueryParser_set_stopper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'QueryParser_set_stopper'");
  XSRETURN(0);
}


XS(_wrap_QueryParser_set_default_op) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::Query::op arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_set_default_op(self,default_op);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_default_op" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QueryParser_set_default_op" "', argument " "2"" of type '" "Xapian::Query::op""'");
    } 
    arg2 = static_cast< Xapian::Query::op >(val2);
    {
      try {
        (arg1)->set_default_op(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_get_default_op) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Query::op result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QueryParser_get_default_op(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_get_default_op" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      try {
        result = (Xapian::Query::op)((Xapian::QueryParser const *)arg1)->get_default_op();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_database) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::Database *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_set_database(self,db);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_database" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_set_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_set_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Database * >(argp2);
    {
      try {
        (arg1)->set_database((Xapian::Database const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_max_wildcard_expansion) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::termcount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_set_max_wildcard_expansion(self,limit);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_max_wildcard_expansion" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QueryParser_set_max_wildcard_expansion" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        (arg1)->set_max_wildcard_expansion(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_parse_query__SWIG_0) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    std::string *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int res4 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: QueryParser_parse_query(self,query_string,flags,default_prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "QueryParser_parse_query" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      std::string *ptr = (std::string *)0;
      res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr);
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "QueryParser_parse_query" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      arg4 = ptr;
    }
    {
      try {
        result = (arg1)->parse_query((std::string const &)*arg2,arg3,(std::string const &)*arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    if (SWIG_IsNewObj(res4)) delete arg4;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    if (SWIG_IsNewObj(res4)) delete arg4;
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_parse_query__SWIG_1) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QueryParser_parse_query(self,query_string,flags);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "QueryParser_parse_query" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        result = (arg1)->parse_query((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_parse_query__SWIG_2) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_parse_query(self,query_string);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (arg1)->parse_query((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_parse_query) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_QueryParser_parse_query__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_QueryParser_parse_query__SWIG_1); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_QueryParser_parse_query__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'QueryParser_parse_query'");
  XSRETURN(0);
}


XS(_wrap_QueryParser_add_prefix) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QueryParser_add_prefix(self,field,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_add_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_add_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "QueryParser_add_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        (arg1)->add_prefix((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_boolean_prefix__SWIG_0) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    bool val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: QueryParser_add_boolean_prefix(self,field,prefix,exclusive);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_add_boolean_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    ecode4 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "QueryParser_add_boolean_prefix" "', argument " "4"" of type '" "bool""'");
    } 
    arg4 = static_cast< bool >(val4);
    {
      try {
        (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_boolean_prefix__SWIG_1) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QueryParser_add_boolean_prefix(self,field,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_add_boolean_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_boolean_prefix) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_QueryParser_add_boolean_prefix__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_QueryParser_add_boolean_prefix__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'QueryParser_add_boolean_prefix'");
  XSRETURN(0);
}


XS(_wrap_QueryParser_stoplist_begin) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QueryParser_stoplist_begin(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_stoplist_begin" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      try {
        result = ((Xapian::QueryParser const *)arg1)->stoplist_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_stoplist_end) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QueryParser_stoplist_end(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_stoplist_end" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      try {
        result = ((Xapian::QueryParser const *)arg1)->stoplist_end();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_unstem_begin) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_unstem_begin(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_unstem_begin" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_unstem_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_unstem_begin" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::QueryParser const *)arg1)->unstem_begin((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_unstem_end) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_unstem_end(self,std::string const &);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_unstem_end" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_unstem_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_unstem_end" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_valuerangeprocessor) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::ValueRangeProcessor *arg2 = (Xapian::ValueRangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_add_valuerangeprocessor(self,vrproc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_add_valuerangeprocessor" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_add_valuerangeprocessor" "', argument " "2"" of type '" "Xapian::ValueRangeProcessor *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp2);
    {
      try {
        (arg1)->add_valuerangeprocessor(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_get_corrected_query_string) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QueryParser_get_corrected_query_string(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_get_corrected_query_string" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      try {
        result = ((Xapian::QueryParser const *)arg1)->get_corrected_query_string();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_get_description) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: QueryParser_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_get_description" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      try {
        result = ((Xapian::QueryParser const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_sortable_serialise) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: sortable_serialise(value);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sortable_serialise" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = Xapian::sortable_serialise(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_sortable_unserialise) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: sortable_unserialise(value);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sortable_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sortable_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (double)Xapian::sortable_unserialise((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_Stem__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Stem *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Stem(language);");
    }
    {
      std::string *ptr = (std::string *)0;
      res1 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), &ptr);
      if (!SWIG_IsOK(res1)) {
        SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stem" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Stem" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stem, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_new_Stem__SWIG_1) {
  {
    Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Stem *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Stem(p);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stem" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
    {
      try {
        result = (Xapian::Stem *)new Xapian::Stem(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stem, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Stem) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__StemImplementation, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Stem__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_new_Stem__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Stem'");
  XSRETURN(0);
}


XS(_wrap_delete_Stem) {
  {
    Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Stem(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stem" "', argument " "1"" of type '" "Xapian::Stem *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Stem___call__) {
  {
    Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Stem___call__(self,word);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stem___call__" "', argument " "1"" of type '" "Xapian::Stem const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stem___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stem___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::Stem const *)arg1)->operator ()((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Stem_get_description) {
  {
    Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Stem_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stem_get_description" "', argument " "1"" of type '" "Xapian::Stem const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
    {
      try {
        result = ((Xapian::Stem const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Stem_get_available_languages) {
  {
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: Stem_get_available_languages();");
    }
    {
      try {
        result = Xapian::Stem::get_available_languages();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_Stem_stem_word) {
  {
    Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
    std::string arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Stem_stem_word(self,word);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stem_stem_word" "', argument " "1"" of type '" "Xapian::Stem *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res) || !ptr) {
        SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "Stem_stem_word" "', argument " "2"" of type '" "std::string""'"); 
      }
      arg2 = *ptr;
      if (SWIG_IsNewObj(res)) delete ptr;
    }
    result = Xapian_Stem_stem_word(arg1,arg2);
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TermGenerator) {
  {
    int argvi = 0;
    Xapian::TermGenerator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TermGenerator();");
    }
    {
      try {
        result = (Xapian::TermGenerator *)new Xapian::TermGenerator();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermGenerator, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_TermGenerator) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TermGenerator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TermGenerator" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_stemmer) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::Stem *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_set_stemmer(self,stemmer);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_stemmer" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Stem,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Stem * >(argp2);
    {
      try {
        (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_stopper__SWIG_0) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_set_stopper(self,stop);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_stopper" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_stopper" "', argument " "2"" of type '" "Xapian::Stopper const *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Stopper * >(argp2);
    {
      try {
        (arg1)->set_stopper((Xapian::Stopper const *)arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_stopper__SWIG_1) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermGenerator_set_stopper(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_stopper" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      try {
        (arg1)->set_stopper();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_stopper) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Stopper, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_set_stopper__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_set_stopper__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'TermGenerator_set_stopper'");
  XSRETURN(0);
}


XS(_wrap_TermGenerator_set_document) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_set_document(self,doc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_document" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_set_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    {
      try {
        (arg1)->set_document((Xapian::Document const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_get_document) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Document *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermGenerator_get_document(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_get_document" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      try {
        result = (Xapian::Document *) &((Xapian::TermGenerator const *)arg1)->get_document();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_database) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::WritableDatabase *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_set_database(self,db);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_database" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__WritableDatabase,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_database" "', argument " "2"" of type '" "Xapian::WritableDatabase const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_set_database" "', argument " "2"" of type '" "Xapian::WritableDatabase const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::WritableDatabase * >(argp2);
    {
      try {
        (arg1)->set_database((Xapian::WritableDatabase const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_flags__SWIG_0) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::TermGenerator::flags arg2 ;
    Xapian::TermGenerator::flags arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::TermGenerator::flags result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: TermGenerator_set_flags(self,toggle,mask);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_flags" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_set_flags" "', argument " "2"" of type '" "Xapian::TermGenerator::flags""'");
    } 
    arg2 = static_cast< Xapian::TermGenerator::flags >(val2);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_set_flags" "', argument " "3"" of type '" "Xapian::TermGenerator::flags""'");
    } 
    arg3 = static_cast< Xapian::TermGenerator::flags >(val3);
    {
      try {
        result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_flags__SWIG_1) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::TermGenerator::flags arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::TermGenerator::flags result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_set_flags(self,toggle);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_flags" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_set_flags" "', argument " "2"" of type '" "Xapian::TermGenerator::flags""'");
    } 
    arg2 = static_cast< Xapian::TermGenerator::flags >(val2);
    {
      try {
        result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_flags) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_set_flags__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_set_flags__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'TermGenerator_set_flags'");
  XSRETURN(0);
}


XS(_wrap_TermGenerator_set_stemming_strategy) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::TermGenerator::stem_strategy arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_set_stemming_strategy(self,strategy);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_stemming_strategy" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_set_stemming_strategy" "', argument " "2"" of type '" "Xapian::TermGenerator::stem_strategy""'");
    } 
    arg2 = static_cast< Xapian::TermGenerator::stem_strategy >(val2);
    {
      try {
        (arg1)->set_stemming_strategy(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_index_text__SWIG_0) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    std::string *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int res4 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: TermGenerator_index_text(self,text,wdf_inc,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_index_text" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      std::string *ptr = (std::string *)0;
      res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr);
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "TermGenerator_index_text" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      arg4 = ptr;
    }
    {
      try {
        (arg1)->index_text((std::string const &)*arg2,arg3,(std::string const &)*arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    if (SWIG_IsNewObj(res4)) delete arg4;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    if (SWIG_IsNewObj(res4)) delete arg4;
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_index_text__SWIG_1) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: TermGenerator_index_text(self,text,wdf_inc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_index_text" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        (arg1)->index_text((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_index_text__SWIG_2) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_index_text(self,text);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->index_text((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_index_text) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_index_text__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_index_text__SWIG_1); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_index_text__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'TermGenerator_index_text'");
  XSRETURN(0);
}


XS(_wrap_TermGenerator_index_text_without_positions__SWIG_0) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    std::string *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int res4 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: TermGenerator_index_text_without_positions(self,text,wdf_inc,prefix);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_index_text_without_positions" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      std::string *ptr = (std::string *)0;
      res4 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), &ptr);
      if (!SWIG_IsOK(res4)) {
        SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "TermGenerator_index_text_without_positions" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      arg4 = ptr;
    }
    {
      try {
        (arg1)->index_text_without_positions((std::string const &)*arg2,arg3,(std::string const &)*arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    if (SWIG_IsNewObj(res4)) delete arg4;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    if (SWIG_IsNewObj(res4)) delete arg4;
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_index_text_without_positions__SWIG_1) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: TermGenerator_index_text_without_positions(self,text,wdf_inc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_index_text_without_positions" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        (arg1)->index_text_without_positions((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_index_text_without_positions__SWIG_2) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_index_text_without_positions(self,text);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->index_text_without_positions((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_index_text_without_positions) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 4) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(3), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_index_text_without_positions__SWIG_2); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_index_text_without_positions__SWIG_1); return;
    case 3:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_index_text_without_positions__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'TermGenerator_index_text_without_positions'");
  XSRETURN(0);
}


XS(_wrap_TermGenerator_increase_termpos__SWIG_0) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::termcount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_increase_termpos(self,delta);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_increase_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_increase_termpos" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        (arg1)->increase_termpos(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_increase_termpos__SWIG_1) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermGenerator_increase_termpos(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_increase_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      try {
        (arg1)->increase_termpos();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_increase_termpos) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 1) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_increase_termpos__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_TermGenerator_increase_termpos__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'TermGenerator_increase_termpos'");
  XSRETURN(0);
}


XS(_wrap_TermGenerator_get_termpos) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::termcount result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermGenerator_get_termpos(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_get_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::TermGenerator const *)arg1)->get_termpos();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_termpos) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::termcount arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: TermGenerator_set_termpos(self,termpos);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_set_termpos" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        (arg1)->set_termpos(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_get_description) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TermGenerator_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_get_description" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
    {
      try {
        result = ((Xapian::TermGenerator const *)arg1)->get_description();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_KeyMaker___call__) {
  {
    Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KeyMaker___call__(self,doc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KeyMaker___call__" "', argument " "1"" of type '" "Xapian::KeyMaker const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "KeyMaker___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "KeyMaker___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    {
      try {
        result = ((Xapian::KeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_KeyMaker) {
  {
    Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_KeyMaker(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__KeyMaker, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KeyMaker" "', argument " "1"" of type '" "Xapian::KeyMaker *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MultiValueKeyMaker) {
  {
    int argvi = 0;
    Xapian::MultiValueKeyMaker *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MultiValueKeyMaker();");
    }
    {
      try {
        result = (Xapian::MultiValueKeyMaker *)new Xapian::MultiValueKeyMaker();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MultiValueKeyMaker, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueKeyMaker___call__) {
  {
    Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultiValueKeyMaker___call__(self,doc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueKeyMaker___call__" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiValueKeyMaker___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiValueKeyMaker___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    {
      try {
        result = ((Xapian::MultiValueKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueKeyMaker_add_value__SWIG_0) {
  {
    Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
    Xapian::valueno arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MultiValueKeyMaker_add_value(self,slot,reverse);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueKeyMaker_add_value" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiValueKeyMaker_add_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiValueKeyMaker_add_value" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        (arg1)->add_value(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueKeyMaker_add_value__SWIG_1) {
  {
    Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultiValueKeyMaker_add_value(self,slot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueKeyMaker_add_value" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiValueKeyMaker_add_value" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        (arg1)->add_value(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueKeyMaker_add_value) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MultiValueKeyMaker_add_value__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MultiValueKeyMaker_add_value__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MultiValueKeyMaker_add_value'");
  XSRETURN(0);
}


XS(_wrap_delete_MultiValueKeyMaker) {
  {
    Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MultiValueKeyMaker(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiValueKeyMaker" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Sorter) {
  {
    Xapian::Sorter *arg1 = (Xapian::Sorter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Sorter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Sorter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Sorter" "', argument " "1"" of type '" "Xapian::Sorter *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Sorter * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_MultiValueSorter) {
  {
    int argvi = 0;
    Xapian::MultiValueSorter *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_MultiValueSorter();");
    }
    {
      try {
        result = (Xapian::MultiValueSorter *)new Xapian::MultiValueSorter();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MultiValueSorter, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueSorter___call__) {
  {
    Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultiValueSorter___call__(self,doc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueSorter___call__" "', argument " "1"" of type '" "Xapian::MultiValueSorter const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiValueSorter___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiValueSorter___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    {
      try {
        result = ((Xapian::MultiValueSorter const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueSorter_add__SWIG_0) {
  {
    Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
    Xapian::valueno arg2 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MultiValueSorter_add(self,slot,forward);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueSorter_add" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiValueSorter_add" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    ecode3 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiValueSorter_add" "', argument " "3"" of type '" "bool""'");
    } 
    arg3 = static_cast< bool >(val3);
    {
      try {
        (arg1)->add(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueSorter_add__SWIG_1) {
  {
    Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
    Xapian::valueno arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MultiValueSorter_add(self,slot);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueSorter_add" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
    ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiValueSorter_add" "', argument " "2"" of type '" "Xapian::valueno""'");
    } 
    arg2 = static_cast< Xapian::valueno >(val2);
    {
      try {
        (arg1)->add(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueSorter_add) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MultiValueSorter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__MultiValueSorter, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MultiValueSorter_add__SWIG_1); return;
    case 2:
      ++PL_markstack_ptr; SWIG_CALLXS(_wrap_MultiValueSorter_add__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MultiValueSorter_add'");
  XSRETURN(0);
}


XS(_wrap_delete_MultiValueSorter) {
  {
    Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MultiValueSorter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiValueSorter" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ValueSetMatchDecider) {
  {
    Xapian::valueno arg1 ;
    bool arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::ValueSetMatchDecider *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ValueSetMatchDecider(slot,inclusive_);");
    }
    ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValueSetMatchDecider" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ValueSetMatchDecider" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (Xapian::ValueSetMatchDecider *)new Xapian::ValueSetMatchDecider(arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueSetMatchDecider, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValueSetMatchDecider_add_value) {
  {
    Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueSetMatchDecider_add_value(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueSetMatchDecider_add_value" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueSetMatchDecider_add_value" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueSetMatchDecider_add_value" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->add_value((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_ValueSetMatchDecider_remove_value) {
  {
    Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueSetMatchDecider_remove_value(self,value);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueSetMatchDecider_remove_value" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueSetMatchDecider_remove_value" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueSetMatchDecider_remove_value" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->remove_value((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_ValueSetMatchDecider___call__) {
  {
    Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ValueSetMatchDecider___call__(self,doc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueSetMatchDecider___call__" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueSetMatchDecider___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueSetMatchDecider___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    {
      try {
        result = (bool)((Xapian::ValueSetMatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_ValueSetMatchDecider) {
  {
    Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ValueSetMatchDecider(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueSetMatchDecider" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Compactor) {
  {
    int argvi = 0;
    Xapian::Compactor *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Compactor();");
    }
    {
      try {
        result = (Xapian::Compactor *)new Xapian::Compactor();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Compactor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Compactor) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Compactor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Compactor" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_set_block_size) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    size_t arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Compactor_set_block_size(self,block_size);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_set_block_size" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    ecode2 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Compactor_set_block_size" "', argument " "2"" of type '" "size_t""'");
    } 
    arg2 = static_cast< size_t >(val2);
    {
      try {
        (arg1)->set_block_size(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_set_renumber) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    bool arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Compactor_set_renumber(self,renumber);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_set_renumber" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Compactor_set_renumber" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        (arg1)->set_renumber(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_set_multipass) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    bool arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Compactor_set_multipass(self,multipass);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_set_multipass" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    ecode2 = SWIG_AsVal_bool SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Compactor_set_multipass" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        (arg1)->set_multipass(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_set_compaction_level) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    Xapian::Compactor::compaction_level arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Compactor_set_compaction_level(self,compaction);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_set_compaction_level" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Compactor_set_compaction_level" "', argument " "2"" of type '" "Xapian::Compactor::compaction_level""'");
    } 
    arg2 = static_cast< Xapian::Compactor::compaction_level >(val2);
    {
      try {
        (arg1)->set_compaction_level(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_set_destdir) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Compactor_set_destdir(self,destdir);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_set_destdir" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Compactor_set_destdir" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_set_destdir" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->set_destdir((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_add_source) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Compactor_add_source(self,srcdir);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_add_source" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Compactor_add_source" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_add_source" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->add_source((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_compact) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Compactor_compact(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_compact" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    {
      try {
        (arg1)->compact();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_set_status) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Compactor_set_status(self,table,status);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_set_status" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Compactor_set_status" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_set_status" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res3 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), &ptr);
      if (!SWIG_IsOK(res3)) {
        SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Compactor_set_status" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_set_status" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        (arg1)->set_status((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = sv_newmortal();
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_Compactor_resolve_duplicate_metadata) {
  {
    Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
    std::string *arg2 = 0 ;
    size_t arg3 ;
    std::string *arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Compactor_resolve_duplicate_metadata(self,key,num_tags,tags);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
    {
      std::string *ptr = (std::string *)0;
      res2 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), &ptr);
      if (!SWIG_IsOK(res2)) {
        SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    ecode3 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "3"" of type '" "size_t""'");
    } 
    arg3 = static_cast< size_t >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_std__string, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "4"" of type '" "std::string const []""'"); 
    } 
    arg4 = reinterpret_cast< std::string * >(argp4);
    {
      try {
        result = (arg1)->resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_std_string  SWIG_PERL_CALL_ARGS_1(static_cast< std::string >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}



/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_Xapian__WritableDatabaseTo_p_Xapian__Database(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Database *)  ((Xapian::WritableDatabase *) x));
}
static void *_p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchDecider *)  ((Xapian::ValueSetMatchDecider *) x));
}
static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__NetworkError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::NetworkError *)  ((Xapian::NetworkTimeoutError *) x));
}
static void *_p_Xapian__MultiValueSorterTo_p_Xapian__Sorter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Sorter *)  ((Xapian::MultiValueSorter *) x));
}
static void *_p_Xapian__SorterTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *)  ((Xapian::Sorter *) x));
}
static void *_p_Xapian__MultiValueSorterTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *) (Xapian::Sorter *) ((Xapian::MultiValueSorter *) x));
}
static void *_p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *)  ((Xapian::MultiValueKeyMaker *) x));
}
static void *_p_Xapian__AssertionErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::AssertionError *) x));
}
static void *_p_Xapian__InvalidOperationErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::InvalidOperationError *) x));
}
static void *_p_Xapian__UnimplementedErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::UnimplementedError *) x));
}
static void *_p_Xapian__InvalidArgumentErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::InvalidArgumentError *) x));
}
static void *_p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::ValuePostingSource *) x));
}
static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueWeightPostingSource *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *)(Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueMapPostingSource *) x));
}
static void *_p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::FixedWeightPostingSource *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueWeightPostingSource *)  ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueWeightPostingSource *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *) (Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueMapPostingSource *) x));
}
static void *_p_Xapian__BoolWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BoolWeight *) x));
}
static void *_p_Xapian__TradWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TradWeight *) x));
}
static void *_p_Xapian__BM25WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BM25Weight *) x));
}
static void *_p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchSpy *)  ((Xapian::ValueCountMatchSpy *) x));
}
static void *_p_Xapian__SimpleStopperTo_p_Xapian__Stopper(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Stopper *)  ((Xapian::SimpleStopper *) x));
}
static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseOpeningError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseOpeningError *)  ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *) (Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseLockError *) x));
}
static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseModifiedError *) x));
}
static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseOpeningError *) x));
}
static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseCreateError *) x));
}
static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseCorruptError *) x));
}
static void *_p_Xapian__DocNotFoundErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::DocNotFoundError *) x));
}
static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) x));
}
static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::NetworkError *) ((Xapian::NetworkTimeoutError *) x));
}
static void *_p_Xapian__FeatureUnavailableErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::FeatureUnavailableError *) x));
}
static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) x));
}
static void *_p_Xapian__InternalErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::InternalError *) x));
}
static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseModifiedError *) x));
}
static void *_p_Xapian__DatabaseErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::DatabaseError *) x));
}
static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseOpeningError *) x));
}
static void *_p_Xapian__RangeErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::RangeError *) x));
}
static void *_p_Xapian__SerialisationErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::SerialisationError *) x));
}
static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__NetworkErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::NetworkError *) x));
}
static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseCorruptError *) x));
}
static void *_p_Xapian__QueryParserErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::QueryParserError *) x));
}
static void *_p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *)  ((Xapian::StringValueRangeProcessor *) x));
}
static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::DateValueRangeProcessor *) x));
}
static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::NumberValueRangeProcessor *) x));
}
static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::StringValueRangeProcessor *)  ((Xapian::DateValueRangeProcessor *) x));
}
static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::StringValueRangeProcessor *)  ((Xapian::NumberValueRangeProcessor *) x));
}
static void *_p_Xapian__DocNotFoundErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::DocNotFoundError *) x));
}
static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) x));
}
static void *_p_Xapian__LogicErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *)  ((Xapian::LogicError *) x));
}
static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) x));
}
static void *_p_Xapian__FeatureUnavailableErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::FeatureUnavailableError *) x));
}
static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::NetworkError *) ((Xapian::NetworkTimeoutError *) x));
}
static void *_p_Xapian__InternalErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::InternalError *) x));
}
static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseModifiedError *) x));
}
static void *_p_Xapian__UnimplementedErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::UnimplementedError *) x));
}
static void *_p_Xapian__DatabaseErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::DatabaseError *) x));
}
static void *_p_Xapian__RuntimeErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *)  ((Xapian::RuntimeError *) x));
}
static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseOpeningError *) x));
}
static void *_p_Xapian__RangeErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::RangeError *) x));
}
static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__InvalidOperationErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::InvalidOperationError *) x));
}
static void *_p_Xapian__AssertionErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::AssertionError *) x));
}
static void *_p_Xapian__SerialisationErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::SerialisationError *) x));
}
static void *_p_Xapian__NetworkErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::NetworkError *) x));
}
static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseCorruptError *) x));
}
static void *_p_Xapian__InvalidArgumentErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::InvalidArgumentError *) x));
}
static void *_p_Xapian__QueryParserErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::QueryParserError *) x));
}
static swig_type_info _swigt__p_Xapian__AssertionError = {"_p_Xapian__AssertionError", "Xapian::AssertionError *", 0, 0, (void*)"Search::Xapian::AssertionError", 0};
static swig_type_info _swigt__p_Xapian__BM25Weight = {"_p_Xapian__BM25Weight", "Xapian::BM25Weight *", 0, 0, (void*)"Search::Xapian::BM25Weight", 0};
static swig_type_info _swigt__p_Xapian__BoolWeight = {"_p_Xapian__BoolWeight", "Xapian::BoolWeight *", 0, 0, (void*)"Search::Xapian::BoolWeight", 0};
static swig_type_info _swigt__p_Xapian__Compactor = {"_p_Xapian__Compactor", "Xapian::Compactor *", 0, 0, (void*)"Search::Xapian::Compactor", 0};
static swig_type_info _swigt__p_Xapian__Database = {"_p_Xapian__Database", "Xapian::Database *", 0, 0, (void*)"Search::Xapian::Database", 0};
static swig_type_info _swigt__p_Xapian__DatabaseCorruptError = {"_p_Xapian__DatabaseCorruptError", "Xapian::DatabaseCorruptError *", 0, 0, (void*)"Search::Xapian::DatabaseCorruptError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseCreateError = {"_p_Xapian__DatabaseCreateError", "Xapian::DatabaseCreateError *", 0, 0, (void*)"Search::Xapian::DatabaseCreateError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseError = {"_p_Xapian__DatabaseError", "Xapian::DatabaseError *", 0, 0, (void*)"Search::Xapian::DatabaseError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseLockError = {"_p_Xapian__DatabaseLockError", "Xapian::DatabaseLockError *", 0, 0, (void*)"Search::Xapian::DatabaseLockError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseModifiedError = {"_p_Xapian__DatabaseModifiedError", "Xapian::DatabaseModifiedError *", 0, 0, (void*)"Search::Xapian::DatabaseModifiedError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseOpeningError = {"_p_Xapian__DatabaseOpeningError", "Xapian::DatabaseOpeningError *", 0, 0, (void*)"Search::Xapian::DatabaseOpeningError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseVersionError = {"_p_Xapian__DatabaseVersionError", "Xapian::DatabaseVersionError *", 0, 0, (void*)"Search::Xapian::DatabaseVersionError", 0};
static swig_type_info _swigt__p_Xapian__DateValueRangeProcessor = {"_p_Xapian__DateValueRangeProcessor", "Xapian::DateValueRangeProcessor *", 0, 0, (void*)"Search::Xapian::DateValueRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__DecreasingValueWeightPostingSource = {"_p_Xapian__DecreasingValueWeightPostingSource", "Xapian::DecreasingValueWeightPostingSource *", 0, 0, (void*)"Search::Xapian::DecreasingValueWeightPostingSource", 0};
static swig_type_info _swigt__p_Xapian__DocNotFoundError = {"_p_Xapian__DocNotFoundError", "Xapian::DocNotFoundError *", 0, 0, (void*)"Search::Xapian::DocNotFoundError", 0};
static swig_type_info _swigt__p_Xapian__Document = {"_p_Xapian__Document", "Xapian::Document *", 0, 0, (void*)"Search::Xapian::Document", 0};
static swig_type_info _swigt__p_Xapian__ESet = {"_p_Xapian__ESet", "Xapian::ESet *", 0, 0, (void*)"Search::Xapian::ESet", 0};
static swig_type_info _swigt__p_Xapian__ESetIterator = {"_p_Xapian__ESetIterator", "Xapian::ESetIterator *", 0, 0, (void*)"Search::Xapian::ESetIterator", 0};
static swig_type_info _swigt__p_Xapian__Enquire = {"_p_Xapian__Enquire", "Xapian::Enquire *", 0, 0, (void*)"Search::Xapian::Enquire", 0};
static swig_type_info _swigt__p_Xapian__Error = {"_p_Xapian__Error", "Xapian::Error *", 0, 0, (void*)"Search::Xapian::Error", 0};
static swig_type_info _swigt__p_Xapian__FeatureUnavailableError = {"_p_Xapian__FeatureUnavailableError", "Xapian::FeatureUnavailableError *", 0, 0, (void*)"Search::Xapian::FeatureUnavailableError", 0};
static swig_type_info _swigt__p_Xapian__FixedWeightPostingSource = {"_p_Xapian__FixedWeightPostingSource", "Xapian::FixedWeightPostingSource *", 0, 0, (void*)"Search::Xapian::FixedWeightPostingSource", 0};
static swig_type_info _swigt__p_Xapian__InternalError = {"_p_Xapian__InternalError", "Xapian::InternalError *", 0, 0, (void*)"Search::Xapian::InternalError", 0};
static swig_type_info _swigt__p_Xapian__InvalidArgumentError = {"_p_Xapian__InvalidArgumentError", "Xapian::InvalidArgumentError *", 0, 0, (void*)"Search::Xapian::InvalidArgumentError", 0};
static swig_type_info _swigt__p_Xapian__InvalidOperationError = {"_p_Xapian__InvalidOperationError", "Xapian::InvalidOperationError *", 0, 0, (void*)"Search::Xapian::InvalidOperationError", 0};
static swig_type_info _swigt__p_Xapian__KeyMaker = {"_p_Xapian__KeyMaker", "Xapian::KeyMaker *", 0, 0, (void*)"Search::Xapian::KeyMaker", 0};
static swig_type_info _swigt__p_Xapian__LogicError = {"_p_Xapian__LogicError", "Xapian::LogicError *", 0, 0, (void*)"Search::Xapian::LogicError", 0};
static swig_type_info _swigt__p_Xapian__MSet = {"_p_Xapian__MSet", "Xapian::MSet *", 0, 0, (void*)"Search::Xapian::MSet", 0};
static swig_type_info _swigt__p_Xapian__MSetIterator = {"_p_Xapian__MSetIterator", "Xapian::MSetIterator *", 0, 0, (void*)"Search::Xapian::MSetIterator", 0};
static swig_type_info _swigt__p_Xapian__MatchDecider = {"_p_Xapian__MatchDecider", "Xapian::MatchDecider *", 0, 0, (void*)"Search::Xapian::MatchDecider", 0};
static swig_type_info _swigt__p_Xapian__MatchSpy = {"_p_Xapian__MatchSpy", "Xapian::MatchSpy *", 0, 0, (void*)"Search::Xapian::MatchSpy", 0};
static swig_type_info _swigt__p_Xapian__MultiValueKeyMaker = {"_p_Xapian__MultiValueKeyMaker", "Xapian::MultiValueKeyMaker *", 0, 0, (void*)"Search::Xapian::MultiValueKeyMaker", 0};
static swig_type_info _swigt__p_Xapian__MultiValueSorter = {"_p_Xapian__MultiValueSorter", "Xapian::MultiValueSorter *", 0, 0, (void*)"Search::Xapian::MultiValueSorter", 0};
static swig_type_info _swigt__p_Xapian__NetworkError = {"_p_Xapian__NetworkError", "Xapian::NetworkError *", 0, 0, (void*)"Search::Xapian::NetworkError", 0};
static swig_type_info _swigt__p_Xapian__NetworkTimeoutError = {"_p_Xapian__NetworkTimeoutError", "Xapian::NetworkTimeoutError *", 0, 0, (void*)"Search::Xapian::NetworkTimeoutError", 0};
static swig_type_info _swigt__p_Xapian__NumberValueRangeProcessor = {"_p_Xapian__NumberValueRangeProcessor", "Xapian::NumberValueRangeProcessor *", 0, 0, (void*)"Search::Xapian::NumberValueRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__PositionIterator = {"_p_Xapian__PositionIterator", "Xapian::PositionIterator *", 0, 0, (void*)"Search::Xapian::PositionIterator", 0};
static swig_type_info _swigt__p_Xapian__PostingIterator = {"_p_Xapian__PostingIterator", "Xapian::PostingIterator *", 0, 0, (void*)"Search::Xapian::PostingIterator", 0};
static swig_type_info _swigt__p_Xapian__PostingSource = {"_p_Xapian__PostingSource", "Xapian::PostingSource *", 0, 0, (void*)"Search::Xapian::PostingSource", 0};
static swig_type_info _swigt__p_Xapian__Query = {"_p_Xapian__Query", "Xapian::Query *", 0, 0, (void*)"Search::Xapian::Query", 0};
static swig_type_info _swigt__p_Xapian__QueryParser = {"_p_Xapian__QueryParser", "Xapian::QueryParser *", 0, 0, (void*)"Search::Xapian::QueryParser", 0};
static swig_type_info _swigt__p_Xapian__QueryParserError = {"_p_Xapian__QueryParserError", "Xapian::QueryParserError *", 0, 0, (void*)"Search::Xapian::QueryParserError", 0};
static swig_type_info _swigt__p_Xapian__RSet = {"_p_Xapian__RSet", "Xapian::RSet *", 0, 0, (void*)"Search::Xapian::RSet", 0};
static swig_type_info _swigt__p_Xapian__RangeError = {"_p_Xapian__RangeError", "Xapian::RangeError *", 0, 0, (void*)"Search::Xapian::RangeError", 0};
static swig_type_info _swigt__p_Xapian__Registry = {"_p_Xapian__Registry", "Xapian::Registry *", 0, 0, (void*)"Search::Xapian::Registry", 0};
static swig_type_info _swigt__p_Xapian__RuntimeError = {"_p_Xapian__RuntimeError", "Xapian::RuntimeError *", 0, 0, (void*)"Search::Xapian::RuntimeError", 0};
static swig_type_info _swigt__p_Xapian__SerialisationError = {"_p_Xapian__SerialisationError", "Xapian::SerialisationError *", 0, 0, (void*)"Search::Xapian::SerialisationError", 0};
static swig_type_info _swigt__p_Xapian__SimpleStopper = {"_p_Xapian__SimpleStopper", "Xapian::SimpleStopper *", 0, 0, (void*)"Search::Xapian::SimpleStopper", 0};
static swig_type_info _swigt__p_Xapian__Sorter = {"_p_Xapian__Sorter", "Xapian::Sorter *", 0, 0, (void*)"Search::Xapian::Sorter", 0};
static swig_type_info _swigt__p_Xapian__Stem = {"_p_Xapian__Stem", "Xapian::Stem *", 0, 0, (void*)"Search::Xapian::Stem", 0};
static swig_type_info _swigt__p_Xapian__StemImplementation = {"_p_Xapian__StemImplementation", "Xapian::StemImplementation *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Stopper = {"_p_Xapian__Stopper", "Xapian::Stopper *", 0, 0, (void*)"Search::Xapian::Stopper", 0};
static swig_type_info _swigt__p_Xapian__StringValueRangeProcessor = {"_p_Xapian__StringValueRangeProcessor", "Xapian::StringValueRangeProcessor *", 0, 0, (void*)"Search::Xapian::StringValueRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__TermGenerator = {"_p_Xapian__TermGenerator", "Xapian::TermGenerator *", 0, 0, (void*)"Search::Xapian::TermGenerator", 0};
static swig_type_info _swigt__p_Xapian__TermIterator = {"_p_Xapian__TermIterator", "Xapian::TermIterator *", 0, 0, (void*)"Search::Xapian::TermIterator", 0};
static swig_type_info _swigt__p_Xapian__TradWeight = {"_p_Xapian__TradWeight", "Xapian::TradWeight *", 0, 0, (void*)"Search::Xapian::TradWeight", 0};
static swig_type_info _swigt__p_Xapian__UnimplementedError = {"_p_Xapian__UnimplementedError", "Xapian::UnimplementedError *", 0, 0, (void*)"Search::Xapian::UnimplementedError", 0};
static swig_type_info _swigt__p_Xapian__ValueCountMatchSpy = {"_p_Xapian__ValueCountMatchSpy", "Xapian::ValueCountMatchSpy *", 0, 0, (void*)"Search::Xapian::ValueCountMatchSpy", 0};
static swig_type_info _swigt__p_Xapian__ValueIterator = {"_p_Xapian__ValueIterator", "Xapian::ValueIterator *", 0, 0, (void*)"Search::Xapian::ValueIterator", 0};
static swig_type_info _swigt__p_Xapian__ValueMapPostingSource = {"_p_Xapian__ValueMapPostingSource", "Xapian::ValueMapPostingSource *", 0, 0, (void*)"Search::Xapian::ValueMapPostingSource", 0};
static swig_type_info _swigt__p_Xapian__ValuePostingSource = {"_p_Xapian__ValuePostingSource", "Xapian::ValuePostingSource *", 0, 0, (void*)"Search::Xapian::ValuePostingSource", 0};
static swig_type_info _swigt__p_Xapian__ValueRangeProcessor = {"_p_Xapian__ValueRangeProcessor", "Xapian::ValueRangeProcessor *", 0, 0, (void*)"Search::Xapian::ValueRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__ValueSetMatchDecider = {"_p_Xapian__ValueSetMatchDecider", "Xapian::ValueSetMatchDecider *", 0, 0, (void*)"Search::Xapian::ValueSetMatchDecider", 0};
static swig_type_info _swigt__p_Xapian__ValueWeightPostingSource = {"_p_Xapian__ValueWeightPostingSource", "Xapian::ValueWeightPostingSource *", 0, 0, (void*)"Search::Xapian::ValueWeightPostingSource", 0};
static swig_type_info _swigt__p_Xapian__Weight = {"_p_Xapian__Weight", "Xapian::Weight *", 0, 0, (void*)"Search::Xapian::Weight", 0};
static swig_type_info _swigt__p_Xapian__WritableDatabase = {"_p_Xapian__WritableDatabase", "Xapian::WritableDatabase *", 0, 0, (void*)"Search::Xapian::WritableDatabase", 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_compaction_level = {"_p_compaction_level", "compaction_level *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_docid_order = {"_p_docid_order", "docid_order *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "Xapian::doclength *|double *|Xapian::weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_feature_flag = {"_p_feature_flag", "feature_flag *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|Xapian::doccount_diff *|Xapian::termcount_diff *|Xapian::termpos_diff *|Xapian::valueno_diff *|Xapian::percent *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_op = {"_p_op", "op *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_Xapian__Query_t = {"_p_std__vectorT_Xapian__Query_t", "std::vector< Xapian::Query > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__vectorT_std__string_t = {"_p_std__vectorT_std__string_t", "std::vector< std::string > *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_stem_strategy = {"_p_stem_strategy", "stem_strategy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "Xapian::timeout *|unsigned int *|Xapian::doccount *|Xapian::termcount *|Xapian::valueno *|Xapian::docid *|Xapian::termpos *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_Xapian__AssertionError,
  &_swigt__p_Xapian__BM25Weight,
  &_swigt__p_Xapian__BoolWeight,
  &_swigt__p_Xapian__Compactor,
  &_swigt__p_Xapian__Database,
  &_swigt__p_Xapian__DatabaseCorruptError,
  &_swigt__p_Xapian__DatabaseCreateError,
  &_swigt__p_Xapian__DatabaseError,
  &_swigt__p_Xapian__DatabaseLockError,
  &_swigt__p_Xapian__DatabaseModifiedError,
  &_swigt__p_Xapian__DatabaseOpeningError,
  &_swigt__p_Xapian__DatabaseVersionError,
  &_swigt__p_Xapian__DateValueRangeProcessor,
  &_swigt__p_Xapian__DecreasingValueWeightPostingSource,
  &_swigt__p_Xapian__DocNotFoundError,
  &_swigt__p_Xapian__Document,
  &_swigt__p_Xapian__ESet,
  &_swigt__p_Xapian__ESetIterator,
  &_swigt__p_Xapian__Enquire,
  &_swigt__p_Xapian__Error,
  &_swigt__p_Xapian__FeatureUnavailableError,
  &_swigt__p_Xapian__FixedWeightPostingSource,
  &_swigt__p_Xapian__InternalError,
  &_swigt__p_Xapian__InvalidArgumentError,
  &_swigt__p_Xapian__InvalidOperationError,
  &_swigt__p_Xapian__KeyMaker,
  &_swigt__p_Xapian__LogicError,
  &_swigt__p_Xapian__MSet,
  &_swigt__p_Xapian__MSetIterator,
  &_swigt__p_Xapian__MatchDecider,
  &_swigt__p_Xapian__MatchSpy,
  &_swigt__p_Xapian__MultiValueKeyMaker,
  &_swigt__p_Xapian__MultiValueSorter,
  &_swigt__p_Xapian__NetworkError,
  &_swigt__p_Xapian__NetworkTimeoutError,
  &_swigt__p_Xapian__NumberValueRangeProcessor,
  &_swigt__p_Xapian__PositionIterator,
  &_swigt__p_Xapian__PostingIterator,
  &_swigt__p_Xapian__PostingSource,
  &_swigt__p_Xapian__Query,
  &_swigt__p_Xapian__QueryParser,
  &_swigt__p_Xapian__QueryParserError,
  &_swigt__p_Xapian__RSet,
  &_swigt__p_Xapian__RangeError,
  &_swigt__p_Xapian__Registry,
  &_swigt__p_Xapian__RuntimeError,
  &_swigt__p_Xapian__SerialisationError,
  &_swigt__p_Xapian__SimpleStopper,
  &_swigt__p_Xapian__Sorter,
  &_swigt__p_Xapian__Stem,
  &_swigt__p_Xapian__StemImplementation,
  &_swigt__p_Xapian__Stopper,
  &_swigt__p_Xapian__StringValueRangeProcessor,
  &_swigt__p_Xapian__TermGenerator,
  &_swigt__p_Xapian__TermIterator,
  &_swigt__p_Xapian__TradWeight,
  &_swigt__p_Xapian__UnimplementedError,
  &_swigt__p_Xapian__ValueCountMatchSpy,
  &_swigt__p_Xapian__ValueIterator,
  &_swigt__p_Xapian__ValueMapPostingSource,
  &_swigt__p_Xapian__ValuePostingSource,
  &_swigt__p_Xapian__ValueRangeProcessor,
  &_swigt__p_Xapian__ValueSetMatchDecider,
  &_swigt__p_Xapian__ValueWeightPostingSource,
  &_swigt__p_Xapian__Weight,
  &_swigt__p_Xapian__WritableDatabase,
  &_swigt__p_char,
  &_swigt__p_compaction_level,
  &_swigt__p_docid_order,
  &_swigt__p_double,
  &_swigt__p_feature_flag,
  &_swigt__p_int,
  &_swigt__p_op,
  &_swigt__p_std__string,
  &_swigt__p_std__vectorT_Xapian__Query_t,
  &_swigt__p_std__vectorT_std__string_t,
  &_swigt__p_stem_strategy,
  &_swigt__p_unsigned_int,
};

static swig_cast_info _swigc__p_Xapian__AssertionError[] = {  {&_swigt__p_Xapian__AssertionError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BM25Weight[] = {  {&_swigt__p_Xapian__BM25Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BoolWeight[] = {  {&_swigt__p_Xapian__BoolWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Compactor[] = {  {&_swigt__p_Xapian__Compactor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Database[] = {  {&_swigt__p_Xapian__Database, 0, 0, 0},  {&_swigt__p_Xapian__WritableDatabase, _p_Xapian__WritableDatabaseTo_p_Xapian__Database, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseCorruptError[] = {  {&_swigt__p_Xapian__DatabaseCorruptError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseCreateError[] = {  {&_swigt__p_Xapian__DatabaseCreateError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseError[] = {  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseError, 0, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__DatabaseError, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseLockError[] = {  {&_swigt__p_Xapian__DatabaseLockError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseModifiedError[] = {  {&_swigt__p_Xapian__DatabaseModifiedError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseOpeningError[] = {  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseOpeningError, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseVersionError[] = {  {&_swigt__p_Xapian__DatabaseVersionError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DateValueRangeProcessor[] = {  {&_swigt__p_Xapian__DateValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DecreasingValueWeightPostingSource[] = {  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DocNotFoundError[] = {  {&_swigt__p_Xapian__DocNotFoundError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Document[] = {  {&_swigt__p_Xapian__Document, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ESet[] = {  {&_swigt__p_Xapian__ESet, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ESetIterator[] = {  {&_swigt__p_Xapian__ESetIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Enquire[] = {  {&_swigt__p_Xapian__Enquire, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Error[] = {  {&_swigt__p_Xapian__DocNotFoundError, _p_Xapian__DocNotFoundErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__LogicError, _p_Xapian__LogicErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__FeatureUnavailableError, _p_Xapian__FeatureUnavailableErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__InternalError, _p_Xapian__InternalErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__UnimplementedError, _p_Xapian__UnimplementedErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__RangeError, _p_Xapian__RangeErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__RuntimeError, _p_Xapian__RuntimeErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseError, _p_Xapian__DatabaseErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__InvalidOperationError, _p_Xapian__InvalidOperationErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__AssertionError, _p_Xapian__AssertionErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__SerialisationError, _p_Xapian__SerialisationErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__Error, 0, 0, 0},  {&_swigt__p_Xapian__NetworkError, _p_Xapian__NetworkErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__InvalidArgumentError, _p_Xapian__InvalidArgumentErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__QueryParserError, _p_Xapian__QueryParserErrorTo_p_Xapian__Error, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__FeatureUnavailableError[] = {  {&_swigt__p_Xapian__FeatureUnavailableError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__FixedWeightPostingSource[] = {  {&_swigt__p_Xapian__FixedWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__InternalError[] = {  {&_swigt__p_Xapian__InternalError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__InvalidArgumentError[] = {  {&_swigt__p_Xapian__InvalidArgumentError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__InvalidOperationError[] = {  {&_swigt__p_Xapian__InvalidOperationError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__KeyMaker[] = {  {&_swigt__p_Xapian__Sorter, _p_Xapian__SorterTo_p_Xapian__KeyMaker, 0, 0},  {&_swigt__p_Xapian__MultiValueSorter, _p_Xapian__MultiValueSorterTo_p_Xapian__KeyMaker, 0, 0},  {&_swigt__p_Xapian__KeyMaker, 0, 0, 0},  {&_swigt__p_Xapian__MultiValueKeyMaker, _p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LogicError[] = {  {&_swigt__p_Xapian__AssertionError, _p_Xapian__AssertionErrorTo_p_Xapian__LogicError, 0, 0},  {&_swigt__p_Xapian__InvalidOperationError, _p_Xapian__InvalidOperationErrorTo_p_Xapian__LogicError, 0, 0},  {&_swigt__p_Xapian__UnimplementedError, _p_Xapian__UnimplementedErrorTo_p_Xapian__LogicError, 0, 0},  {&_swigt__p_Xapian__LogicError, 0, 0, 0},  {&_swigt__p_Xapian__InvalidArgumentError, _p_Xapian__InvalidArgumentErrorTo_p_Xapian__LogicError, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MSet[] = {  {&_swigt__p_Xapian__MSet, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MSetIterator[] = {  {&_swigt__p_Xapian__MSetIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MatchDecider[] = {  {&_swigt__p_Xapian__MatchDecider, 0, 0, 0},  {&_swigt__p_Xapian__ValueSetMatchDecider, _p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MatchSpy[] = {  {&_swigt__p_Xapian__MatchSpy, 0, 0, 0},  {&_swigt__p_Xapian__ValueCountMatchSpy, _p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MultiValueKeyMaker[] = {  {&_swigt__p_Xapian__MultiValueKeyMaker, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MultiValueSorter[] = {  {&_swigt__p_Xapian__MultiValueSorter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__NetworkError[] = {  {&_swigt__p_Xapian__NetworkError, 0, 0, 0},  {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__NetworkError, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__NetworkTimeoutError[] = {  {&_swigt__p_Xapian__NetworkTimeoutError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__NumberValueRangeProcessor[] = {  {&_swigt__p_Xapian__NumberValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PositionIterator[] = {  {&_swigt__p_Xapian__PositionIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PostingIterator[] = {  {&_swigt__p_Xapian__PostingIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PostingSource[] = {  {&_swigt__p_Xapian__PostingSource, 0, 0, 0},  {&_swigt__p_Xapian__ValuePostingSource, _p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__FixedWeightPostingSource, _p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Query[] = {  {&_swigt__p_Xapian__Query, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__QueryParser[] = {  {&_swigt__p_Xapian__QueryParser, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__QueryParserError[] = {  {&_swigt__p_Xapian__QueryParserError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__RSet[] = {  {&_swigt__p_Xapian__RSet, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__RangeError[] = {  {&_swigt__p_Xapian__RangeError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Registry[] = {  {&_swigt__p_Xapian__Registry, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__RuntimeError[] = {  {&_swigt__p_Xapian__DocNotFoundError, _p_Xapian__DocNotFoundErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__FeatureUnavailableError, _p_Xapian__FeatureUnavailableErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__InternalError, _p_Xapian__InternalErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseError, _p_Xapian__DatabaseErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__RangeError, _p_Xapian__RangeErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__RuntimeError, 0, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__SerialisationError, _p_Xapian__SerialisationErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__NetworkError, _p_Xapian__NetworkErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__QueryParserError, _p_Xapian__QueryParserErrorTo_p_Xapian__RuntimeError, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__SerialisationError[] = {  {&_swigt__p_Xapian__SerialisationError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__SimpleStopper[] = {  {&_swigt__p_Xapian__SimpleStopper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Sorter[] = {  {&_swigt__p_Xapian__Sorter, 0, 0, 0},  {&_swigt__p_Xapian__MultiValueSorter, _p_Xapian__MultiValueSorterTo_p_Xapian__Sorter, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Stem[] = {  {&_swigt__p_Xapian__Stem, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__StemImplementation[] = {  {&_swigt__p_Xapian__StemImplementation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Stopper[] = {  {&_swigt__p_Xapian__Stopper, 0, 0, 0},  {&_swigt__p_Xapian__SimpleStopper, _p_Xapian__SimpleStopperTo_p_Xapian__Stopper, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__StringValueRangeProcessor[] = {  {&_swigt__p_Xapian__StringValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TermGenerator[] = {  {&_swigt__p_Xapian__TermGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TermIterator[] = {  {&_swigt__p_Xapian__TermIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TradWeight[] = {  {&_swigt__p_Xapian__TradWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__UnimplementedError[] = {  {&_swigt__p_Xapian__UnimplementedError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueCountMatchSpy[] = {  {&_swigt__p_Xapian__ValueCountMatchSpy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueIterator[] = {  {&_swigt__p_Xapian__ValueIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueMapPostingSource[] = {  {&_swigt__p_Xapian__ValueMapPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValuePostingSource[] = {  {&_swigt__p_Xapian__ValuePostingSource, 0, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueRangeProcessor[] = {  {&_swigt__p_Xapian__ValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__StringValueRangeProcessor, _p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueSetMatchDecider[] = {  {&_swigt__p_Xapian__ValueSetMatchDecider, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueWeightPostingSource[] = {  {&_swigt__p_Xapian__ValueWeightPostingSource, 0, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Weight[] = {  {&_swigt__p_Xapian__BoolWeight, _p_Xapian__BoolWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TradWeight, _p_Xapian__TradWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__Weight, 0, 0, 0},  {&_swigt__p_Xapian__BM25Weight, _p_Xapian__BM25WeightTo_p_Xapian__Weight, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__WritableDatabase[] = {  {&_swigt__p_Xapian__WritableDatabase, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_compaction_level[] = {  {&_swigt__p_compaction_level, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_docid_order[] = {  {&_swigt__p_docid_order, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_feature_flag[] = {  {&_swigt__p_feature_flag, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_op[] = {  {&_swigt__p_op, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__string[] = {  {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_Xapian__Query_t[] = {  {&_swigt__p_std__vectorT_Xapian__Query_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__vectorT_std__string_t[] = {  {&_swigt__p_std__vectorT_std__string_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_stem_strategy[] = {  {&_swigt__p_stem_strategy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_Xapian__AssertionError,
  _swigc__p_Xapian__BM25Weight,
  _swigc__p_Xapian__BoolWeight,
  _swigc__p_Xapian__Compactor,
  _swigc__p_Xapian__Database,
  _swigc__p_Xapian__DatabaseCorruptError,
  _swigc__p_Xapian__DatabaseCreateError,
  _swigc__p_Xapian__DatabaseError,
  _swigc__p_Xapian__DatabaseLockError,
  _swigc__p_Xapian__DatabaseModifiedError,
  _swigc__p_Xapian__DatabaseOpeningError,
  _swigc__p_Xapian__DatabaseVersionError,
  _swigc__p_Xapian__DateValueRangeProcessor,
  _swigc__p_Xapian__DecreasingValueWeightPostingSource,
  _swigc__p_Xapian__DocNotFoundError,
  _swigc__p_Xapian__Document,
  _swigc__p_Xapian__ESet,
  _swigc__p_Xapian__ESetIterator,
  _swigc__p_Xapian__Enquire,
  _swigc__p_Xapian__Error,
  _swigc__p_Xapian__FeatureUnavailableError,
  _swigc__p_Xapian__FixedWeightPostingSource,
  _swigc__p_Xapian__InternalError,
  _swigc__p_Xapian__InvalidArgumentError,
  _swigc__p_Xapian__InvalidOperationError,
  _swigc__p_Xapian__KeyMaker,
  _swigc__p_Xapian__LogicError,
  _swigc__p_Xapian__MSet,
  _swigc__p_Xapian__MSetIterator,
  _swigc__p_Xapian__MatchDecider,
  _swigc__p_Xapian__MatchSpy,
  _swigc__p_Xapian__MultiValueKeyMaker,
  _swigc__p_Xapian__MultiValueSorter,
  _swigc__p_Xapian__NetworkError,
  _swigc__p_Xapian__NetworkTimeoutError,
  _swigc__p_Xapian__NumberValueRangeProcessor,
  _swigc__p_Xapian__PositionIterator,
  _swigc__p_Xapian__PostingIterator,
  _swigc__p_Xapian__PostingSource,
  _swigc__p_Xapian__Query,
  _swigc__p_Xapian__QueryParser,
  _swigc__p_Xapian__QueryParserError,
  _swigc__p_Xapian__RSet,
  _swigc__p_Xapian__RangeError,
  _swigc__p_Xapian__Registry,
  _swigc__p_Xapian__RuntimeError,
  _swigc__p_Xapian__SerialisationError,
  _swigc__p_Xapian__SimpleStopper,
  _swigc__p_Xapian__Sorter,
  _swigc__p_Xapian__Stem,
  _swigc__p_Xapian__StemImplementation,
  _swigc__p_Xapian__Stopper,
  _swigc__p_Xapian__StringValueRangeProcessor,
  _swigc__p_Xapian__TermGenerator,
  _swigc__p_Xapian__TermIterator,
  _swigc__p_Xapian__TradWeight,
  _swigc__p_Xapian__UnimplementedError,
  _swigc__p_Xapian__ValueCountMatchSpy,
  _swigc__p_Xapian__ValueIterator,
  _swigc__p_Xapian__ValueMapPostingSource,
  _swigc__p_Xapian__ValuePostingSource,
  _swigc__p_Xapian__ValueRangeProcessor,
  _swigc__p_Xapian__ValueSetMatchDecider,
  _swigc__p_Xapian__ValueWeightPostingSource,
  _swigc__p_Xapian__Weight,
  _swigc__p_Xapian__WritableDatabase,
  _swigc__p_char,
  _swigc__p_compaction_level,
  _swigc__p_docid_order,
  _swigc__p_double,
  _swigc__p_feature_flag,
  _swigc__p_int,
  _swigc__p_op,
  _swigc__p_std__string,
  _swigc__p_std__vectorT_Xapian__Query_t,
  _swigc__p_std__vectorT_std__string_t,
  _swigc__p_stem_strategy,
  _swigc__p_unsigned_int,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_constant_info swig_constants[] = {
{0,0,0,0,0,0}
};
#ifdef __cplusplus
}
#endif
static swig_variable_info swig_variables[] = {
    { "Search::Xapianc::BAD_VALUENO", MAGIC_CLASS swig_magic_readonly, MAGIC_CLASS _wrap_BAD_VALUENO_get,0 },
{0,0,0,0}
};
static swig_command_info swig_commands[] = {
{"Search::Xapianc::newN", _wrap_newN},
{"Search::Xapianc::new3_WritableDatabase", _wrap_new3_WritableDatabase},
{"Search::Xapianc::Error_get_type", _wrap_Error_get_type},
{"Search::Xapianc::Error_get_msg", _wrap_Error_get_msg},
{"Search::Xapianc::Error_get_context", _wrap_Error_get_context},
{"Search::Xapianc::Error_get_error_string", _wrap_Error_get_error_string},
{"Search::Xapianc::Error_get_description", _wrap_Error_get_description},
{"Search::Xapianc::delete_Error", _wrap_delete_Error},
{"Search::Xapianc::delete_LogicError", _wrap_delete_LogicError},
{"Search::Xapianc::delete_RuntimeError", _wrap_delete_RuntimeError},
{"Search::Xapianc::new_AssertionError", _wrap_new_AssertionError},
{"Search::Xapianc::delete_AssertionError", _wrap_delete_AssertionError},
{"Search::Xapianc::new_InvalidArgumentError", _wrap_new_InvalidArgumentError},
{"Search::Xapianc::delete_InvalidArgumentError", _wrap_delete_InvalidArgumentError},
{"Search::Xapianc::new_InvalidOperationError", _wrap_new_InvalidOperationError},
{"Search::Xapianc::delete_InvalidOperationError", _wrap_delete_InvalidOperationError},
{"Search::Xapianc::new_UnimplementedError", _wrap_new_UnimplementedError},
{"Search::Xapianc::delete_UnimplementedError", _wrap_delete_UnimplementedError},
{"Search::Xapianc::new_DatabaseError", _wrap_new_DatabaseError},
{"Search::Xapianc::delete_DatabaseError", _wrap_delete_DatabaseError},
{"Search::Xapianc::new_DatabaseCorruptError", _wrap_new_DatabaseCorruptError},
{"Search::Xapianc::delete_DatabaseCorruptError", _wrap_delete_DatabaseCorruptError},
{"Search::Xapianc::new_DatabaseCreateError", _wrap_new_DatabaseCreateError},
{"Search::Xapianc::delete_DatabaseCreateError", _wrap_delete_DatabaseCreateError},
{"Search::Xapianc::new_DatabaseLockError", _wrap_new_DatabaseLockError},
{"Search::Xapianc::delete_DatabaseLockError", _wrap_delete_DatabaseLockError},
{"Search::Xapianc::new_DatabaseModifiedError", _wrap_new_DatabaseModifiedError},
{"Search::Xapianc::delete_DatabaseModifiedError", _wrap_delete_DatabaseModifiedError},
{"Search::Xapianc::new_DatabaseOpeningError", _wrap_new_DatabaseOpeningError},
{"Search::Xapianc::delete_DatabaseOpeningError", _wrap_delete_DatabaseOpeningError},
{"Search::Xapianc::new_DatabaseVersionError", _wrap_new_DatabaseVersionError},
{"Search::Xapianc::delete_DatabaseVersionError", _wrap_delete_DatabaseVersionError},
{"Search::Xapianc::new_DocNotFoundError", _wrap_new_DocNotFoundError},
{"Search::Xapianc::delete_DocNotFoundError", _wrap_delete_DocNotFoundError},
{"Search::Xapianc::new_FeatureUnavailableError", _wrap_new_FeatureUnavailableError},
{"Search::Xapianc::delete_FeatureUnavailableError", _wrap_delete_FeatureUnavailableError},
{"Search::Xapianc::new_InternalError", _wrap_new_InternalError},
{"Search::Xapianc::delete_InternalError", _wrap_delete_InternalError},
{"Search::Xapianc::new_NetworkError", _wrap_new_NetworkError},
{"Search::Xapianc::delete_NetworkError", _wrap_delete_NetworkError},
{"Search::Xapianc::new_NetworkTimeoutError", _wrap_new_NetworkTimeoutError},
{"Search::Xapianc::delete_NetworkTimeoutError", _wrap_delete_NetworkTimeoutError},
{"Search::Xapianc::new_QueryParserError", _wrap_new_QueryParserError},
{"Search::Xapianc::delete_QueryParserError", _wrap_delete_QueryParserError},
{"Search::Xapianc::new_SerialisationError", _wrap_new_SerialisationError},
{"Search::Xapianc::delete_SerialisationError", _wrap_delete_SerialisationError},
{"Search::Xapianc::new_RangeError", _wrap_new_RangeError},
{"Search::Xapianc::delete_RangeError", _wrap_delete_RangeError},
{"Search::Xapianc::version_string", _wrap_version_string},
{"Search::Xapianc::major_version", _wrap_major_version},
{"Search::Xapianc::minor_version", _wrap_minor_version},
{"Search::Xapianc::revision", _wrap_revision},
{"Search::Xapianc::new_PositionIterator", _wrap_new_PositionIterator},
{"Search::Xapianc::delete_PositionIterator", _wrap_delete_PositionIterator},
{"Search::Xapianc::PositionIterator_get_termpos", _wrap_PositionIterator_get_termpos},
{"Search::Xapianc::PositionIterator_increment", _wrap_PositionIterator_increment},
{"Search::Xapianc::PositionIterator_equals", _wrap_PositionIterator_equals},
{"Search::Xapianc::PositionIterator_skip_to", _wrap_PositionIterator_skip_to},
{"Search::Xapianc::PositionIterator_get_description", _wrap_PositionIterator_get_description},
{"Search::Xapianc::PositionIterator_equal1", _wrap_PositionIterator_equal1},
{"Search::Xapianc::PositionIterator_nequal1", _wrap_PositionIterator_nequal1},
{"Search::Xapianc::delete_PostingIterator", _wrap_delete_PostingIterator},
{"Search::Xapianc::new_PostingIterator", _wrap_new_PostingIterator},
{"Search::Xapianc::PostingIterator_skip_to", _wrap_PostingIterator_skip_to},
{"Search::Xapianc::PostingIterator_get_doclength", _wrap_PostingIterator_get_doclength},
{"Search::Xapianc::PostingIterator_get_wdf", _wrap_PostingIterator_get_wdf},
{"Search::Xapianc::PostingIterator_positionlist_begin", _wrap_PostingIterator_positionlist_begin},
{"Search::Xapianc::PostingIterator_positionlist_end", _wrap_PostingIterator_positionlist_end},
{"Search::Xapianc::PostingIterator_get_description", _wrap_PostingIterator_get_description},
{"Search::Xapianc::PostingIterator_get_docid", _wrap_PostingIterator_get_docid},
{"Search::Xapianc::PostingIterator_increment", _wrap_PostingIterator_increment},
{"Search::Xapianc::PostingIterator_equals", _wrap_PostingIterator_equals},
{"Search::Xapianc::__eq__", _wrap___eq__},
{"Search::Xapianc::__ne__", _wrap___ne__},
{"Search::Xapianc::new_TermIterator", _wrap_new_TermIterator},
{"Search::Xapianc::delete_TermIterator", _wrap_delete_TermIterator},
{"Search::Xapianc::TermIterator_get_termname", _wrap_TermIterator_get_termname},
{"Search::Xapianc::TermIterator_increment", _wrap_TermIterator_increment},
{"Search::Xapianc::TermIterator_equals", _wrap_TermIterator_equals},
{"Search::Xapianc::TermIterator_skip_to", _wrap_TermIterator_skip_to},
{"Search::Xapianc::TermIterator_get_wdf", _wrap_TermIterator_get_wdf},
{"Search::Xapianc::TermIterator_get_termfreq", _wrap_TermIterator_get_termfreq},
{"Search::Xapianc::TermIterator_positionlist_count", _wrap_TermIterator_positionlist_count},
{"Search::Xapianc::TermIterator_positionlist_begin", _wrap_TermIterator_positionlist_begin},
{"Search::Xapianc::TermIterator_positionlist_end", _wrap_TermIterator_positionlist_end},
{"Search::Xapianc::TermIterator_get_description", _wrap_TermIterator_get_description},
{"Search::Xapianc::TermIterator_equal", _wrap_TermIterator_equal},
{"Search::Xapianc::TermIterator_nequal", _wrap_TermIterator_nequal},
{"Search::Xapianc::new_ValueIterator", _wrap_new_ValueIterator},
{"Search::Xapianc::delete_ValueIterator", _wrap_delete_ValueIterator},
{"Search::Xapianc::ValueIterator_get_value", _wrap_ValueIterator_get_value},
{"Search::Xapianc::ValueIterator_increment", _wrap_ValueIterator_increment},
{"Search::Xapianc::ValueIterator_equals", _wrap_ValueIterator_equals},
{"Search::Xapianc::ValueIterator_get_docid", _wrap_ValueIterator_get_docid},
{"Search::Xapianc::ValueIterator_get_valueno", _wrap_ValueIterator_get_valueno},
{"Search::Xapianc::ValueIterator_skip_to", _wrap_ValueIterator_skip_to},
{"Search::Xapianc::ValueIterator_check", _wrap_ValueIterator_check},
{"Search::Xapianc::ValueIterator_get_description", _wrap_ValueIterator_get_description},
{"Search::Xapianc::ValueIterator_equal", _wrap_ValueIterator_equal},
{"Search::Xapianc::ValueIterator_nequal", _wrap_ValueIterator_nequal},
{"Search::Xapianc::new_Document", _wrap_new_Document},
{"Search::Xapianc::delete_Document", _wrap_delete_Document},
{"Search::Xapianc::Document_get_value", _wrap_Document_get_value},
{"Search::Xapianc::Document_add_value", _wrap_Document_add_value},
{"Search::Xapianc::Document_remove_value", _wrap_Document_remove_value},
{"Search::Xapianc::Document_clear_values", _wrap_Document_clear_values},
{"Search::Xapianc::Document_get_data", _wrap_Document_get_data},
{"Search::Xapianc::Document_set_data", _wrap_Document_set_data},
{"Search::Xapianc::Document_add_posting", _wrap_Document_add_posting},
{"Search::Xapianc::Document_add_term", _wrap_Document_add_term},
{"Search::Xapianc::Document_add_boolean_term", _wrap_Document_add_boolean_term},
{"Search::Xapianc::Document_remove_posting", _wrap_Document_remove_posting},
{"Search::Xapianc::Document_remove_term", _wrap_Document_remove_term},
{"Search::Xapianc::Document_clear_terms", _wrap_Document_clear_terms},
{"Search::Xapianc::Document_termlist_count", _wrap_Document_termlist_count},
{"Search::Xapianc::Document_termlist_begin", _wrap_Document_termlist_begin},
{"Search::Xapianc::Document_termlist_end", _wrap_Document_termlist_end},
{"Search::Xapianc::Document_values_count", _wrap_Document_values_count},
{"Search::Xapianc::Document_values_begin", _wrap_Document_values_begin},
{"Search::Xapianc::Document_values_end", _wrap_Document_values_end},
{"Search::Xapianc::Document_get_docid", _wrap_Document_get_docid},
{"Search::Xapianc::Document_serialise", _wrap_Document_serialise},
{"Search::Xapianc::Document_unserialise", _wrap_Document_unserialise},
{"Search::Xapianc::Document_get_description", _wrap_Document_get_description},
{"Search::Xapianc::delete_PostingSource", _wrap_delete_PostingSource},
{"Search::Xapianc::PostingSource_get_termfreq_min", _wrap_PostingSource_get_termfreq_min},
{"Search::Xapianc::PostingSource_get_termfreq_est", _wrap_PostingSource_get_termfreq_est},
{"Search::Xapianc::PostingSource_get_termfreq_max", _wrap_PostingSource_get_termfreq_max},
{"Search::Xapianc::PostingSource_get_maxweight", _wrap_PostingSource_get_maxweight},
{"Search::Xapianc::PostingSource_get_weight", _wrap_PostingSource_get_weight},
{"Search::Xapianc::PostingSource_get_docid", _wrap_PostingSource_get_docid},
{"Search::Xapianc::PostingSource_increment_weight", _wrap_PostingSource_increment_weight},
{"Search::Xapianc::PostingSource_skip_to", _wrap_PostingSource_skip_to},
{"Search::Xapianc::PostingSource_check", _wrap_PostingSource_check},
{"Search::Xapianc::PostingSource_at_end", _wrap_PostingSource_at_end},
{"Search::Xapianc::PostingSource_name", _wrap_PostingSource_name},
{"Search::Xapianc::PostingSource_init", _wrap_PostingSource_init},
{"Search::Xapianc::PostingSource_get_description", _wrap_PostingSource_get_description},
{"Search::Xapianc::new_ValuePostingSource", _wrap_new_ValuePostingSource},
{"Search::Xapianc::ValuePostingSource_get_termfreq_min", _wrap_ValuePostingSource_get_termfreq_min},
{"Search::Xapianc::ValuePostingSource_get_termfreq_est", _wrap_ValuePostingSource_get_termfreq_est},
{"Search::Xapianc::ValuePostingSource_get_termfreq_max", _wrap_ValuePostingSource_get_termfreq_max},
{"Search::Xapianc::ValuePostingSource_increment_weight", _wrap_ValuePostingSource_increment_weight},
{"Search::Xapianc::ValuePostingSource_skip_to", _wrap_ValuePostingSource_skip_to},
{"Search::Xapianc::ValuePostingSource_check", _wrap_ValuePostingSource_check},
{"Search::Xapianc::ValuePostingSource_at_end", _wrap_ValuePostingSource_at_end},
{"Search::Xapianc::ValuePostingSource_get_docid", _wrap_ValuePostingSource_get_docid},
{"Search::Xapianc::ValuePostingSource_init", _wrap_ValuePostingSource_init},
{"Search::Xapianc::delete_ValuePostingSource", _wrap_delete_ValuePostingSource},
{"Search::Xapianc::new_ValueWeightPostingSource", _wrap_new_ValueWeightPostingSource},
{"Search::Xapianc::ValueWeightPostingSource_get_weight", _wrap_ValueWeightPostingSource_get_weight},
{"Search::Xapianc::ValueWeightPostingSource_name", _wrap_ValueWeightPostingSource_name},
{"Search::Xapianc::ValueWeightPostingSource_init", _wrap_ValueWeightPostingSource_init},
{"Search::Xapianc::ValueWeightPostingSource_get_description", _wrap_ValueWeightPostingSource_get_description},
{"Search::Xapianc::delete_ValueWeightPostingSource", _wrap_delete_ValueWeightPostingSource},
{"Search::Xapianc::new_DecreasingValueWeightPostingSource", _wrap_new_DecreasingValueWeightPostingSource},
{"Search::Xapianc::DecreasingValueWeightPostingSource_get_weight", _wrap_DecreasingValueWeightPostingSource_get_weight},
{"Search::Xapianc::DecreasingValueWeightPostingSource_name", _wrap_DecreasingValueWeightPostingSource_name},
{"Search::Xapianc::DecreasingValueWeightPostingSource_init", _wrap_DecreasingValueWeightPostingSource_init},
{"Search::Xapianc::DecreasingValueWeightPostingSource_increment_weight", _wrap_DecreasingValueWeightPostingSource_increment_weight},
{"Search::Xapianc::DecreasingValueWeightPostingSource_skip_to", _wrap_DecreasingValueWeightPostingSource_skip_to},
{"Search::Xapianc::DecreasingValueWeightPostingSource_check", _wrap_DecreasingValueWeightPostingSource_check},
{"Search::Xapianc::DecreasingValueWeightPostingSource_get_description", _wrap_DecreasingValueWeightPostingSource_get_description},
{"Search::Xapianc::delete_DecreasingValueWeightPostingSource", _wrap_delete_DecreasingValueWeightPostingSource},
{"Search::Xapianc::new_ValueMapPostingSource", _wrap_new_ValueMapPostingSource},
{"Search::Xapianc::ValueMapPostingSource_add_mapping", _wrap_ValueMapPostingSource_add_mapping},
{"Search::Xapianc::ValueMapPostingSource_clear_mappings", _wrap_ValueMapPostingSource_clear_mappings},
{"Search::Xapianc::ValueMapPostingSource_set_default_weight", _wrap_ValueMapPostingSource_set_default_weight},
{"Search::Xapianc::ValueMapPostingSource_get_weight", _wrap_ValueMapPostingSource_get_weight},
{"Search::Xapianc::ValueMapPostingSource_name", _wrap_ValueMapPostingSource_name},
{"Search::Xapianc::ValueMapPostingSource_init", _wrap_ValueMapPostingSource_init},
{"Search::Xapianc::ValueMapPostingSource_get_description", _wrap_ValueMapPostingSource_get_description},
{"Search::Xapianc::delete_ValueMapPostingSource", _wrap_delete_ValueMapPostingSource},
{"Search::Xapianc::new_FixedWeightPostingSource", _wrap_new_FixedWeightPostingSource},
{"Search::Xapianc::FixedWeightPostingSource_get_termfreq_min", _wrap_FixedWeightPostingSource_get_termfreq_min},
{"Search::Xapianc::FixedWeightPostingSource_get_termfreq_est", _wrap_FixedWeightPostingSource_get_termfreq_est},
{"Search::Xapianc::FixedWeightPostingSource_get_termfreq_max", _wrap_FixedWeightPostingSource_get_termfreq_max},
{"Search::Xapianc::FixedWeightPostingSource_get_weight", _wrap_FixedWeightPostingSource_get_weight},
{"Search::Xapianc::FixedWeightPostingSource_increment_weight", _wrap_FixedWeightPostingSource_increment_weight},
{"Search::Xapianc::FixedWeightPostingSource_skip_to", _wrap_FixedWeightPostingSource_skip_to},
{"Search::Xapianc::FixedWeightPostingSource_check", _wrap_FixedWeightPostingSource_check},
{"Search::Xapianc::FixedWeightPostingSource_at_end", _wrap_FixedWeightPostingSource_at_end},
{"Search::Xapianc::FixedWeightPostingSource_get_docid", _wrap_FixedWeightPostingSource_get_docid},
{"Search::Xapianc::FixedWeightPostingSource_name", _wrap_FixedWeightPostingSource_name},
{"Search::Xapianc::FixedWeightPostingSource_init", _wrap_FixedWeightPostingSource_init},
{"Search::Xapianc::FixedWeightPostingSource_get_description", _wrap_FixedWeightPostingSource_get_description},
{"Search::Xapianc::delete_FixedWeightPostingSource", _wrap_delete_FixedWeightPostingSource},
{"Search::Xapianc::new_MSet", _wrap_new_MSet},
{"Search::Xapianc::delete_MSet", _wrap_delete_MSet},
{"Search::Xapianc::MSet_fetch", _wrap_MSet_fetch},
{"Search::Xapianc::MSet_convert_to_percent", _wrap_MSet_convert_to_percent},
{"Search::Xapianc::MSet_get_termfreq", _wrap_MSet_get_termfreq},
{"Search::Xapianc::MSet_get_termweight", _wrap_MSet_get_termweight},
{"Search::Xapianc::MSet_get_firstitem", _wrap_MSet_get_firstitem},
{"Search::Xapianc::MSet_get_matches_lower_bound", _wrap_MSet_get_matches_lower_bound},
{"Search::Xapianc::MSet_get_matches_estimated", _wrap_MSet_get_matches_estimated},
{"Search::Xapianc::MSet_get_matches_upper_bound", _wrap_MSet_get_matches_upper_bound},
{"Search::Xapianc::MSet_get_uncollapsed_matches_lower_bound", _wrap_MSet_get_uncollapsed_matches_lower_bound},
{"Search::Xapianc::MSet_get_uncollapsed_matches_estimated", _wrap_MSet_get_uncollapsed_matches_estimated},
{"Search::Xapianc::MSet_get_uncollapsed_matches_upper_bound", _wrap_MSet_get_uncollapsed_matches_upper_bound},
{"Search::Xapianc::MSet_get_max_possible", _wrap_MSet_get_max_possible},
{"Search::Xapianc::MSet_get_max_attained", _wrap_MSet_get_max_attained},
{"Search::Xapianc::MSet_size", _wrap_MSet_size},
{"Search::Xapianc::MSet_empty", _wrap_MSet_empty},
{"Search::Xapianc::MSet_begin", _wrap_MSet_begin},
{"Search::Xapianc::MSet_end", _wrap_MSet_end},
{"Search::Xapianc::MSet_back", _wrap_MSet_back},
{"Search::Xapianc::MSet_get_hit", _wrap_MSet_get_hit},
{"Search::Xapianc::MSet_get_document_percentage", _wrap_MSet_get_document_percentage},
{"Search::Xapianc::MSet_get_document", _wrap_MSet_get_document},
{"Search::Xapianc::MSet_get_docid", _wrap_MSet_get_docid},
{"Search::Xapianc::MSet_get_description", _wrap_MSet_get_description},
{"Search::Xapianc::MSet_FETCH", _wrap_MSet_FETCH},
{"Search::Xapianc::new_MSetIterator", _wrap_new_MSetIterator},
{"Search::Xapianc::delete_MSetIterator", _wrap_delete_MSetIterator},
{"Search::Xapianc::MSetIterator_get_docid", _wrap_MSetIterator_get_docid},
{"Search::Xapianc::MSetIterator_increment", _wrap_MSetIterator_increment},
{"Search::Xapianc::MSetIterator_prev", _wrap_MSetIterator_prev},
{"Search::Xapianc::MSetIterator_equals", _wrap_MSetIterator_equals},
{"Search::Xapianc::MSetIterator_get_document", _wrap_MSetIterator_get_document},
{"Search::Xapianc::MSetIterator_get_rank", _wrap_MSetIterator_get_rank},
{"Search::Xapianc::MSetIterator_get_weight", _wrap_MSetIterator_get_weight},
{"Search::Xapianc::MSetIterator_get_collapse_key", _wrap_MSetIterator_get_collapse_key},
{"Search::Xapianc::MSetIterator_get_collapse_count", _wrap_MSetIterator_get_collapse_count},
{"Search::Xapianc::MSetIterator_get_percent", _wrap_MSetIterator_get_percent},
{"Search::Xapianc::MSetIterator_get_description", _wrap_MSetIterator_get_description},
{"Search::Xapianc::MSetIterator_equal", _wrap_MSetIterator_equal},
{"Search::Xapianc::MSetIterator_nequal", _wrap_MSetIterator_nequal},
{"Search::Xapianc::new_ESet", _wrap_new_ESet},
{"Search::Xapianc::delete_ESet", _wrap_delete_ESet},
{"Search::Xapianc::ESet_get_ebound", _wrap_ESet_get_ebound},
{"Search::Xapianc::ESet_size", _wrap_ESet_size},
{"Search::Xapianc::ESet_empty", _wrap_ESet_empty},
{"Search::Xapianc::ESet_begin", _wrap_ESet_begin},
{"Search::Xapianc::ESet_end", _wrap_ESet_end},
{"Search::Xapianc::ESet_back", _wrap_ESet_back},
{"Search::Xapianc::ESet_get_description", _wrap_ESet_get_description},
{"Search::Xapianc::ESet_FETCH", _wrap_ESet_FETCH},
{"Search::Xapianc::new_ESetIterator", _wrap_new_ESetIterator},
{"Search::Xapianc::delete_ESetIterator", _wrap_delete_ESetIterator},
{"Search::Xapianc::ESetIterator_get_term", _wrap_ESetIterator_get_term},
{"Search::Xapianc::ESetIterator_increment", _wrap_ESetIterator_increment},
{"Search::Xapianc::ESetIterator_prev", _wrap_ESetIterator_prev},
{"Search::Xapianc::ESetIterator_equals", _wrap_ESetIterator_equals},
{"Search::Xapianc::ESetIterator_get_weight", _wrap_ESetIterator_get_weight},
{"Search::Xapianc::ESetIterator_get_description", _wrap_ESetIterator_get_description},
{"Search::Xapianc::ESetIterator_get_termname", _wrap_ESetIterator_get_termname},
{"Search::Xapianc::ESetIterator_equal", _wrap_ESetIterator_equal},
{"Search::Xapianc::ESetIterator_nequal", _wrap_ESetIterator_nequal},
{"Search::Xapianc::new_RSet", _wrap_new_RSet},
{"Search::Xapianc::delete_RSet", _wrap_delete_RSet},
{"Search::Xapianc::RSet_size", _wrap_RSet_size},
{"Search::Xapianc::RSet_empty", _wrap_RSet_empty},
{"Search::Xapianc::RSet_add_document", _wrap_RSet_add_document},
{"Search::Xapianc::RSet_remove_document", _wrap_RSet_remove_document},
{"Search::Xapianc::RSet_contains", _wrap_RSet_contains},
{"Search::Xapianc::RSet_get_description", _wrap_RSet_get_description},
{"Search::Xapianc::MatchDecider___call__", _wrap_MatchDecider___call__},
{"Search::Xapianc::delete_MatchDecider", _wrap_delete_MatchDecider},
{"Search::Xapianc::new_Enquire", _wrap_new_Enquire},
{"Search::Xapianc::delete_Enquire", _wrap_delete_Enquire},
{"Search::Xapianc::Enquire_set_query", _wrap_Enquire_set_query},
{"Search::Xapianc::Enquire_get_query", _wrap_Enquire_get_query},
{"Search::Xapianc::Enquire_add_matchspy", _wrap_Enquire_add_matchspy},
{"Search::Xapianc::Enquire_clear_matchspies", _wrap_Enquire_clear_matchspies},
{"Search::Xapianc::Enquire_set_weighting_scheme", _wrap_Enquire_set_weighting_scheme},
{"Search::Xapianc::Enquire_set_collapse_key", _wrap_Enquire_set_collapse_key},
{"Search::Xapianc::Enquire_set_docid_order", _wrap_Enquire_set_docid_order},
{"Search::Xapianc::Enquire_set_cutoff", _wrap_Enquire_set_cutoff},
{"Search::Xapianc::Enquire_set_sort_by_relevance", _wrap_Enquire_set_sort_by_relevance},
{"Search::Xapianc::Enquire_set_sort_by_value", _wrap_Enquire_set_sort_by_value},
{"Search::Xapianc::Enquire_set_sort_by_value_then_relevance", _wrap_Enquire_set_sort_by_value_then_relevance},
{"Search::Xapianc::Enquire_set_sort_by_relevance_then_value", _wrap_Enquire_set_sort_by_relevance_then_value},
{"Search::Xapianc::Enquire_set_sort_by_key", _wrap_Enquire_set_sort_by_key},
{"Search::Xapianc::Enquire_set_sort_by_key_then_relevance", _wrap_Enquire_set_sort_by_key_then_relevance},
{"Search::Xapianc::Enquire_set_sort_by_relevance_then_key", _wrap_Enquire_set_sort_by_relevance_then_key},
{"Search::Xapianc::Enquire_get_mset", _wrap_Enquire_get_mset},
{"Search::Xapianc::Enquire_get_eset", _wrap_Enquire_get_eset},
{"Search::Xapianc::Enquire_get_matching_terms_begin", _wrap_Enquire_get_matching_terms_begin},
{"Search::Xapianc::Enquire_get_matching_terms_end", _wrap_Enquire_get_matching_terms_end},
{"Search::Xapianc::Enquire_get_description", _wrap_Enquire_get_description},
{"Search::Xapianc::new_Registry", _wrap_new_Registry},
{"Search::Xapianc::delete_Registry", _wrap_delete_Registry},
{"Search::Xapianc::Registry_register_weighting_scheme", _wrap_Registry_register_weighting_scheme},
{"Search::Xapianc::Registry_get_weighting_scheme", _wrap_Registry_get_weighting_scheme},
{"Search::Xapianc::Registry_register_posting_source", _wrap_Registry_register_posting_source},
{"Search::Xapianc::Registry_get_posting_source", _wrap_Registry_get_posting_source},
{"Search::Xapianc::Registry_register_match_spy", _wrap_Registry_register_match_spy},
{"Search::Xapianc::Registry_get_match_spy", _wrap_Registry_get_match_spy},
{"Search::Xapianc::delete_Weight", _wrap_delete_Weight},
{"Search::Xapianc::Weight_name", _wrap_Weight_name},
{"Search::Xapianc::Weight_get_sumpart", _wrap_Weight_get_sumpart},
{"Search::Xapianc::Weight_get_maxpart", _wrap_Weight_get_maxpart},
{"Search::Xapianc::Weight_get_sumextra", _wrap_Weight_get_sumextra},
{"Search::Xapianc::Weight_get_maxextra", _wrap_Weight_get_maxextra},
{"Search::Xapianc::Weight_get_sumpart_needs_doclength_", _wrap_Weight_get_sumpart_needs_doclength_},
{"Search::Xapianc::Weight_get_sumpart_needs_wdf_", _wrap_Weight_get_sumpart_needs_wdf_},
{"Search::Xapianc::new_BoolWeight", _wrap_new_BoolWeight},
{"Search::Xapianc::BoolWeight_name", _wrap_BoolWeight_name},
{"Search::Xapianc::BoolWeight_get_sumpart", _wrap_BoolWeight_get_sumpart},
{"Search::Xapianc::BoolWeight_get_maxpart", _wrap_BoolWeight_get_maxpart},
{"Search::Xapianc::BoolWeight_get_sumextra", _wrap_BoolWeight_get_sumextra},
{"Search::Xapianc::BoolWeight_get_maxextra", _wrap_BoolWeight_get_maxextra},
{"Search::Xapianc::delete_BoolWeight", _wrap_delete_BoolWeight},
{"Search::Xapianc::new_BM25Weight", _wrap_new_BM25Weight},
{"Search::Xapianc::BM25Weight_name", _wrap_BM25Weight_name},
{"Search::Xapianc::BM25Weight_get_sumpart", _wrap_BM25Weight_get_sumpart},
{"Search::Xapianc::BM25Weight_get_maxpart", _wrap_BM25Weight_get_maxpart},
{"Search::Xapianc::BM25Weight_get_sumextra", _wrap_BM25Weight_get_sumextra},
{"Search::Xapianc::BM25Weight_get_maxextra", _wrap_BM25Weight_get_maxextra},
{"Search::Xapianc::delete_BM25Weight", _wrap_delete_BM25Weight},
{"Search::Xapianc::new_TradWeight", _wrap_new_TradWeight},
{"Search::Xapianc::TradWeight_name", _wrap_TradWeight_name},
{"Search::Xapianc::TradWeight_get_sumpart", _wrap_TradWeight_get_sumpart},
{"Search::Xapianc::TradWeight_get_maxpart", _wrap_TradWeight_get_maxpart},
{"Search::Xapianc::TradWeight_get_sumextra", _wrap_TradWeight_get_sumextra},
{"Search::Xapianc::TradWeight_get_maxextra", _wrap_TradWeight_get_maxextra},
{"Search::Xapianc::delete_TradWeight", _wrap_delete_TradWeight},
{"Search::Xapianc::delete_MatchSpy", _wrap_delete_MatchSpy},
{"Search::Xapianc::MatchSpy___call__", _wrap_MatchSpy___call__},
{"Search::Xapianc::MatchSpy_name", _wrap_MatchSpy_name},
{"Search::Xapianc::MatchSpy_merge_results", _wrap_MatchSpy_merge_results},
{"Search::Xapianc::MatchSpy_get_description", _wrap_MatchSpy_get_description},
{"Search::Xapianc::new_ValueCountMatchSpy", _wrap_new_ValueCountMatchSpy},
{"Search::Xapianc::ValueCountMatchSpy_get_total", _wrap_ValueCountMatchSpy_get_total},
{"Search::Xapianc::ValueCountMatchSpy_values_begin", _wrap_ValueCountMatchSpy_values_begin},
{"Search::Xapianc::ValueCountMatchSpy_values_end", _wrap_ValueCountMatchSpy_values_end},
{"Search::Xapianc::ValueCountMatchSpy_top_values_begin", _wrap_ValueCountMatchSpy_top_values_begin},
{"Search::Xapianc::ValueCountMatchSpy_top_values_end", _wrap_ValueCountMatchSpy_top_values_end},
{"Search::Xapianc::ValueCountMatchSpy___call__", _wrap_ValueCountMatchSpy___call__},
{"Search::Xapianc::ValueCountMatchSpy_name", _wrap_ValueCountMatchSpy_name},
{"Search::Xapianc::ValueCountMatchSpy_merge_results", _wrap_ValueCountMatchSpy_merge_results},
{"Search::Xapianc::ValueCountMatchSpy_get_description", _wrap_ValueCountMatchSpy_get_description},
{"Search::Xapianc::delete_ValueCountMatchSpy", _wrap_delete_ValueCountMatchSpy},
{"Search::Xapianc::Database_add_database", _wrap_Database_add_database},
{"Search::Xapianc::delete_Database", _wrap_delete_Database},
{"Search::Xapianc::new_Database", _wrap_new_Database},
{"Search::Xapianc::Database_reopen", _wrap_Database_reopen},
{"Search::Xapianc::Database_close", _wrap_Database_close},
{"Search::Xapianc::Database_get_description", _wrap_Database_get_description},
{"Search::Xapianc::Database_postlist_begin", _wrap_Database_postlist_begin},
{"Search::Xapianc::Database_postlist_end", _wrap_Database_postlist_end},
{"Search::Xapianc::Database_termlist_begin", _wrap_Database_termlist_begin},
{"Search::Xapianc::Database_termlist_end", _wrap_Database_termlist_end},
{"Search::Xapianc::Database_positionlist_begin", _wrap_Database_positionlist_begin},
{"Search::Xapianc::Database_positionlist_end", _wrap_Database_positionlist_end},
{"Search::Xapianc::Database_allterms_begin", _wrap_Database_allterms_begin},
{"Search::Xapianc::Database_allterms_end", _wrap_Database_allterms_end},
{"Search::Xapianc::Database_get_doccount", _wrap_Database_get_doccount},
{"Search::Xapianc::Database_get_lastdocid", _wrap_Database_get_lastdocid},
{"Search::Xapianc::Database_get_avlength", _wrap_Database_get_avlength},
{"Search::Xapianc::Database_get_termfreq", _wrap_Database_get_termfreq},
{"Search::Xapianc::Database_term_exists", _wrap_Database_term_exists},
{"Search::Xapianc::Database_get_collection_freq", _wrap_Database_get_collection_freq},
{"Search::Xapianc::Database_get_value_freq", _wrap_Database_get_value_freq},
{"Search::Xapianc::Database_get_value_lower_bound", _wrap_Database_get_value_lower_bound},
{"Search::Xapianc::Database_get_value_upper_bound", _wrap_Database_get_value_upper_bound},
{"Search::Xapianc::Database_get_doclength_lower_bound", _wrap_Database_get_doclength_lower_bound},
{"Search::Xapianc::Database_get_doclength_upper_bound", _wrap_Database_get_doclength_upper_bound},
{"Search::Xapianc::Database_get_wdf_upper_bound", _wrap_Database_get_wdf_upper_bound},
{"Search::Xapianc::Database_valuestream_begin", _wrap_Database_valuestream_begin},
{"Search::Xapianc::Database_valuestream_end", _wrap_Database_valuestream_end},
{"Search::Xapianc::Database_get_doclength", _wrap_Database_get_doclength},
{"Search::Xapianc::Database_keep_alive", _wrap_Database_keep_alive},
{"Search::Xapianc::Database_get_document", _wrap_Database_get_document},
{"Search::Xapianc::Database_get_spelling_suggestion", _wrap_Database_get_spelling_suggestion},
{"Search::Xapianc::Database_spellings_begin", _wrap_Database_spellings_begin},
{"Search::Xapianc::Database_spellings_end", _wrap_Database_spellings_end},
{"Search::Xapianc::Database_synonyms_begin", _wrap_Database_synonyms_begin},
{"Search::Xapianc::Database_synonyms_end", _wrap_Database_synonyms_end},
{"Search::Xapianc::Database_synonym_keys_begin", _wrap_Database_synonym_keys_begin},
{"Search::Xapianc::Database_synonym_keys_end", _wrap_Database_synonym_keys_end},
{"Search::Xapianc::Database_get_metadata", _wrap_Database_get_metadata},
{"Search::Xapianc::Database_metadata_keys_begin", _wrap_Database_metadata_keys_begin},
{"Search::Xapianc::Database_metadata_keys_end", _wrap_Database_metadata_keys_end},
{"Search::Xapianc::Database_get_uuid", _wrap_Database_get_uuid},
{"Search::Xapianc::Database_has_positions", _wrap_Database_has_positions},
{"Search::Xapianc::delete_WritableDatabase", _wrap_delete_WritableDatabase},
{"Search::Xapianc::new_WritableDatabase", _wrap_new_WritableDatabase},
{"Search::Xapianc::WritableDatabase_commit", _wrap_WritableDatabase_commit},
{"Search::Xapianc::WritableDatabase_flush", _wrap_WritableDatabase_flush},
{"Search::Xapianc::WritableDatabase_begin_transaction", _wrap_WritableDatabase_begin_transaction},
{"Search::Xapianc::WritableDatabase_commit_transaction", _wrap_WritableDatabase_commit_transaction},
{"Search::Xapianc::WritableDatabase_cancel_transaction", _wrap_WritableDatabase_cancel_transaction},
{"Search::Xapianc::WritableDatabase_add_document", _wrap_WritableDatabase_add_document},
{"Search::Xapianc::WritableDatabase_delete_document", _wrap_WritableDatabase_delete_document},
{"Search::Xapianc::WritableDatabase_replace_document", _wrap_WritableDatabase_replace_document},
{"Search::Xapianc::WritableDatabase_delete_document_by_term", _wrap_WritableDatabase_delete_document_by_term},
{"Search::Xapianc::WritableDatabase_replace_document_by_term", _wrap_WritableDatabase_replace_document_by_term},
{"Search::Xapianc::WritableDatabase_add_spelling", _wrap_WritableDatabase_add_spelling},
{"Search::Xapianc::WritableDatabase_remove_spelling", _wrap_WritableDatabase_remove_spelling},
{"Search::Xapianc::WritableDatabase_add_synonym", _wrap_WritableDatabase_add_synonym},
{"Search::Xapianc::WritableDatabase_remove_synonym", _wrap_WritableDatabase_remove_synonym},
{"Search::Xapianc::WritableDatabase_clear_synonyms", _wrap_WritableDatabase_clear_synonyms},
{"Search::Xapianc::WritableDatabase_set_metadata", _wrap_WritableDatabase_set_metadata},
{"Search::Xapianc::WritableDatabase_get_description", _wrap_WritableDatabase_get_description},
{"Search::Xapianc::open_stub", _wrap_open_stub},
{"Search::Xapianc::brass_open", _wrap_brass_open},
{"Search::Xapianc::chert_open", _wrap_chert_open},
{"Search::Xapianc::flint_open", _wrap_flint_open},
{"Search::Xapianc::inmemory_open", _wrap_inmemory_open},
{"Search::Xapianc::remote_open", _wrap_remote_open},
{"Search::Xapianc::remote_open_writable", _wrap_remote_open_writable},
{"Search::Xapianc::delete_Query", _wrap_delete_Query},
{"Search::Xapianc::Query_get_length", _wrap_Query_get_length},
{"Search::Xapianc::Query_get_terms_begin", _wrap_Query_get_terms_begin},
{"Search::Xapianc::Query_get_terms_end", _wrap_Query_get_terms_end},
{"Search::Xapianc::Query_empty", _wrap_Query_empty},
{"Search::Xapianc::Query_serialise", _wrap_Query_serialise},
{"Search::Xapianc::Query_unserialise", _wrap_Query_unserialise},
{"Search::Xapianc::Query_get_description", _wrap_Query_get_description},
{"Search::Xapianc::new_Query", _wrap_new_Query},
{"Search::Xapianc::Stopper___call__", _wrap_Stopper___call__},
{"Search::Xapianc::delete_Stopper", _wrap_delete_Stopper},
{"Search::Xapianc::Stopper_get_description", _wrap_Stopper_get_description},
{"Search::Xapianc::new_SimpleStopper", _wrap_new_SimpleStopper},
{"Search::Xapianc::SimpleStopper_add", _wrap_SimpleStopper_add},
{"Search::Xapianc::SimpleStopper___call__", _wrap_SimpleStopper___call__},
{"Search::Xapianc::SimpleStopper_get_description", _wrap_SimpleStopper_get_description},
{"Search::Xapianc::SimpleStopper_stop_word", _wrap_SimpleStopper_stop_word},
{"Search::Xapianc::delete_SimpleStopper", _wrap_delete_SimpleStopper},
{"Search::Xapianc::delete_ValueRangeProcessor", _wrap_delete_ValueRangeProcessor},
{"Search::Xapianc::ValueRangeProcessor___call__", _wrap_ValueRangeProcessor___call__},
{"Search::Xapianc::new_StringValueRangeProcessor", _wrap_new_StringValueRangeProcessor},
{"Search::Xapianc::StringValueRangeProcessor___call__", _wrap_StringValueRangeProcessor___call__},
{"Search::Xapianc::delete_StringValueRangeProcessor", _wrap_delete_StringValueRangeProcessor},
{"Search::Xapianc::new_DateValueRangeProcessor", _wrap_new_DateValueRangeProcessor},
{"Search::Xapianc::DateValueRangeProcessor___call__", _wrap_DateValueRangeProcessor___call__},
{"Search::Xapianc::delete_DateValueRangeProcessor", _wrap_delete_DateValueRangeProcessor},
{"Search::Xapianc::new_NumberValueRangeProcessor", _wrap_new_NumberValueRangeProcessor},
{"Search::Xapianc::NumberValueRangeProcessor___call__", _wrap_NumberValueRangeProcessor___call__},
{"Search::Xapianc::delete_NumberValueRangeProcessor", _wrap_delete_NumberValueRangeProcessor},
{"Search::Xapianc::new_QueryParser", _wrap_new_QueryParser},
{"Search::Xapianc::delete_QueryParser", _wrap_delete_QueryParser},
{"Search::Xapianc::QueryParser_set_stemmer", _wrap_QueryParser_set_stemmer},
{"Search::Xapianc::QueryParser_set_stemming_strategy", _wrap_QueryParser_set_stemming_strategy},
{"Search::Xapianc::QueryParser_set_stopper", _wrap_QueryParser_set_stopper},
{"Search::Xapianc::QueryParser_set_default_op", _wrap_QueryParser_set_default_op},
{"Search::Xapianc::QueryParser_get_default_op", _wrap_QueryParser_get_default_op},
{"Search::Xapianc::QueryParser_set_database", _wrap_QueryParser_set_database},
{"Search::Xapianc::QueryParser_set_max_wildcard_expansion", _wrap_QueryParser_set_max_wildcard_expansion},
{"Search::Xapianc::QueryParser_parse_query", _wrap_QueryParser_parse_query},
{"Search::Xapianc::QueryParser_add_prefix", _wrap_QueryParser_add_prefix},
{"Search::Xapianc::QueryParser_add_boolean_prefix", _wrap_QueryParser_add_boolean_prefix},
{"Search::Xapianc::QueryParser_stoplist_begin", _wrap_QueryParser_stoplist_begin},
{"Search::Xapianc::QueryParser_stoplist_end", _wrap_QueryParser_stoplist_end},
{"Search::Xapianc::QueryParser_unstem_begin", _wrap_QueryParser_unstem_begin},
{"Search::Xapianc::QueryParser_unstem_end", _wrap_QueryParser_unstem_end},
{"Search::Xapianc::QueryParser_add_valuerangeprocessor", _wrap_QueryParser_add_valuerangeprocessor},
{"Search::Xapianc::QueryParser_get_corrected_query_string", _wrap_QueryParser_get_corrected_query_string},
{"Search::Xapianc::QueryParser_get_description", _wrap_QueryParser_get_description},
{"Search::Xapianc::sortable_serialise", _wrap_sortable_serialise},
{"Search::Xapianc::sortable_unserialise", _wrap_sortable_unserialise},
{"Search::Xapianc::new_Stem", _wrap_new_Stem},
{"Search::Xapianc::delete_Stem", _wrap_delete_Stem},
{"Search::Xapianc::Stem___call__", _wrap_Stem___call__},
{"Search::Xapianc::Stem_get_description", _wrap_Stem_get_description},
{"Search::Xapianc::Stem_get_available_languages", _wrap_Stem_get_available_languages},
{"Search::Xapianc::Stem_stem_word", _wrap_Stem_stem_word},
{"Search::Xapianc::new_TermGenerator", _wrap_new_TermGenerator},
{"Search::Xapianc::delete_TermGenerator", _wrap_delete_TermGenerator},
{"Search::Xapianc::TermGenerator_set_stemmer", _wrap_TermGenerator_set_stemmer},
{"Search::Xapianc::TermGenerator_set_stopper", _wrap_TermGenerator_set_stopper},
{"Search::Xapianc::TermGenerator_set_document", _wrap_TermGenerator_set_document},
{"Search::Xapianc::TermGenerator_get_document", _wrap_TermGenerator_get_document},
{"Search::Xapianc::TermGenerator_set_database", _wrap_TermGenerator_set_database},
{"Search::Xapianc::TermGenerator_set_flags", _wrap_TermGenerator_set_flags},
{"Search::Xapianc::TermGenerator_set_stemming_strategy", _wrap_TermGenerator_set_stemming_strategy},
{"Search::Xapianc::TermGenerator_index_text", _wrap_TermGenerator_index_text},
{"Search::Xapianc::TermGenerator_index_text_without_positions", _wrap_TermGenerator_index_text_without_positions},
{"Search::Xapianc::TermGenerator_increase_termpos", _wrap_TermGenerator_increase_termpos},
{"Search::Xapianc::TermGenerator_get_termpos", _wrap_TermGenerator_get_termpos},
{"Search::Xapianc::TermGenerator_set_termpos", _wrap_TermGenerator_set_termpos},
{"Search::Xapianc::TermGenerator_get_description", _wrap_TermGenerator_get_description},
{"Search::Xapianc::KeyMaker___call__", _wrap_KeyMaker___call__},
{"Search::Xapianc::delete_KeyMaker", _wrap_delete_KeyMaker},
{"Search::Xapianc::new_MultiValueKeyMaker", _wrap_new_MultiValueKeyMaker},
{"Search::Xapianc::MultiValueKeyMaker___call__", _wrap_MultiValueKeyMaker___call__},
{"Search::Xapianc::MultiValueKeyMaker_add_value", _wrap_MultiValueKeyMaker_add_value},
{"Search::Xapianc::delete_MultiValueKeyMaker", _wrap_delete_MultiValueKeyMaker},
{"Search::Xapianc::delete_Sorter", _wrap_delete_Sorter},
{"Search::Xapianc::new_MultiValueSorter", _wrap_new_MultiValueSorter},
{"Search::Xapianc::MultiValueSorter___call__", _wrap_MultiValueSorter___call__},
{"Search::Xapianc::MultiValueSorter_add", _wrap_MultiValueSorter_add},
{"Search::Xapianc::delete_MultiValueSorter", _wrap_delete_MultiValueSorter},
{"Search::Xapianc::new_ValueSetMatchDecider", _wrap_new_ValueSetMatchDecider},
{"Search::Xapianc::ValueSetMatchDecider_add_value", _wrap_ValueSetMatchDecider_add_value},
{"Search::Xapianc::ValueSetMatchDecider_remove_value", _wrap_ValueSetMatchDecider_remove_value},
{"Search::Xapianc::ValueSetMatchDecider___call__", _wrap_ValueSetMatchDecider___call__},
{"Search::Xapianc::delete_ValueSetMatchDecider", _wrap_delete_ValueSetMatchDecider},
{"Search::Xapianc::new_Compactor", _wrap_new_Compactor},
{"Search::Xapianc::delete_Compactor", _wrap_delete_Compactor},
{"Search::Xapianc::Compactor_set_block_size", _wrap_Compactor_set_block_size},
{"Search::Xapianc::Compactor_set_renumber", _wrap_Compactor_set_renumber},
{"Search::Xapianc::Compactor_set_multipass", _wrap_Compactor_set_multipass},
{"Search::Xapianc::Compactor_set_compaction_level", _wrap_Compactor_set_compaction_level},
{"Search::Xapianc::Compactor_set_destdir", _wrap_Compactor_set_destdir},
{"Search::Xapianc::Compactor_add_source", _wrap_Compactor_add_source},
{"Search::Xapianc::Compactor_compact", _wrap_Compactor_compact},
{"Search::Xapianc::Compactor_set_status", _wrap_Compactor_set_status},
{"Search::Xapianc::Compactor_resolve_duplicate_metadata", _wrap_Compactor_resolve_duplicate_metadata},
{0,0}
};
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic 
 * memory is used. Also, since swig_type_info structures store pointers to 
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization. 
 * The idea is that swig generates all the structures that are needed. 
 * The runtime then collects these partially filled structures. 
 * The SWIG_InitializeModule function takes these initial arrays out of 
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial 
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded. 
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the 
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int found, init;
  
  clientdata = clientdata;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpeters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif



#ifdef __cplusplus
extern "C"
#endif

XS(SWIG_init) {
  dXSARGS;
  int i;
  
  SWIG_InitializeModule(0);
  
  /* Install commands */
  for (i = 0; swig_commands[i].name; i++) {
    newXS((char*) swig_commands[i].name,swig_commands[i].wrapper, (char*)__FILE__);
  }
  
  /* Install variables */
  for (i = 0; swig_variables[i].name; i++) {
    SV *sv;
    sv = get_sv((char*) swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
    if (swig_variables[i].type) {
      SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
    } else {
      sv_setiv(sv,(IV) 0);
    }
    swig_create_magic(sv, (char *) swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); 
  }
  
  /* Install constant */
  for (i = 0; swig_constants[i].type; i++) {
    SV *sv;
    sv = get_sv((char*)swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
    switch(swig_constants[i].type) {
    case SWIG_INT:
      sv_setiv(sv, (IV) swig_constants[i].lvalue);
      break;
    case SWIG_FLOAT:
      sv_setnv(sv, (double) swig_constants[i].dvalue);
      break;
    case SWIG_STRING:
      sv_setpv(sv, (char *) swig_constants[i].pvalue);
      break;
    case SWIG_POINTER:
      SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
      break;
    case SWIG_BINARY:
      SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
      break;
    default:
      break;
    }
    SvREADONLY_on(sv);
  }
  
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_AND", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_AND)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_OR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_OR)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_AND_NOT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_AND_NOT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_XOR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_XOR)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_AND_MAYBE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_AND_MAYBE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_FILTER", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_FILTER)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_NEAR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_NEAR)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_PHRASE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_PHRASE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_VALUE_RANGE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_VALUE_RANGE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_SCALE_WEIGHT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_SCALE_WEIGHT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_ELITE_SET", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_ELITE_SET)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_VALUE_GE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_VALUE_GE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_VALUE_LE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_VALUE_LE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_BOOLEAN", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_PHRASE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_PHRASE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_LOVEHATE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_LOVEHATE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_BOOLEAN_ANY_CASE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_WILDCARD", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_WILDCARD)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_PURE_NOT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_PURE_NOT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_PARTIAL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_PARTIAL)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_SPELLING_CORRECTION", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_SPELLING_CORRECTION)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_SYNONYM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_SYNONYM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_AUTO_SYNONYMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_SYNONYMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_AUTO_MULTIWORD_SYNONYMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_DEFAULT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_DEFAULT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "STEM_NONE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_NONE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "STEM_SOME", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_SOME)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "STEM_ALL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_ALL)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_SPELLING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::FLAG_SPELLING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Error, (void*) "Search::Xapian::Error");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LogicError, (void*) "Search::Xapian::LogicError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RuntimeError, (void*) "Search::Xapian::RuntimeError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__AssertionError, (void*) "Search::Xapian::AssertionError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__InvalidArgumentError, (void*) "Search::Xapian::InvalidArgumentError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__InvalidOperationError, (void*) "Search::Xapian::InvalidOperationError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__UnimplementedError, (void*) "Search::Xapian::UnimplementedError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseError, (void*) "Search::Xapian::DatabaseError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseCorruptError, (void*) "Search::Xapian::DatabaseCorruptError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseCreateError, (void*) "Search::Xapian::DatabaseCreateError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseLockError, (void*) "Search::Xapian::DatabaseLockError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseModifiedError, (void*) "Search::Xapian::DatabaseModifiedError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseOpeningError, (void*) "Search::Xapian::DatabaseOpeningError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseVersionError, (void*) "Search::Xapian::DatabaseVersionError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DocNotFoundError, (void*) "Search::Xapian::DocNotFoundError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__FeatureUnavailableError, (void*) "Search::Xapian::FeatureUnavailableError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__InternalError, (void*) "Search::Xapian::InternalError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NetworkError, (void*) "Search::Xapian::NetworkError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NetworkTimeoutError, (void*) "Search::Xapian::NetworkTimeoutError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__QueryParserError, (void*) "Search::Xapian::QueryParserError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__SerialisationError, (void*) "Search::Xapian::SerialisationError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RangeError, (void*) "Search::Xapian::RangeError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PositionIterator, (void*) "Search::Xapian::PositionIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingIterator, (void*) "Search::Xapian::PostingIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermIterator, (void*) "Search::Xapian::TermIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueIterator, (void*) "Search::Xapian::ValueIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Document, (void*) "Search::Xapian::Document");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingSource, (void*) "Search::Xapian::PostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValuePostingSource, (void*) "Search::Xapian::ValuePostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueWeightPostingSource, (void*) "Search::Xapian::ValueWeightPostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, (void*) "Search::Xapian::DecreasingValueWeightPostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueMapPostingSource, (void*) "Search::Xapian::ValueMapPostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__FixedWeightPostingSource, (void*) "Search::Xapian::FixedWeightPostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSet, (void*) "Search::Xapian::MSet");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSetIterator, (void*) "Search::Xapian::MSetIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESet, (void*) "Search::Xapian::ESet");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESetIterator, (void*) "Search::Xapian::ESetIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RSet, (void*) "Search::Xapian::RSet");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchDecider, (void*) "Search::Xapian::MatchDecider");
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Enquire_ASCENDING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Enquire::ASCENDING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Enquire_DESCENDING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Enquire::DESCENDING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Enquire_DONT_CARE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Enquire::DONT_CARE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Enquire_INCLUDE_QUERY_TERMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Enquire::INCLUDE_QUERY_TERMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Enquire_USE_EXACT_TERMFREQ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Enquire::USE_EXACT_TERMFREQ)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Enquire, (void*) "Search::Xapian::Enquire");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Registry, (void*) "Search::Xapian::Registry");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Weight, (void*) "Search::Xapian::Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BoolWeight, (void*) "Search::Xapian::BoolWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25Weight, (void*) "Search::Xapian::BM25Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TradWeight, (void*) "Search::Xapian::TradWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchSpy, (void*) "Search::Xapian::MatchSpy");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueCountMatchSpy, (void*) "Search::Xapian::ValueCountMatchSpy");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Database, (void*) "Search::Xapian::Database");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__WritableDatabase, (void*) "Search::Xapian::WritableDatabase");
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_CREATE_OR_OPEN", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_CREATE_OR_OPEN)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_CREATE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_CREATE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_CREATE_OR_OVERWRITE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_CREATE_OR_OVERWRITE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_OPEN", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_OPEN)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_AND", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_AND)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_OR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_OR)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_AND_NOT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_AND_NOT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_XOR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_XOR)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_AND_MAYBE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_AND_MAYBE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_FILTER", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_FILTER)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_NEAR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_NEAR)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_PHRASE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_PHRASE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_VALUE_RANGE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_VALUE_RANGE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_SCALE_WEIGHT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_SCALE_WEIGHT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_ELITE_SET", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_ELITE_SET)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_VALUE_GE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_VALUE_GE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_VALUE_LE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_VALUE_LE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_SYNONYM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_SYNONYM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Query, (void*) "Search::Xapian::Query");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stopper, (void*) "Search::Xapian::Stopper");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__SimpleStopper, (void*) "Search::Xapian::SimpleStopper");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueRangeProcessor, (void*) "Search::Xapian::ValueRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__StringValueRangeProcessor, (void*) "Search::Xapian::StringValueRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateValueRangeProcessor, (void*) "Search::Xapian::DateValueRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberValueRangeProcessor, (void*) "Search::Xapian::NumberValueRangeProcessor");
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_BOOLEAN", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_PHRASE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_PHRASE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_LOVEHATE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_LOVEHATE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_BOOLEAN_ANY_CASE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_WILDCARD", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_WILDCARD)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_PURE_NOT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_PURE_NOT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_PARTIAL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_PARTIAL)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_SPELLING_CORRECTION", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_SPELLING_CORRECTION)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_SYNONYM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_SYNONYM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_AUTO_SYNONYMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_SYNONYMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_AUTO_MULTIWORD_SYNONYMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_DEFAULT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_DEFAULT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_STEM_NONE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_NONE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_STEM_SOME", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_SOME)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_STEM_ALL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_ALL)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_STEM_ALL_Z", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_ALL_Z)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__QueryParser, (void*) "Search::Xapian::QueryParser");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stem, (void*) "Search::Xapian::Stem");
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_FLAG_SPELLING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::FLAG_SPELLING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_STEM_NONE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::STEM_NONE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_STEM_SOME", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::STEM_SOME)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_STEM_ALL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::STEM_ALL)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_STEM_ALL_Z", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::STEM_ALL_Z)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermGenerator, (void*) "Search::Xapian::TermGenerator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__KeyMaker, (void*) "Search::Xapian::KeyMaker");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MultiValueKeyMaker, (void*) "Search::Xapian::MultiValueKeyMaker");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Sorter, (void*) "Search::Xapian::Sorter");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MultiValueSorter, (void*) "Search::Xapian::MultiValueSorter");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueSetMatchDecider, (void*) "Search::Xapian::ValueSetMatchDecider");
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Compactor_STANDARD", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Compactor::STANDARD)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Compactor_FULL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Compactor::FULL)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/data/home/olly/tmp/xapian-svn-snapshot/tags/1.2.12/xapian/swig/Lib/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Compactor_FULLER", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Compactor::FULLER)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Compactor, (void*) "Search::Xapian::Compactor");
  ST(0) = &PL_sv_yes;
  XSRETURN(1);
}

