/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.3.0
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

// Older Perl headers contain things which cause warnings with more recent
// C++ compilers.  There's nothing we can really do about them, so just
// suppress them.
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wreserved-user-defined-literal"
#elif defined __GNUC__
// Warning added in GCC 4.8 and we don't support anything older.
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wliteral-suffix"
#endif

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

#ifdef __clang__
# pragma clang diagnostic pop
#elif defined __GNUC__
# pragma GCC diagnostic pop
#endif



#define SWIG_VERSION 0x040300
#define SWIGPERL
#define SWIG_CASTRANK_MODE

/* -----------------------------------------------------------------------------
 *  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 defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  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

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif

#if defined(__cplusplus) && __cplusplus >=201103L
# define SWIG_NULLPTR nullptr
#else
# define SWIG_NULLPTR NULL
#endif 

/* -----------------------------------------------------------------------------
 * swigcompat.swg
 *
 * Macros to provide support compatibility with older C and C++ standards.
 * ----------------------------------------------------------------------------- */

/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
 * if you're missing it.
 */
#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
     (defined __cplusplus && __cplusplus >= 201103L) || \
     defined SWIG_HAVE_SNPRINTF) && \
    !defined SWIG_NO_SNPRINTF
# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
#else
/* Fallback versions ignore the buffer size, but most of our uses either have a
 * fixed maximum possible size or dynamically allocate a buffer that's large
 * enough.
 */
# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
#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
#define SWIG_POINTER_NO_NULL       0x4
#define SWIG_POINTER_CLEAR         0x8
#define SWIG_POINTER_RELEASE       (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)

/* 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 returning 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)
/* Runtime errors are < 0 */
#define SWIG_ERROR                 (-1)
/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
/* Errors < -200 are generic runtime specific errors */
#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)

#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 temporary 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 object 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(r) (r)
#  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 equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  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) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
  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(const 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.  Choose the last
     name. It should be the most specific; a fully resolved name
     but not necessarily with default template parameters expanded. */
  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) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  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 {
      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";
  const unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    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) {
  unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    char d = *(c++);
    unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = (unsigned char)((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = (unsigned char)((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (unsigned char)(d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (unsigned char)(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

/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#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

#if __GNUC__ >= 10
#if defined(__cplusplus)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wvolatile"
#endif
#endif

#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#if __GNUC__ >= 10
#if defined(__cplusplus)
#pragma GCC diagnostic pop
#endif
#endif

/* PERL_REVISION was added in Perl 5.6. */
#if !defined PERL_REVISION || (PERL_REVISION-0 == 5 && PERL_VERSION-0 < 8)
# error SWIG requires Perl >= 5.8.0
#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

#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) {
  switch(code) {
  case SWIG_MemoryError:
    return "MemoryError";
  case SWIG_IOError:
    return "IOError";
  case SWIG_RuntimeError:
    return "RuntimeError";
  case SWIG_IndexError:
    return "IndexError";
  case SWIG_TypeError:
    return "TypeError";
  case SWIG_DivisionByZero:
    return "ZeroDivisionError";
  case SWIG_OverflowError:
    return "OverflowError";
  case SWIG_SyntaxError:
    return "SyntaxError";
  case SWIG_ValueError:
    return "ValueError";
  case SWIG_SystemError:
    return "SystemError";
  case SWIG_AttributeError:
    return "AttributeError";
  default:
    return "RuntimeError";
  }
}


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

#define SWIG_PERL_OBJECT_DECL
#define SWIG_PERL_OBJECT_CALL

/* 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)
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Perl_AcquirePtr(ptr, src)
#define swig_owntype                                    int

/* 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(clientdata)
#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(get_sv("@", GV_ADD), "%s %s", 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 */
#ifndef MULTIPLICITY
#  define SWIG_CALLXS(_name) _name(cv)
#else
#  define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv)
#endif

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

static void SWIGUNUSED SWIG_croak_null()
{
  SV *err = get_sv("@", GV_ADD);
  if (sv_isobject(err))
    croak(0);
  else
    croak("%s", SvPV_nolen(err));
}


/* 
   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 (strcmp(SWIG_Perl_TypeProxyName(iter->type), 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;
}

/* Acquire a pointer value */

SWIGRUNTIME int
SWIG_Perl_AcquirePtr(SWIG_MAYBE_PERL_OBJECT SV *SWIGUNUSEDPARM(sv), int SWIGUNUSEDPARM(own)) {
  /* TODO */
  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;
  int check_owned_pointer_release = (flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE;

  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 (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : 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);
#ifdef SWIG_DIRECTORS
    if (!tc && !sv_derived_from(sv,SWIG_Perl_TypeProxyName(_t))) {
#else
    if (!tc) {
#endif
      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) || check_owned_pointer_release)) {
    /* 
     *  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);
    int owned = 0;
    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)) {
        owned = 1;
        if (flags & SWIG_POINTER_DISOWN) {
          hv_delete_ent(hv, obj, 0, 0);
        }
      }
    }
    if (check_owned_pointer_release && !owned) {
      return SWIG_ERROR_RELEASE_NOT_OWNED;
    }
  }

  if (tsv && (flags & SWIG_POINTER_CLEAR)) {
    SvIV_set(tsv, 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, 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, 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 pointer 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 */
#ifdef __cplusplus
#  define swig_create_magic(s,a,b,c) _swig_create_magic(s,const_cast<char*>(a),b,c)
#else
#  define swig_create_magic(s,a,b,c) _swig_create_magic(s,(char*)(a),b,c)
#endif
#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
{
  MAGIC *mg;
  sv_magic(sv,sv,'U',name,(I32)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 *SWIGUNUSEDPARM(clientdata)) {
  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 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
#ifdef seed
  #undef seed
#endif

#ifdef bool
  /* Leave if macro is from C99 stdbool.h */
  #ifndef __bool_true_false_are_defined
    #undef bool
  #endif
#endif




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

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



  #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__BB2Weight swig_types[1]
#define SWIGTYPE_p_Xapian__BM25PlusWeight swig_types[2]
#define SWIGTYPE_p_Xapian__BM25Weight swig_types[3]
#define SWIGTYPE_p_Xapian__BoolWeight swig_types[4]
#define SWIGTYPE_p_Xapian__Compactor swig_types[5]
#define SWIGTYPE_p_Xapian__CoordWeight swig_types[6]
#define SWIGTYPE_p_Xapian__DLHWeight swig_types[7]
#define SWIGTYPE_p_Xapian__DPHWeight swig_types[8]
#define SWIGTYPE_p_Xapian__Database swig_types[9]
#define SWIGTYPE_p_Xapian__DatabaseClosedError swig_types[10]
#define SWIGTYPE_p_Xapian__DatabaseCorruptError swig_types[11]
#define SWIGTYPE_p_Xapian__DatabaseCreateError swig_types[12]
#define SWIGTYPE_p_Xapian__DatabaseError swig_types[13]
#define SWIGTYPE_p_Xapian__DatabaseLockError swig_types[14]
#define SWIGTYPE_p_Xapian__DatabaseModifiedError swig_types[15]
#define SWIGTYPE_p_Xapian__DatabaseNotFoundError swig_types[16]
#define SWIGTYPE_p_Xapian__DatabaseOpeningError swig_types[17]
#define SWIGTYPE_p_Xapian__DatabaseVersionError swig_types[18]
#define SWIGTYPE_p_Xapian__DateRangeProcessor swig_types[19]
#define SWIGTYPE_p_Xapian__DateValueRangeProcessor swig_types[20]
#define SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource swig_types[21]
#define SWIGTYPE_p_Xapian__DocNotFoundError swig_types[22]
#define SWIGTYPE_p_Xapian__Document swig_types[23]
#define SWIGTYPE_p_Xapian__ESet swig_types[24]
#define SWIGTYPE_p_Xapian__ESetIterator swig_types[25]
#define SWIGTYPE_p_Xapian__Enquire swig_types[26]
#define SWIGTYPE_p_Xapian__Error swig_types[27]
#define SWIGTYPE_p_Xapian__ExpandDecider swig_types[28]
#define SWIGTYPE_p_Xapian__ExpandDeciderAnd swig_types[29]
#define SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix swig_types[30]
#define SWIGTYPE_p_Xapian__ExpandDeciderFilterTerms swig_types[31]
#define SWIGTYPE_p_Xapian__FeatureUnavailableError swig_types[32]
#define SWIGTYPE_p_Xapian__FieldProcessor swig_types[33]
#define SWIGTYPE_p_Xapian__FixedWeightPostingSource swig_types[34]
#define SWIGTYPE_p_Xapian__GreatCircleMetric swig_types[35]
#define SWIGTYPE_p_Xapian__IfB2Weight swig_types[36]
#define SWIGTYPE_p_Xapian__InL2Weight swig_types[37]
#define SWIGTYPE_p_Xapian__IneB2Weight swig_types[38]
#define SWIGTYPE_p_Xapian__InternalError swig_types[39]
#define SWIGTYPE_p_Xapian__InvalidArgumentError swig_types[40]
#define SWIGTYPE_p_Xapian__InvalidOperationError swig_types[41]
#define SWIGTYPE_p_Xapian__KeyMaker swig_types[42]
#define SWIGTYPE_p_Xapian__LMWeight swig_types[43]
#define SWIGTYPE_p_Xapian__LatLongCoord swig_types[44]
#define SWIGTYPE_p_Xapian__LatLongCoords swig_types[45]
#define SWIGTYPE_p_Xapian__LatLongCoordsIterator swig_types[46]
#define SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker swig_types[47]
#define SWIGTYPE_p_Xapian__LatLongDistancePostingSource swig_types[48]
#define SWIGTYPE_p_Xapian__LatLongMetric swig_types[49]
#define SWIGTYPE_p_Xapian__LogicError swig_types[50]
#define SWIGTYPE_p_Xapian__MSet swig_types[51]
#define SWIGTYPE_p_Xapian__MSetIterator swig_types[52]
#define SWIGTYPE_p_Xapian__MatchDecider swig_types[53]
#define SWIGTYPE_p_Xapian__MatchSpy swig_types[54]
#define SWIGTYPE_p_Xapian__MultiValueKeyMaker swig_types[55]
#define SWIGTYPE_p_Xapian__NetworkError swig_types[56]
#define SWIGTYPE_p_Xapian__NetworkTimeoutError swig_types[57]
#define SWIGTYPE_p_Xapian__NumberRangeProcessor swig_types[58]
#define SWIGTYPE_p_Xapian__NumberValueRangeProcessor swig_types[59]
#define SWIGTYPE_p_Xapian__PL2PlusWeight swig_types[60]
#define SWIGTYPE_p_Xapian__PL2Weight swig_types[61]
#define SWIGTYPE_p_Xapian__PositionIterator swig_types[62]
#define SWIGTYPE_p_Xapian__PostingIterator swig_types[63]
#define SWIGTYPE_p_Xapian__PostingSource swig_types[64]
#define SWIGTYPE_p_Xapian__Query swig_types[65]
#define SWIGTYPE_p_Xapian__QueryParser swig_types[66]
#define SWIGTYPE_p_Xapian__QueryParserError swig_types[67]
#define SWIGTYPE_p_Xapian__RSet swig_types[68]
#define SWIGTYPE_p_Xapian__RangeError swig_types[69]
#define SWIGTYPE_p_Xapian__RangeProcessor swig_types[70]
#define SWIGTYPE_p_Xapian__Registry swig_types[71]
#define SWIGTYPE_p_Xapian__RuntimeError swig_types[72]
#define SWIGTYPE_p_Xapian__SerialisationError swig_types[73]
#define SWIGTYPE_p_Xapian__SimpleStopper swig_types[74]
#define SWIGTYPE_p_Xapian__Stem swig_types[75]
#define SWIGTYPE_p_Xapian__StemImplementation swig_types[76]
#define SWIGTYPE_p_Xapian__Stopper swig_types[77]
#define SWIGTYPE_p_Xapian__StringValueRangeProcessor swig_types[78]
#define SWIGTYPE_p_Xapian__TermGenerator swig_types[79]
#define SWIGTYPE_p_Xapian__TermIterator swig_types[80]
#define SWIGTYPE_p_Xapian__TfIdfWeight swig_types[81]
#define SWIGTYPE_p_Xapian__TradWeight swig_types[82]
#define SWIGTYPE_p_Xapian__UnimplementedError swig_types[83]
#define SWIGTYPE_p_Xapian__ValueCountMatchSpy swig_types[84]
#define SWIGTYPE_p_Xapian__ValueIterator swig_types[85]
#define SWIGTYPE_p_Xapian__ValueMapPostingSource swig_types[86]
#define SWIGTYPE_p_Xapian__ValuePostingSource swig_types[87]
#define SWIGTYPE_p_Xapian__ValueRangeProcessor swig_types[88]
#define SWIGTYPE_p_Xapian__ValueSetMatchDecider swig_types[89]
#define SWIGTYPE_p_Xapian__ValueWeightPostingSource swig_types[90]
#define SWIGTYPE_p_Xapian__Weight swig_types[91]
#define SWIGTYPE_p_Xapian__WildcardError swig_types[92]
#define SWIGTYPE_p_Xapian__WritableDatabase swig_types[93]
#define SWIGTYPE_p_char swig_types[94]
#define SWIGTYPE_p_compaction_level swig_types[95]
#define SWIGTYPE_p_const_reference swig_types[96]
#define SWIGTYPE_p_docid_order swig_types[97]
#define SWIGTYPE_p_double swig_types[98]
#define SWIGTYPE_p_feature_flag swig_types[99]
#define SWIGTYPE_p_flags swig_types[100]
#define SWIGTYPE_p_int swig_types[101]
#define SWIGTYPE_p_reference swig_types[102]
#define SWIGTYPE_p_std__string swig_types[103]
#define SWIGTYPE_p_stem_strategy swig_types[104]
#define SWIGTYPE_p_stop_strategy swig_types[105]
#define SWIGTYPE_p_type_smoothing swig_types[106]
#define SWIGTYPE_p_unsigned_int swig_types[107]
#define SWIGTYPE_p_unsigned_long swig_types[108]
static swig_type_info *swig_types[110];
static swig_module_info swig_module = {swig_types, 109, 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_Xapian

#define SWIG_name   "Xapianc::boot_Xapian"
#define SWIG_prefix "Xapianc::"

#ifdef __cplusplus
#include <utility>
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigSmartPointer {
    T *ptr;
    SwigSmartPointer(T *p) : ptr(p) { }
    ~SwigSmartPointer() { delete ptr; }
    SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
    void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
#if __cplusplus >=201103L
  SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
  operator T&&() const { return std::move(*pointer.ptr); }
#else
  operator T&() const { return *pointer.ptr; }
#endif
  T *operator&() const { return pointer.ptr; }
  static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
};

/*
 * SwigValueInit() is a generic initialisation solution as the following approach:
 * 
 *       T c_result = T();
 * 
 * doesn't compile for all types for example:
 * 
 *       unsigned int c_result = unsigned int();
 */
template <typename T> T SwigValueInit() {
  return T();
}

#if __cplusplus >=201103L
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
#else
# define SWIG_STD_MOVE(OBJ) OBJ
#endif

#endif


#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 MULTIPLICITY
SWIGEXPORT void SWIG_init (CV* cv);
#else
SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
#endif


/* perl.i: SWIG interface file for the Perl bindings
 *
 * Copyright (C) 2009 Kosei Moriyama
 * Copyright (C) 2011,2012,2013,2015,2016,2019,2020 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
 */


/** @file
 * @brief Header for SWIG interface file for Xapian.
 */
/* Copyright (C) 2005,2006,2007,2008,2009,2011,2012,2013,2014,2015,2016 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

#include <xapian.h>

#include <fstream>
#include <iostream>
#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_REMOTE_BACKEND
    namespace Remote {
	static Database open(const string &, unsigned int, useconds_t = 0, useconds_t = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}

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

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

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

}


#include <typeinfo>
#include <stdexcept>


#include <string>


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


#include <vector>


#include <algorithm>


#include <map>


#include <utility>


SWIGINTERNINLINE SV *
SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
{
  SV *sv;
  if (IVSIZE >= sizeof(value) || (value >= IV_MIN && value <= IV_MAX))
    sv = newSViv(value);
  else
    sv = newSVpvf("%ld", value);
  return sv_2mortal(sv);
}


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


class XapianSWIGQueryItor {
    AV * array;

    int i;

  public:
    XapianSWIGQueryItor() { }

    void begin(AV * array_) {
	array = array_;
	i = 0;
    }

    void end(int n) {
	i = n;
    }

    XapianSWIGQueryItor & operator++() {
	++i;
	return *this;
    }

    Xapian::Query operator*() const {
	SV **svp = av_fetch(array, i, 0);
	if( svp == NULL )
	    croak("Unexpected NULL returned by av_fetch()");
	SV *sv = *svp;

	if (!SvOK(sv)) {
	    croak("USAGE: Xapian::Query->new(OP, @TERMS_OR_QUERY_OBJECTS)");
	}

	Xapian::Query *q;
	if (SWIG_ConvertPtr(sv, (void**)&q,
			    SWIGTYPE_p_Xapian__Query, 0) == SWIG_OK) {
	    return *q;
	}

	STRLEN len;
	const char * ptr = SvPV(sv, len);
	return Xapian::Query(string(ptr, len));
    }

    bool operator==(const XapianSWIGQueryItor & o) {
	return i == o.i;
    }

    bool operator!=(const XapianSWIGQueryItor & o) {
	return !(*this == o);
    }

    typedef std::input_iterator_tag iterator_category;
    typedef Xapian::Query value_type;
    typedef Xapian::termcount_diff difference_type;
    typedef Xapian::Query * pointer;
    typedef Xapian::Query & reference;
};



Xapian::Query * newN(int op_, SV *q_) {
    Xapian::Query::op op = (Xapian::Query::op)op_;
    XapianSWIGQueryItor b, e;

    AV *q = (AV *) SvRV(q_);

    b.begin(q);
    e.end(av_len(q) + 1);

    try {
	return new Xapian::Query(op, b, e);
    } catch (const Xapian::Error &error) {
	croak( "Exception: %s", error.get_msg().c_str() );
    }
}


#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


#include <stdlib.h>
#ifdef _MSC_VER
# ifndef strtoull
#  define strtoull _strtoui64
# endif
# ifndef strtoll
#  define strtoll _strtoi64
# 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, cx, rd;
   errno = 0;
   fx = floor(x);
   cx = ceil(x);
   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 (SvUOK(obj)) {
    UV v = SvUV(obj);
    if (UVSIZE < sizeof(*val) || v <= LONG_MAX) {
      if (val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } else if (SvIOK(obj)) {
    IV v = SvIV(obj);
    if (IVSIZE <= sizeof(*val) || (v >= LONG_MIN && v <= LONG_MAX)) {
      if(val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } 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;
}


class perlExpandDecider : public Xapian::ExpandDecider {
    SV* callback;

  public:
    perlExpandDecider(SV* func) {
	callback = newSVsv(func);
    }

    ~perlExpandDecider() {
	SvREFCNT_dec(callback);
    }

    bool operator()(const std::string& term) const override {
	dSP;

	ENTER;
	SAVETMPS;

	PUSHMARK(SP);

	SV* arg = sv_newmortal();
	sv_setpvn(arg, term.data(), term.size());
	XPUSHs(arg);
	PUTBACK;

	int count = call_sv(callback, G_SCALAR);

	SPAGAIN;
	if (count != 1)
	    croak("callback function should return 1 value, got %d", count);

	bool result = POPi;

	PUTBACK;

	FREETMPS;
	LEAVE;

	return result;
    }
};


class perlStopper : public Xapian::Stopper {
    SV* callback;

  public:
    perlStopper(SV* func) {
	callback = newSVsv(func);
    }

    ~perlStopper() {
	SvREFCNT_dec(callback);
    }

    bool operator()(const std::string& term) const override {
	dSP;

	ENTER;
	SAVETMPS;

	PUSHMARK(SP);

	SV* arg = sv_newmortal();
	sv_setpvn(arg, term.data(), term.size());
	XPUSHs(arg);
	PUTBACK;

	int count = call_sv(callback, G_SCALAR);

	SPAGAIN;
	if (count != 1)
	    croak("callback function should return 1 value, got %d", count);

	bool result = POPi;

	PUTBACK;

	FREETMPS;
	LEAVE;

	return result;
    }
};


class perlMatchDecider : public Xapian::MatchDecider {
    SV* callback;

  public:
    perlMatchDecider(SV* func) {
	callback = newSVsv(func);
    }

    ~perlMatchDecider() {
	SvREFCNT_dec(callback);
    }

    bool operator()(const Xapian::Document& doc) const override {
	dSP;

	ENTER;
	SAVETMPS;

	PUSHMARK(SP);

	XPUSHs(SWIG_NewPointerObj(const_cast<Xapian::Document*>(&doc),
				  SWIGTYPE_p_Xapian__Document, 0));
	PUTBACK;

	int count = call_sv(callback, G_SCALAR);

	SPAGAIN;
	if (count != 1)
	    croak("callback function should return 1 value, got %d", count);

	bool result = POPi;

	PUTBACK;

	FREETMPS;
	LEAVE;

	return result;
    }
};


class perlStemImplementation : public Xapian::StemImplementation {
    SV* callback;

  public:
    perlStemImplementation(SV* func) {
	callback = newSVsv(func);
    }

    ~perlStemImplementation() {
	SvREFCNT_dec(callback);
    }

    std::string operator()(const std::string& word) override {
	dSP;

	ENTER;
	SAVETMPS;

	PUSHMARK(SP);

	SV* arg = sv_newmortal();
	sv_setpvn(arg, word.data(), word.size());
	XPUSHs(arg);
	PUTBACK;

	int count = call_sv(callback, G_SCALAR);

	SPAGAIN;
	if (count != 1)
	    croak("callback function should return 1 value, got %d", count);

	SV* sv = POPs;
	STRLEN len;
	const char* ptr = SvPV(sv, len);
	std::string result(ptr, len);

	PUTBACK;

	FREETMPS;
	LEAVE;

	return result;
    }

    std::string get_description() const override {
	return "perlStemImplementation()";
    }
};


class perlKeyMaker : public Xapian::KeyMaker {
    SV* callback;

  public:
    perlKeyMaker(SV* func) {
	callback = newSVsv(func);
    }

    ~perlKeyMaker() {
	SvREFCNT_dec(callback);
    }

    std::string operator()(const Xapian::Document& doc) const override {
	dSP;

	ENTER;
	SAVETMPS;

	PUSHMARK(SP);

	XPUSHs(SWIG_NewPointerObj(const_cast<Xapian::Document*>(&doc),
				  SWIGTYPE_p_Xapian__Document, 0));
	PUTBACK;

	int count = call_sv(callback, G_SCALAR);

	SPAGAIN;
	if (count != 1)
	    croak("callback function should return 1 value, got %d", count);

	SV* sv = POPs;
	STRLEN len;
	const char* ptr = SvPV(sv, len);
	std::string result(ptr, len);

	PUTBACK;

	FREETMPS;
	LEAVE;

	return result;
    }
};


class perlRangeProcessor : public Xapian::RangeProcessor {
    SV* callback;

  public:
    perlRangeProcessor(SV* func) {
	callback = newSVsv(func);
    }

    ~perlRangeProcessor() {
	SvREFCNT_dec(callback);
    }

    Xapian::Query operator()(const std::string& begin,
			     const std::string& end) override {
	dSP;

	ENTER;
	SAVETMPS;

	PUSHMARK(SP);
	EXTEND(SP, 2);
	SV* arg = sv_newmortal();
	sv_setpvn(arg, begin.data(), begin.size());
	PUSHs(arg);
	arg = sv_newmortal();
	sv_setpvn(arg, end.data(), end.size());
	PUSHs(arg);
	PUTBACK;

	int count = call_sv(callback, G_SCALAR);

	SPAGAIN;
	if (count != 1)
	    croak("callback function should return 1 value, got %d", count);

	// Allow the function to return a string or Query object.
	SV* sv = POPs;
	if (!SvOK(sv))
	    croak("function must return a string or Query object");

	Xapian::Query result;
	Xapian::Query* q;
	if (SWIG_ConvertPtr(sv, (void**)&q,
			    SWIGTYPE_p_Xapian__Query, 0) == SWIG_OK) {
	    result = *q;
	} else {
	    STRLEN len;
	    const char* ptr = SvPV(sv, len);
	    result = Xapian::Query(string(ptr, len));
	}

	PUTBACK;

	FREETMPS;
	LEAVE;

	return result;
    }
};


class perlFieldProcessor : public Xapian::FieldProcessor {
    SV* callback;

  public:
    perlFieldProcessor(SV* func) {
	callback = newSVsv(func);
    }

    ~perlFieldProcessor() {
	SvREFCNT_dec(callback);
    }

    Xapian::Query operator()(const std::string& str) override {
	dSP;

	ENTER;
	SAVETMPS;

	PUSHMARK(SP);

	SV* arg = sv_newmortal();
	sv_setpvn(arg, str.data(), str.size());
	XPUSHs(arg);
	PUTBACK;

	int count = call_sv(callback, G_SCALAR);

	SPAGAIN;
	if (count != 1)
	    croak("callback function should return 1 value, got %d", count);

	// Allow the function to return a string or Query object.
	SV* sv = POPs;
	if (!SvOK(sv))
	    croak("function must return a string or Query object");

	Xapian::Query result;
	Xapian::Query* q;
	if (SWIG_ConvertPtr(sv, (void**)&q,
			    SWIGTYPE_p_Xapian__Query, 0) == SWIG_OK) {
	    result = *q;
	} else {
	    STRLEN len;
	    const char* ptr = SvPV(sv, len);
	    result = Xapian::Query(string(ptr, len));
	}

	PUTBACK;

	FREETMPS;
	LEAVE;

	return result;
    }
};


class perlMatchSpy : public Xapian::MatchSpy {
    SV* callback;

  public:
    perlMatchSpy(SV* func) {
	callback = newSVsv(func);
    }

    ~perlMatchSpy() {
	SvREFCNT_dec(callback);
    }

    void operator()(const Xapian::Document& doc, double wt) override {
	dSP;

	ENTER;
	SAVETMPS;

	PUSHMARK(SP);
	EXTEND(SP, 2);
	PUSHs(SWIG_NewPointerObj(const_cast<Xapian::Document*>(&doc),
				 SWIGTYPE_p_Xapian__Document, 0));
	mPUSHn(wt);
	PUTBACK;

	(void)call_sv(callback, G_VOID);

	SPAGAIN;
	PUTBACK;

	FREETMPS;
	LEAVE;
    }
};


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::DatabaseClosedError &e) {
	void * p = (void *) new Xapian::DatabaseClosedError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseClosedError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseClosedError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseClosedError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DatabaseNotFoundError &e) {
	void * p = (void *) new Xapian::DatabaseNotFoundError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseNotFoundError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseNotFoundError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseNotFoundError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::WildcardError &e) {
	void * p = (void *) new Xapian::WildcardError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::WildcardError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::WildcardError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::WildcardError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::RangeError &e) {
	void * p = (void *) new Xapian::RangeError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::RangeError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::RangeError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::RangeError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::SerialisationError &e) {
	void * p = (void *) new Xapian::SerialisationError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::SerialisationError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::SerialisationError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::SerialisationError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::QueryParserError &e) {
	void * p = (void *) new Xapian::QueryParserError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::QueryParserError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::QueryParserError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::QueryParserError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::NetworkTimeoutError &e) {
	void * p = (void *) new Xapian::NetworkTimeoutError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::NetworkTimeoutError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::NetworkTimeoutError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::NetworkTimeoutError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::NetworkError &e) {
	void * p = (void *) new Xapian::NetworkError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::NetworkError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::NetworkError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::NetworkError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::InternalError &e) {
	void * p = (void *) new Xapian::InternalError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::InternalError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::InternalError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::InternalError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::FeatureUnavailableError &e) {
	void * p = (void *) new Xapian::FeatureUnavailableError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::FeatureUnavailableError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::FeatureUnavailableError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::FeatureUnavailableError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DocNotFoundError &e) {
	void * p = (void *) new Xapian::DocNotFoundError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DocNotFoundError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DocNotFoundError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DocNotFoundError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DatabaseVersionError &e) {
	void * p = (void *) new Xapian::DatabaseVersionError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseVersionError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseVersionError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseVersionError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DatabaseOpeningError &e) {
	void * p = (void *) new Xapian::DatabaseOpeningError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseOpeningError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseOpeningError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseOpeningError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DatabaseModifiedError &e) {
	void * p = (void *) new Xapian::DatabaseModifiedError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseModifiedError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseModifiedError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseModifiedError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DatabaseLockError &e) {
	void * p = (void *) new Xapian::DatabaseLockError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseLockError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseLockError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseLockError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DatabaseCreateError &e) {
	void * p = (void *) new Xapian::DatabaseCreateError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseCreateError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseCreateError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseCreateError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DatabaseCorruptError &e) {
	void * p = (void *) new Xapian::DatabaseCorruptError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseCorruptError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseCorruptError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseCorruptError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::DatabaseError &e) {
	void * p = (void *) new Xapian::DatabaseError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::DatabaseError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::DatabaseError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::DatabaseError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::UnimplementedError &e) {
	void * p = (void *) new Xapian::UnimplementedError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::UnimplementedError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::UnimplementedError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::UnimplementedError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::InvalidOperationError &e) {
	void * p = (void *) new Xapian::InvalidOperationError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::InvalidOperationError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::InvalidOperationError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::InvalidOperationError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::InvalidArgumentError &e) {
	void * p = (void *) new Xapian::InvalidArgumentError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::InvalidArgumentError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::InvalidArgumentError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::InvalidArgumentError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::AssertionError &e) {
	void * p = (void *) new Xapian::AssertionError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::AssertionError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::AssertionError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::AssertionError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::RuntimeError &e) {
	void * p = (void *) new Xapian::RuntimeError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::RuntimeError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::RuntimeError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::RuntimeError", p);
	croak(Nullch);
#endif
    } catch (const Xapian::LogicError &e) {
	void * p = (void *) new Xapian::LogicError(e);
#ifdef croak_sv
	SV * sv = sv_newmortal();
	sv_setref_pv(sv, "Xapian::LogicError", p);
	croak_sv(sv);
#elif defined ERRSV
	sv_setref_pv(ERRSV, "Xapian::LogicError", p);
	croak(Nullch);
#else
	sv_setref_pv(get_sv("@", TRUE), "Xapian::LogicError", p);
	croak(Nullch);
#endif
    } catch (const std::exception& e) {
	croak("std::exception: %s", e.what());
    } catch (...) {
	croak("something terrible happened");
    }
}
}


/* xapian-headers.i: Getting SWIG to parse Xapian's C++ headers.
 *
 * Copyright 2004,2006,2011,2012,2013,2014,2015,2016,2019,2020 Olly Betts
 * Copyright 2014 Assem Chelli
 *
 * 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_unsigned_SS_long  SWIG_PERL_DECL_ARGS_1(unsigned long value)
{
  SV *sv;
  if (UVSIZE >= sizeof(value) || value <= UV_MAX)
    sv = newSVuv(value);
  else
    sv = newSVpvf("%lu", value);
  return sv_2mortal(sv);
}


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 int
SWIG_AsVal_unsigned_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long *val) 
{
  if (SvUOK(obj)) {
    UV v = SvUV(obj);
    if (UVSIZE <= sizeof(*val) || v <= ULONG_MAX) {
      if (val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } else if (SvIOK(obj)) {
    IV v = SvIV(obj);
    if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULONG_MAX)) {
      if (val) *val = v;
      return SWIG_OK;
    }
    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_equal(Xapian::PositionIterator const *self,Xapian::PositionIterator const &o){ return *self == o; }

SWIGINTERNINLINE SV *
SWIG_From_bool  SWIG_PERL_DECL_ARGS_1(bool value)
{
  return boolSV(value);
}

SWIGINTERN bool Xapian_PositionIterator_nequal(Xapian::PositionIterator const *self,Xapian::PositionIterator const &o){ return *self != o; }
SWIGINTERN Xapian::termpos Xapian_PositionIterator_get_termpos(Xapian::PositionIterator const *self){ return **self; }
SWIGINTERN void Xapian_PositionIterator_inc(Xapian::PositionIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_PostingIterator_equal(Xapian::PostingIterator const *self,Xapian::PostingIterator const &o){ return *self == o; }
SWIGINTERN bool Xapian_PostingIterator_nequal(Xapian::PostingIterator const *self,Xapian::PostingIterator const &o){ return *self != o; }
SWIGINTERN Xapian::docid Xapian_PostingIterator_get_docid(Xapian::PostingIterator const *self){ return **self; }
SWIGINTERN void Xapian_PostingIterator_inc(Xapian::PostingIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_TermIterator_equal(Xapian::TermIterator const *self,Xapian::TermIterator const &o){ return *self == o; }
SWIGINTERN bool Xapian_TermIterator_nequal(Xapian::TermIterator const *self,Xapian::TermIterator const &o){ return *self != o; }
SWIGINTERN std::string Xapian_TermIterator_get_term(Xapian::TermIterator const *self){ return **self; }
SWIGINTERN void Xapian_TermIterator_inc(Xapian::TermIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_ValueIterator_equal(Xapian::ValueIterator const *self,Xapian::ValueIterator const &o){ return *self == o; }
SWIGINTERN bool Xapian_ValueIterator_nequal(Xapian::ValueIterator const *self,Xapian::ValueIterator const &o){ return *self != o; }
SWIGINTERN std::string Xapian_ValueIterator_get_value(Xapian::ValueIterator const *self){ return **self; }
SWIGINTERN void Xapian_ValueIterator_inc(Xapian::ValueIterator *self){ ++(*self); }

#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
#  define SWIG_LONG_LONG_AVAILABLE
#endif


#include <stdio.h>
#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || defined(__BORLANDC__) || defined(_WATCOM)
# ifndef snprintf
#  define snprintf _snprintf
# endif
#endif


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERNINLINE SV *
SWIG_From_unsigned_SS_long_SS_long  SWIG_PERL_DECL_ARGS_1(unsigned long long value)
{
  SV *sv;
  if (UVSIZE >= sizeof(value) || value <= UV_MAX)
    sv = newSVuv((UV)(value));
  else {
    //sv = newSVpvf("%llu", value); doesn't work in non 64bit Perl
    char temp[256];
    SWIG_snprintf(temp, sizeof(temp), "%llu", value);
    sv = newSVpv(temp, 0);
  }
  return sv_2mortal(sv);
}
#endif


SWIGINTERNINLINE SV *
SWIG_From_size_t  SWIG_PERL_DECL_ARGS_1(size_t value)
{    
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    return SWIG_From_unsigned_SS_long  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long >(value));
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else {
    /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    return SWIG_From_unsigned_SS_long_SS_long  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long long >(value));
  }
#endif
}


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_DECL_ARGS_2(SV *obj, unsigned long long *val)
{
  if (SvUOK(obj)) {
    /* pretty sure this should be conditional on
     * (UVSIZE <= sizeof(*val) || v <= ULLONG_MAX) */
    if (val) *val = SvUV(obj);
    return SWIG_OK;
  } else if (SvIOK(obj)) {
    IV v = SvIV(obj);
    if (v >= 0 && (IVSIZE <= sizeof(*val) || v <= ULLONG_MAX)) {
      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 long v;
      errno = 0;
      v = strtoull(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) {
      const double mant_max = 1LL << DBL_MANT_DIG;
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
	if (val) *val = (unsigned long long)(d);
	return res;
      }
    }
  }
  return SWIG_TypeError;
}
#endif


SWIGINTERNINLINE int
SWIG_AsVal_size_t SWIG_PERL_DECL_ARGS_2(SV * obj, size_t *val)
{
  int res = SWIG_TypeError;
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    unsigned long v;
    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);
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    unsigned long long v;
    res = SWIG_AsVal_unsigned_SS_long_SS_long SWIG_PERL_CALL_ARGS_2(obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  }
#endif
  return res;
}


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);    
  }
}

SWIGINTERN std::string Xapian_Stem_stem_word(Xapian::Stem *self,std::string word){
	    return (*self)(word);
}

SWIGINTERNINLINE SV *
SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value)
{
  return sv_2mortal(newSVnv(value));
}

SWIGINTERN Xapian::MSetIterator Xapian_MSet_FETCH(Xapian::MSet *self,int index){
    return ((*self)[index]);
}
SWIGINTERN Xapian::docid Xapian_MSet_get_docid(Xapian::MSet const *self,Xapian::doccount i){
	return *(*self)[i];
    }
SWIGINTERN Xapian::Document Xapian_MSet_get_document(Xapian::MSet const *self,Xapian::doccount i){
	return (*self)[i].get_document();
    }
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 bool Xapian_MSetIterator_equal(Xapian::MSetIterator const *self,Xapian::MSetIterator const &o){ return *self == o; }
SWIGINTERN bool Xapian_MSetIterator_nequal(Xapian::MSetIterator const *self,Xapian::MSetIterator const &o){ return *self != o; }
SWIGINTERN Xapian::docid Xapian_MSetIterator_get_docid(Xapian::MSetIterator const *self){ return **self; }
SWIGINTERN void Xapian_MSetIterator_inc(Xapian::MSetIterator *self){ ++(*self); }
SWIGINTERN void Xapian_MSetIterator_dec(Xapian::MSetIterator *self){ --(*self); }
SWIGINTERN Xapian::ESetIterator Xapian_ESet_FETCH(Xapian::ESet *self,int index){
    return ((*self)[index]);
}
SWIGINTERN std::string Xapian_ESetIterator_get_termname(Xapian::ESetIterator *self){
    return self->operator*();
}
SWIGINTERN bool Xapian_ESetIterator_equal(Xapian::ESetIterator const *self,Xapian::ESetIterator const &o){ return *self == o; }
SWIGINTERN bool Xapian_ESetIterator_nequal(Xapian::ESetIterator const *self,Xapian::ESetIterator const &o){ return *self != o; }
SWIGINTERN std::string Xapian_ESetIterator_get_term(Xapian::ESetIterator const *self){ return **self; }
SWIGINTERN void Xapian_ESetIterator_inc(Xapian::ESetIterator *self){ ++(*self); }
SWIGINTERN void Xapian_ESetIterator_dec(Xapian::ESetIterator *self){ --(*self); }
SWIGINTERN Xapian::MSet Xapian_Enquire_get_mset__SWIG_6(Xapian::Enquire *self,Xapian::doccount first,Xapian::doccount maxitems,Xapian::MatchDecider const *mdecider){
    return self->get_mset(first, maxitems, 0, NULL, mdecider);
}
SWIGINTERN bool Xapian_SimpleStopper_stop_word(Xapian::SimpleStopper *self,std::string term){
     return (*self)(term);
}
SWIGINTERN Xapian::SimpleStopper *new_Xapian_SimpleStopper__SWIG_1(std::string const &file){
	ifstream in_file(file.c_str());
	if (!in_file.is_open())
	    throw Xapian::InvalidArgumentError("Stopword file not found: " + file);
	istream_iterator<std::string> in_iter(in_file);
	istream_iterator<std::string> eof;
	return new Xapian::SimpleStopper(in_iter, eof);
    }
SWIGINTERN bool Xapian_LatLongCoordsIterator_equal(Xapian::LatLongCoordsIterator const *self,Xapian::LatLongCoordsIterator const &o){ return *self == o; }
SWIGINTERN bool Xapian_LatLongCoordsIterator_nequal(Xapian::LatLongCoordsIterator const *self,Xapian::LatLongCoordsIterator const &o){ return *self != o; }
SWIGINTERN Xapian::LatLongCoord Xapian_LatLongCoordsIterator_get_coord(Xapian::LatLongCoordsIterator const *self){ return **self; }
SWIGINTERN void Xapian_LatLongCoordsIterator_inc(Xapian::LatLongCoordsIterator *self){ ++(*self); }

/* perl/extra.i: custom Perl code for xapian-bindings
 *
 * Based on the perl XS wrapper files.
 *
 * Copyright (C) 2009 Kosei Moriyama
 * Copyright (C) 2011,2012,2013,2015,2016,2018,2019,2020 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
 */

#ifdef __cplusplus
extern "C" {
#endif

#define MAGIC_CLASS
SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
    MAGIC_PPERL
    croak("Value is read-only.");
    return 0;
}

#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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AssertionError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AssertionError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AssertionError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_AssertionError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InvalidArgumentError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InvalidOperationError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_UnimplementedError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseCorruptError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseCreateError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseLockError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseModifiedError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseOpeningError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseVersionError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DocNotFoundError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_FeatureUnavailableError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InternalError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InternalError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InternalError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InternalError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NetworkError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NetworkError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NetworkError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NetworkError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NetworkTimeoutError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_QueryParserError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SerialisationError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RangeError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RangeError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RangeError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RangeError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_WildcardError__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::WildcardError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_WildcardError(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_WildcardError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WildcardError" "', 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_WildcardError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WildcardError" "', 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_WildcardError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::WildcardError *)new Xapian::WildcardError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WildcardError, 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_WildcardError__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::WildcardError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_WildcardError(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_WildcardError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WildcardError" "', 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_WildcardError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WildcardError" "', 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_WildcardError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::WildcardError *)new Xapian::WildcardError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WildcardError, 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_WildcardError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::WildcardError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_WildcardError(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_WildcardError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WildcardError" "', 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_WildcardError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WildcardError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::WildcardError *)new Xapian::WildcardError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WildcardError, 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_WildcardError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::WildcardError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_WildcardError(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_WildcardError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WildcardError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::WildcardError *)new Xapian::WildcardError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WildcardError, 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_WildcardError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::WildcardError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_WildcardError(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_WildcardError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WildcardError" "', 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_WildcardError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::WildcardError *)new Xapian::WildcardError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WildcardError, 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_WildcardError) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WildcardError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WildcardError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WildcardError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WildcardError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WildcardError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_WildcardError'");
  XSRETURN(0);
}


XS(_wrap_delete_WildcardError) {
  {
    Xapian::WildcardError *arg1 = (Xapian::WildcardError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_WildcardError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__WildcardError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WildcardError" "', argument " "1"" of type '" "Xapian::WildcardError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WildcardError * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseNotFoundError__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::DatabaseNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseNotFoundError(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_DatabaseNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseNotFoundError" "', 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_DatabaseNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseNotFoundError" "', 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_DatabaseNotFoundError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseNotFoundError *)new Xapian::DatabaseNotFoundError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseNotFoundError, 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_DatabaseNotFoundError__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::DatabaseNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseNotFoundError(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_DatabaseNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseNotFoundError" "', 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_DatabaseNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseNotFoundError" "', 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_DatabaseNotFoundError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseNotFoundError *)new Xapian::DatabaseNotFoundError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseNotFoundError, 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_DatabaseNotFoundError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseNotFoundError(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_DatabaseNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseNotFoundError" "', 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_DatabaseNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseNotFoundError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseNotFoundError *)new Xapian::DatabaseNotFoundError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseNotFoundError, 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_DatabaseNotFoundError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseNotFoundError(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_DatabaseNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseNotFoundError *)new Xapian::DatabaseNotFoundError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseNotFoundError, 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_DatabaseNotFoundError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseNotFoundError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseNotFoundError(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_DatabaseNotFoundError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseNotFoundError" "', 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_DatabaseNotFoundError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseNotFoundError *)new Xapian::DatabaseNotFoundError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseNotFoundError, 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_DatabaseNotFoundError) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseNotFoundError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseNotFoundError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseNotFoundError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseNotFoundError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseNotFoundError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseNotFoundError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseNotFoundError) {
  {
    Xapian::DatabaseNotFoundError *arg1 = (Xapian::DatabaseNotFoundError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseNotFoundError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseNotFoundError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseNotFoundError" "', argument " "1"" of type '" "Xapian::DatabaseNotFoundError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseNotFoundError * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DatabaseClosedError__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::DatabaseClosedError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseClosedError(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_DatabaseClosedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseClosedError" "', 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_DatabaseClosedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseClosedError" "', 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_DatabaseClosedError" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    result = (Xapian::DatabaseClosedError *)new Xapian::DatabaseClosedError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseClosedError, 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_DatabaseClosedError__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::DatabaseClosedError *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DatabaseClosedError(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_DatabaseClosedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseClosedError" "', 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_DatabaseClosedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseClosedError" "', 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_DatabaseClosedError" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    result = (Xapian::DatabaseClosedError *)new Xapian::DatabaseClosedError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseClosedError, 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_DatabaseClosedError__SWIG_2) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseClosedError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseClosedError(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_DatabaseClosedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseClosedError" "', 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_DatabaseClosedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseClosedError" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    result = (Xapian::DatabaseClosedError *)new Xapian::DatabaseClosedError((std::string const &)*arg1,(std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseClosedError, 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_DatabaseClosedError__SWIG_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DatabaseClosedError *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DatabaseClosedError(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_DatabaseClosedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseClosedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    result = (Xapian::DatabaseClosedError *)new Xapian::DatabaseClosedError((std::string const &)*arg1);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseClosedError, 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_DatabaseClosedError__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DatabaseClosedError *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DatabaseClosedError(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_DatabaseClosedError" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DatabaseClosedError" "', 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_DatabaseClosedError" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    result = (Xapian::DatabaseClosedError *)new Xapian::DatabaseClosedError((std::string const &)*arg1,arg2);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseClosedError, 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_DatabaseClosedError) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseClosedError__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseClosedError__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseClosedError__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseClosedError__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DatabaseClosedError__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DatabaseClosedError'");
  XSRETURN(0);
}


XS(_wrap_delete_DatabaseClosedError) {
  {
    Xapian::DatabaseClosedError *arg1 = (Xapian::DatabaseClosedError *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DatabaseClosedError(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DatabaseClosedError, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseClosedError" "', argument " "1"" of type '" "Xapian::DatabaseClosedError *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DatabaseClosedError * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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) {
  {
    int argvi = 0;
    Xapian::PositionIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PositionIterator();");
    }
    result = (Xapian::PositionIterator *)new Xapian::PositionIterator();
    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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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,termpos);");
    }
    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) = &PL_sv_undef;
    
    
    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_equal) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    Xapian::PositionIterator *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: PositionIterator_equal(self,o);");
    }
    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_equal" "', 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_equal" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PositionIterator_equal" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_PositionIterator_equal((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_nequal) {
  {
    Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
    Xapian::PositionIterator *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: PositionIterator_nequal(self,o);");
    }
    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_nequal" "', 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_nequal" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PositionIterator_nequal" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_PositionIterator_nequal((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_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_inc) {
  {
    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_inc(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_inc" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
    {
      try {
        Xapian_PositionIterator_inc(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap___eq____SWIG_0) {
  {
    Xapian::PositionIterator *arg1 = 0 ;
    Xapian::PositionIterator *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: __eq__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__PositionIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', 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 '" "__eq__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator ==((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___ne____SWIG_0) {
  {
    Xapian::PositionIterator *arg1 = 0 ;
    Xapian::PositionIterator *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: __ne__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__PositionIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', 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 '" "__ne__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator !=((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_new_PostingIterator) {
  {
    int argvi = 0;
    Xapian::PostingIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_PostingIterator();");
    }
    result = (Xapian::PostingIterator *)new Xapian::PostingIterator();
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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_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_unique_terms) {
  {
    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_unique_terms(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_unique_terms" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_unique_terms();
      } 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(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);
    result = ((Xapian::PostingIterator const *)arg1)->positionlist_end();
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PositionIterator(result)), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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) = &PL_sv_undef;
    
    
    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_equal) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    Xapian::PostingIterator *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: PostingIterator_equal(self,o);");
    }
    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_equal" "', 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_equal" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingIterator_equal" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_PostingIterator_equal((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_PostingIterator_nequal) {
  {
    Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
    Xapian::PostingIterator *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: PostingIterator_nequal(self,o);");
    }
    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_nequal" "', 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_nequal" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingIterator_nequal" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_PostingIterator_nequal((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_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_inc) {
  {
    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_inc(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_inc" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
    {
      try {
        Xapian_PostingIterator_inc(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap___eq____SWIG_1) {
  {
    Xapian::PostingIterator *arg1 = 0 ;
    Xapian::PostingIterator *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: __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____SWIG_1) {
  {
    Xapian::PostingIterator *arg1 = 0 ;
    Xapian::PostingIterator *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: __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) {
  {
    int argvi = 0;
    Xapian::TermIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TermIterator();");
    }
    result = (Xapian::TermIterator *)new Xapian::TermIterator();
    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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    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 const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        result = ((Xapian::TermIterator const *)arg1)->positionlist_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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 const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    result = ((Xapian::TermIterator const *)arg1)->positionlist_end();
    ST(argvi) = SWIG_NewPointerObj((new Xapian::PositionIterator(result)), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | SWIG_SHADOW); 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,term);");
    }
    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) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    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 = 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,o);");
    }
    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 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_equal" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator_equal" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_TermIterator_equal((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_nequal) {
  {
    Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
    Xapian::TermIterator *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: TermIterator_nequal(self,o);");
    }
    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 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_nequal" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator_nequal" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_TermIterator_nequal((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_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_inc) {
  {
    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_inc(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_inc" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
    {
      try {
        Xapian_TermIterator_inc(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap___eq____SWIG_2) {
  {
    Xapian::TermIterator *arg1 = 0 ;
    Xapian::TermIterator *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: __eq__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__TermIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', 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 '" "__eq__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator ==((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___ne____SWIG_2) {
  {
    Xapian::TermIterator *arg1 = 0 ;
    Xapian::TermIterator *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: __ne__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__TermIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', 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 '" "__ne__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator !=((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_new_ValueIterator) {
  {
    int argvi = 0;
    Xapian::ValueIterator *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_ValueIterator();");
    }
    result = (Xapian::ValueIterator *)new Xapian::ValueIterator();
    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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    
    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 = 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,o);");
    }
    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 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_equal" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueIterator_equal" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_ValueIterator_equal((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_nequal) {
  {
    Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
    Xapian::ValueIterator *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: ValueIterator_nequal(self,o);");
    }
    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 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_nequal" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueIterator_nequal" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_ValueIterator_nequal((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_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_inc) {
  {
    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_inc(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_inc" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
    {
      try {
        Xapian_ValueIterator_inc(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap___eq____SWIG_3) {
  {
    Xapian::ValueIterator *arg1 = 0 ;
    Xapian::ValueIterator *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: __eq__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ValueIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', 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 '" "__eq__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator ==((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___ne____SWIG_3) {
  {
    Xapian::ValueIterator *arg1 = 0 ;
    Xapian::ValueIterator *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: __ne__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ValueIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', 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 '" "__ne__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator !=((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_new_Document) {
  {
    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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Document_add_posting__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Document_add_term__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Document_remove_posting__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Document_remove_posting__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Document_remove_posting'");
  XSRETURN(0);
}


XS(_wrap_Document_remove_postings__SWIG_0) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termpos arg3 ;
    Xapian::termpos arg4 ;
    Xapian::termcount arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::termpos result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Document_remove_postings(self,term,term_pos_first,term_pos_last,wdf_dec);");
    }
    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_postings" "', 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_postings" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_remove_postings" "', 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_postings" "', 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_postings" "', argument " "4"" of type '" "Xapian::termpos""'");
    } 
    arg4 = static_cast< Xapian::termpos >(val4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Document_remove_postings" "', argument " "5"" of type '" "Xapian::termcount""'");
    } 
    arg5 = static_cast< Xapian::termcount >(val5);
    {
      try {
        result = (Xapian::termpos)(arg1)->remove_postings((std::string const &)*arg2,arg3,arg4,arg5);
      } 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_Document_remove_postings__SWIG_1) {
  {
    Xapian::Document *arg1 = (Xapian::Document *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::termpos arg3 ;
    Xapian::termpos 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;
    Xapian::termpos result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Document_remove_postings(self,term,term_pos_first,term_pos_last);");
    }
    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_postings" "', 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_postings" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_remove_postings" "', 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_postings" "', 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_postings" "', argument " "4"" of type '" "Xapian::termpos""'");
    } 
    arg4 = static_cast< Xapian::termpos >(val4);
    {
      try {
        result = (Xapian::termpos)(arg1)->remove_postings((std::string const &)*arg2,arg3,arg4);
      } 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_Document_remove_postings) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    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_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;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(3), 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 == 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__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;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Document_remove_postings__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Document_remove_postings__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Document_remove_postings'");
  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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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(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);
    result = ((Xapian::Document const *)arg1)->termlist_end();
    ST(argvi) = SWIG_NewPointerObj((new 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(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);
    result = ((Xapian::Document const *)arg1)->values_end();
    ST(argvi) = SWIG_NewPointerObj((new 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(serialised);");
    }
    {
      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(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_new_Registry) {
  {
    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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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_Registry_register_lat_long_metric) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    Xapian::LatLongMetric *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: Registry_register_lat_long_metric(self,metric);");
    }
    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_lat_long_metric" "', argument " "1"" of type '" "Xapian::Registry *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_register_lat_long_metric" "', argument " "2"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_register_lat_long_metric" "', argument " "2"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongMetric * >(argp2);
    {
      try {
        (arg1)->register_lat_long_metric((Xapian::LatLongMetric const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Registry_get_lat_long_metric) {
  {
    Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::LatLongMetric *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Registry_get_lat_long_metric(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_lat_long_metric" "', 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_lat_long_metric" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_get_lat_long_metric" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::LatLongMetric *)((Xapian::Registry const *)arg1)->get_lat_long_metric((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongMetric, 0 | SWIG_SHADOW); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_0) {
  {
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_Query();");
    }
    result = (Xapian::Query *)new Xapian::Query();
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_1) {
  {
    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(term,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_2) {
  {
    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(term,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_3) {
  {
    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(term);");
    }
    {
      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_4) {
  {
    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(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_new_Query__SWIG_5) {
  {
    double arg1 ;
    Xapian::Query *arg2 = 0 ;
    double val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Query(factor,subquery);");
    }
    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_Query" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(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);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1,(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__SWIG_6) {
  {
    Xapian::Query::op arg1 ;
    Xapian::Query *arg2 = 0 ;
    double arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    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_,subquery,factor);");
    }
    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);
    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,(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_7) {
  {
    Xapian::Query::op arg1 ;
    Xapian::Query *arg2 = 0 ;
    Xapian::Query *arg3 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_Query(op_,a,b);");
    }
    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_8) {
  {
    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_,a,b);");
    }
    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::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,range_limit);");
    }
    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_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,range_lower,range_upper);");
    }
    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 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    int arg4 ;
    Xapian::Query::op arg5 ;
    int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_Query(op_,pattern,max_expansion,max_type,combiner);");
    }
    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;
    }
    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);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Query" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(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_Query" "', argument " "5"" of type '" "Xapian::Query::op""'");
    } 
    arg5 = static_cast< Xapian::Query::op >(val5);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(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__Query, 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_Query__SWIG_12) {
  {
    Xapian::Query::op arg1 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    int arg4 ;
    int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_Query(op_,pattern,max_expansion,max_type);");
    }
    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;
    }
    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);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Query" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,arg3,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(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_13) {
  {
    Xapian::Query::op arg1 ;
    std::string *arg2 = 0 ;
    Xapian::termcount arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    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_,pattern,max_expansion);");
    }
    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;
    }
    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(arg1,(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++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Query__SWIG_14) {
  {
    Xapian::Query::op arg1 ;
    std::string *arg2 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Query(op_,pattern);");
    }
    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;
    }
    {
      try {
        result = (Xapian::Query *)new Xapian::Query(arg1,(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++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    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(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);
    result = ((Xapian::Query const *)arg1)->get_terms_end();
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(result)), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_get_unique_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_unique_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_unique_terms_begin" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    {
      try {
        result = ((Xapian::Query const *)arg1)->get_unique_terms_begin();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(result)), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_get_unique_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_unique_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_unique_terms_end" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    result = ((Xapian::Query const *)arg1)->get_unique_terms_end();
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(result)), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 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);
    result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length();
    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_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);
    result = (bool)((Xapian::Query const *)arg1)->empty();
    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 ;
    Xapian::Registry *arg2 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Query_unserialise(serialised,reg);");
    }
    {
      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(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 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_unserialise(serialised);");
    }
    {
      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(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, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Query_unserialise__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Query_unserialise__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Query_unserialise'");
  XSRETURN(0);
}


XS(_wrap_Query_get_type) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Query::op result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_get_type(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_type" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    result = (Xapian::Query::op)((Xapian::Query const *)arg1)->get_type();
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Query_get_num_subqueries) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    size_t result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Query_get_num_subqueries(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_num_subqueries" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(argp1);
    result = ((Xapian::Query const *)arg1)->get_num_subqueries();
    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_Query_get_subquery) {
  {
    Xapian::Query *arg1 = (Xapian::Query *) 0 ;
    size_t arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    size_t val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Query_get_subquery(self,n);");
    }
    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_subquery" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Query * >(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 '" "Query_get_subquery" "', argument " "2"" of type '" "size_t""'");
    } 
    arg2 = static_cast< size_t >(val2);
    {
      try {
        result = ((Xapian::Query const *)arg1)->get_subquery(SWIG_STD_MOVE(arg2));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(result)), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


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_15) {
  {
    Xapian::Query::op arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::Query *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Query(op_);");
    }
    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);
    {
      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_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__PostingSource, 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_AsVal_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;
      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;
      {
        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;
      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_double 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_Xapian__Query, SWIG_POINTER_NO_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 == 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, SWIG_POINTER_NO_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(2), &vptr, SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NO_NULL);
        _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_Xapian__Query, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_9;
      _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_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;
      {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_10;
      _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_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;
      {
        int res = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(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_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _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_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(0), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_13;
      _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_13;
      _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_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 == 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_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_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0));
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_14;
      _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_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_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(1), (std::string**)(0));
        _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(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_15;
      _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_15;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 15;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_15:
    
    if (items == 5) {
      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_16;
      _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_16;
      _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_16;
      _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_16;
      _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_16;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 16;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_16:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_15); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_14); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_5); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_2); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_7); return;
    case 9:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_6); return;
    case 10:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_9); return;
    case 11:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_13); return;
    case 12:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_8); return;
    case 13:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_1); return;
    case 14:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_10); return;
    case 15:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_12); return;
    case 16:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Query__SWIG_11); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Query'");
  XSRETURN(0);
}


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) {
  {
    std::string *arg1 = 0 ;
    bool arg2 ;
    int res1 = SWIG_OLDOBJ ;
    bool val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::Stem *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Stem(language,fallback);");
    }
    {
      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;
    }
    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_Stem" "', argument " "2"" of type '" "bool""'");
    } 
    arg2 = static_cast< bool >(val2);
    {
      try {
        result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1,arg2);
      } 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_2) {
  {
    Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
    int argvi = 0;
    Xapian::Stem *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Stem(p);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__StemImplementation, 0) != SWIG_OK) {
        arg1 = new perlStemImplementation(sv);
      }
    }
    {
      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;
      {
        {
          SV* sv = ST(0);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__StemImplementation, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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:
    
    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_bool 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Stem__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Stem__SWIG_0); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Stem__SWIG_1); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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_is_none) {
  {
    Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Stem_is_none(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_is_none" "', argument " "1"" of type '" "Xapian::Stem const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
    {
      try {
        result = (bool)((Xapian::Stem const *)arg1)->is_none();
      } 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_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,SWIG_STD_MOVE(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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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 ;
    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);
    {
      SV* sv = ST(1);
      if (SWIG_ConvertPtr(sv, (void**)&arg2,
          SWIGTYPE_p_Xapian__Stopper, 0) != SWIG_OK) {
        arg2 = new perlStopper(sv);
      }
    }
    {
      try {
        (arg1)->set_stopper((Xapian::Stopper const *)arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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;
      {
        {
          SV* sv = ST(1);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__Stopper, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_TermGenerator_set_stopper__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_TermGenerator_set_flags__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_stopper_strategy) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    Xapian::TermGenerator::stop_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_stopper_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_stopper_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_stopper_strategy" "', argument " "2"" of type '" "Xapian::TermGenerator::stop_strategy""'");
    } 
    arg2 = static_cast< Xapian::TermGenerator::stop_strategy >(val2);
    {
      try {
        (arg1)->set_stopper_strategy(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_TermGenerator_set_max_word_length) {
  {
    Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
    unsigned int 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_max_word_length(self,max_word_length);");
    }
    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_max_word_length" "', 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_max_word_length" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    {
      try {
        (arg1)->set_max_word_length(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_TermGenerator_index_text__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_TermGenerator_index_text__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_TermGenerator_index_text_without_positions__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_TermGenerator_index_text_without_positions__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); 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::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: 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::termpos""'");
    } 
    arg2 = static_cast< Xapian::termpos >(val2);
    {
      try {
        (arg1)->increase_termpos(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_TermGenerator_increase_termpos__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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::termpos 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::termpos)((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::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: 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::termpos""'");
    } 
    arg2 = static_cast< Xapian::termpos >(val2);
    {
      try {
        (arg1)->set_termpos(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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_new_MSet) {
  {
    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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_convert_to_percent__SWIG_0) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    double arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_convert_to_percent(self,weight);");
    }
    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 '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        result = (int)((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 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_convert_to_percent(self,it);");
    }
    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 = (int)((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, SWIG_POINTER_NO_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;
      {
        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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_convert_to_percent__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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 = 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: MSet_get_termfreq(self,term);");
    }
    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;
      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 '" "MSet_get_termfreq" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_get_termfreq" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::doccount)((Xapian::MSet 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_MSet_get_termweight) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MSet_get_termweight(self,term);");
    }
    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;
      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 '" "MSet_get_termweight" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_get_termweight" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (double)((Xapian::MSet const *)arg1)->get_termweight((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    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_attained) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double 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 const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (double)((Xapian::MSet const *)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_get_max_possible) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double 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 const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
    {
      try {
        result = (double)((Xapian::MSet const *)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_snippet__SWIG_0) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string *arg2 = 0 ;
    size_t arg3 ;
    Xapian::Stem *arg4 = 0 ;
    unsigned int arg5 ;
    std::string *arg6 = 0 ;
    std::string *arg7 = 0 ;
    std::string *arg8 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    int res6 = SWIG_OLDOBJ ;
    int res7 = SWIG_OLDOBJ ;
    int res8 = SWIG_OLDOBJ ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 8) || (items > 8)) {
      SWIG_croak("Usage: MSet_snippet(self,text,length,stemmer,flags,hi_start,hi_end,omit);");
    }
    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_snippet" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(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 '" "MSet_snippet" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', 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 '" "MSet_snippet" "', argument " "3"" of type '" "size_t""'");
    } 
    arg3 = static_cast< size_t >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MSet_snippet" "', argument " "5"" of type '" "unsigned int""'");
    } 
    arg5 = static_cast< unsigned int >(val5);
    {
      std::string *ptr = (std::string *)0;
      res6 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(5), &ptr);
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "MSet_snippet" "', argument " "6"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "6"" of type '" "std::string const &""'"); 
      }
      arg6 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res7 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), &ptr);
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "MSet_snippet" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      arg7 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res8 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(7), &ptr);
      if (!SWIG_IsOK(res8)) {
        SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "MSet_snippet" "', argument " "8"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "8"" of type '" "std::string const &""'"); 
      }
      arg8 = ptr;
    }
    {
      try {
        result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6,(std::string const &)*arg7,(std::string const &)*arg8);
      } 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;
    
    
    
    if (SWIG_IsNewObj(res6)) delete arg6;
    if (SWIG_IsNewObj(res7)) delete arg7;
    if (SWIG_IsNewObj(res8)) delete arg8;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    if (SWIG_IsNewObj(res6)) delete arg6;
    if (SWIG_IsNewObj(res7)) delete arg7;
    if (SWIG_IsNewObj(res8)) delete arg8;
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_snippet__SWIG_1) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string *arg2 = 0 ;
    size_t arg3 ;
    Xapian::Stem *arg4 = 0 ;
    unsigned int arg5 ;
    std::string *arg6 = 0 ;
    std::string *arg7 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    int res6 = SWIG_OLDOBJ ;
    int res7 = SWIG_OLDOBJ ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: MSet_snippet(self,text,length,stemmer,flags,hi_start,hi_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_snippet" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(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 '" "MSet_snippet" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', 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 '" "MSet_snippet" "', argument " "3"" of type '" "size_t""'");
    } 
    arg3 = static_cast< size_t >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MSet_snippet" "', argument " "5"" of type '" "unsigned int""'");
    } 
    arg5 = static_cast< unsigned int >(val5);
    {
      std::string *ptr = (std::string *)0;
      res6 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(5), &ptr);
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "MSet_snippet" "', argument " "6"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "6"" of type '" "std::string const &""'"); 
      }
      arg6 = ptr;
    }
    {
      std::string *ptr = (std::string *)0;
      res7 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(6), &ptr);
      if (!SWIG_IsOK(res7)) {
        SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "MSet_snippet" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "7"" of type '" "std::string const &""'"); 
      }
      arg7 = ptr;
    }
    {
      try {
        result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6,(std::string const &)*arg7);
      } 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;
    
    
    
    if (SWIG_IsNewObj(res6)) delete arg6;
    if (SWIG_IsNewObj(res7)) delete arg7;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    if (SWIG_IsNewObj(res6)) delete arg6;
    if (SWIG_IsNewObj(res7)) delete arg7;
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_snippet__SWIG_2) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string *arg2 = 0 ;
    size_t arg3 ;
    Xapian::Stem *arg4 = 0 ;
    unsigned int arg5 ;
    std::string *arg6 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    int res6 = SWIG_OLDOBJ ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: MSet_snippet(self,text,length,stemmer,flags,hi_start);");
    }
    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_snippet" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(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 '" "MSet_snippet" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', 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 '" "MSet_snippet" "', argument " "3"" of type '" "size_t""'");
    } 
    arg3 = static_cast< size_t >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MSet_snippet" "', argument " "5"" of type '" "unsigned int""'");
    } 
    arg5 = static_cast< unsigned int >(val5);
    {
      std::string *ptr = (std::string *)0;
      res6 = SWIG_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(5), &ptr);
      if (!SWIG_IsOK(res6)) {
        SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "MSet_snippet" "', argument " "6"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "6"" of type '" "std::string const &""'"); 
      }
      arg6 = ptr;
    }
    {
      try {
        result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4,arg5,(std::string const &)*arg6);
      } 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;
    
    
    
    if (SWIG_IsNewObj(res6)) delete arg6;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    if (SWIG_IsNewObj(res6)) delete arg6;
    SWIG_croak_null();
  }
}


XS(_wrap_MSet_snippet__SWIG_3) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string *arg2 = 0 ;
    size_t arg3 ;
    Xapian::Stem *arg4 = 0 ;
    unsigned int arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    unsigned int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: MSet_snippet(self,text,length,stemmer,flags);");
    }
    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_snippet" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(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 '" "MSet_snippet" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', 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 '" "MSet_snippet" "', argument " "3"" of type '" "size_t""'");
    } 
    arg3 = static_cast< size_t >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
    ecode5 = SWIG_AsVal_unsigned_SS_int SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "MSet_snippet" "', argument " "5"" of type '" "unsigned int""'");
    } 
    arg5 = static_cast< unsigned int >(val5);
    {
      try {
        result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem const &)*arg4,arg5);
      } 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_MSet_snippet__SWIG_4) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string *arg2 = 0 ;
    size_t arg3 ;
    Xapian::Stem *arg4 = 0 ;
    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: MSet_snippet(self,text,length,stemmer);");
    }
    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_snippet" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(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 '" "MSet_snippet" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', 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 '" "MSet_snippet" "', argument " "3"" of type '" "size_t""'");
    } 
    arg3 = static_cast< size_t >(val3);
    res4 = SWIG_ConvertPtr(ST(3), &argp4, SWIGTYPE_p_Xapian__Stem,  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    if (!argp4) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "4"" of type '" "Xapian::Stem const &""'"); 
    }
    arg4 = reinterpret_cast< Xapian::Stem * >(argp4);
    {
      try {
        result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(arg3),(Xapian::Stem 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();
  }
}


XS(_wrap_MSet_snippet__SWIG_5) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
    std::string *arg2 = 0 ;
    size_t arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    size_t val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: MSet_snippet(self,text,length);");
    }
    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_snippet" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(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 '" "MSet_snippet" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', 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 '" "MSet_snippet" "', argument " "3"" of type '" "size_t""'");
    } 
    arg3 = static_cast< size_t >(val3);
    {
      try {
        result = ((Xapian::MSet const *)arg1)->snippet((std::string const &)*arg2,SWIG_STD_MOVE(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_MSet_snippet__SWIG_6) {
  {
    Xapian::MSet *arg1 = (Xapian::MSet *) 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: MSet_snippet(self,text);");
    }
    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_snippet" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSet * >(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 '" "MSet_snippet" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_snippet" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = ((Xapian::MSet const *)arg1)->snippet((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_MSet_snippet) {
  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;
      {
        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__MSet, 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_size_t 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__MSet, 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_size_t 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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_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__MSet, 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_size_t 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__Stem, SWIG_POINTER_NO_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(4), 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 == 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__MSet, 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_AsVal_size_t 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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_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(4), 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(5), (std::string**)(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 == 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__MSet, 0);
        _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_size_t 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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_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(4), 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(5), (std::string**)(0));
        _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(6), (std::string**)(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 == 8) {
      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_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_size_t 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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NO_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(4), 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(5), (std::string**)(0));
        _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(6), (std::string**)(0));
        _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(7), (std::string**)(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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_snippet__SWIG_6); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_snippet__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_snippet__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_snippet__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_snippet__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_snippet__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_snippet__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MSet_snippet'");
  XSRETURN(0);
}


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 const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    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 const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::MSetIterator * >(argp3);
    {
      try {
        ((Xapian::MSet const *)arg1)->fetch((Xapian::MSetIterator const &)*arg2,(Xapian::MSetIterator const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    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 const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        ((Xapian::MSet const *)arg1)->fetch((Xapian::MSetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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, SWIG_POINTER_NO_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;
      {
        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, SWIG_POINTER_NO_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__MSetIterator, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_fetch__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_fetch__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MSet_fetch__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'MSet_fetch'");
  XSRETURN(0);
}


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(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(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(result)), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); 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(result)), SWIGTYPE_p_Xapian__MSetIterator, 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_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(result)), SWIGTYPE_p_Xapian__Document, 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(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_MSetIterator_mset_set) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    Xapian::MSet *arg2 = (Xapian::MSet *) 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: MSetIterator_mset_set(self,mset);");
    }
    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_mset_set" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSetIterator_mset_set" "', argument " "2"" of type '" "Xapian::MSet *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSet * >(argp2);
    if (arg1) (arg1)->mset = *arg2;
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_mset_get) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::MSet *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_mset_get(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_mset_get" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    result = (Xapian::MSet *)& ((arg1)->mset);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSet, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_off_from_end_set) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    Xapian::MSet::size_type 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: MSetIterator_off_from_end_set(self,off_from_end);");
    }
    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_off_from_end_set" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(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 '" "MSetIterator_off_from_end_set" "', argument " "2"" of type '" "Xapian::MSet::size_type""'");
    } 
    arg2 = static_cast< Xapian::MSet::size_type >(val2);
    if (arg1) (arg1)->off_from_end = arg2;
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_off_from_end_get) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::MSet::size_type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MSetIterator_off_from_end_get(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_off_from_end_get" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    result = (Xapian::MSet::size_type) ((arg1)->off_from_end);
    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_MSetIterator) {
  {
    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_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_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(result)), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | SWIG_SHADOW); 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;
    double 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 = (double)((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_sort_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_sort_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_sort_key" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        result = ((Xapian::MSetIterator const *)arg1)->get_sort_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_percent) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int 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 = (int)((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 = 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,o);");
    }
    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 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_equal" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSetIterator_equal" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_MSetIterator_equal((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_nequal) {
  {
    Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 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: MSetIterator_nequal(self,o);");
    }
    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 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_nequal" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSetIterator_nequal" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_MSetIterator_nequal((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_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_inc) {
  {
    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_inc(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_inc" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        Xapian_MSetIterator_inc(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MSetIterator_dec) {
  {
    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_dec(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_dec" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
    {
      try {
        Xapian_MSetIterator_dec(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap___eq____SWIG_4) {
  {
    Xapian::MSetIterator *arg1 = 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: __eq__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', 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 '" "__eq__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator ==((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___ne____SWIG_4) {
  {
    Xapian::MSetIterator *arg1 = 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: __ne__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', 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 '" "__ne__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator !=((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___lt____SWIG_0) {
  {
    Xapian::MSetIterator *arg1 = 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: __lt__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lt__" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lt__" "', 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 '" "__lt__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lt__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator <((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___gt____SWIG_0) {
  {
    Xapian::MSetIterator *arg1 = 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: __gt__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__gt__" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__gt__" "', 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 '" "__gt__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__gt__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator >((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___ge____SWIG_0) {
  {
    Xapian::MSetIterator *arg1 = 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: __ge__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ge__" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ge__" "', 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 '" "__ge__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ge__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator >=((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___le____SWIG_0) {
  {
    Xapian::MSetIterator *arg1 = 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: __le__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__le__" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__le__" "', 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 '" "__le__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__le__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator <=((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___add____SWIG_0) {
  {
    Xapian::MSetIterator::difference_type arg1 ;
    Xapian::MSetIterator *arg2 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::MSetIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: __add__(n,it);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "__add__" "', argument " "1"" of type '" "Xapian::MSetIterator::difference_type""'");
    } 
    arg1 = static_cast< Xapian::MSetIterator::difference_type >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__add__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__add__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = Xapian::operator +(arg1,(Xapian::MSetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::MSetIterator(result)), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ESet) {
  {
    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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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::doccount 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::doccount)((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_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_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(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(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(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(result)), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_eset_set) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    Xapian::ESet *arg2 = (Xapian::ESet *) 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: ESetIterator_eset_set(self,eset);");
    }
    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_eset_set" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESetIterator_eset_set" "', argument " "2"" of type '" "Xapian::ESet *""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESet * >(argp2);
    if (arg1) (arg1)->eset = *arg2;
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_eset_get) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ESet *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESetIterator_eset_get(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_eset_get" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    result = (Xapian::ESet *)& ((arg1)->eset);
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESet, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_off_from_end_set) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    Xapian::ESet::size_type 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: ESetIterator_off_from_end_set(self,off_from_end);");
    }
    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_off_from_end_set" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(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 '" "ESetIterator_off_from_end_set" "', argument " "2"" of type '" "Xapian::ESet::size_type""'");
    } 
    arg2 = static_cast< Xapian::ESet::size_type >(val2);
    if (arg1) (arg1)->off_from_end = arg2;
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_off_from_end_get) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ESet::size_type result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ESetIterator_off_from_end_get(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_off_from_end_get" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    result = (Xapian::ESet::size_type) ((arg1)->off_from_end);
    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_ESetIterator) {
  {
    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_ESetIterator_get_weight) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double 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 = (double)((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 = 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,o);");
    }
    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 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_equal" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESetIterator_equal" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_ESetIterator_equal((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_nequal) {
  {
    Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
    Xapian::ESetIterator *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: ESetIterator_nequal(self,o);");
    }
    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 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_nequal" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESetIterator_nequal" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_ESetIterator_nequal((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_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_inc) {
  {
    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_inc(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_inc" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        Xapian_ESetIterator_inc(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ESetIterator_dec) {
  {
    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_dec(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_dec" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
    {
      try {
        Xapian_ESetIterator_dec(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap___eq____SWIG_5) {
  {
    Xapian::ESetIterator *arg1 = 0 ;
    Xapian::ESetIterator *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: __eq__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__eq__" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', 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 '" "__eq__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__eq__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator ==((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___eq__) {
  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__PositionIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_NO_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 == 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__ValueIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_NO_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 == 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__MSetIterator, SWIG_POINTER_NO_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_Xapian__MSetIterator, SWIG_POINTER_NO_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 == 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__ESetIterator, SWIG_POINTER_NO_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_Xapian__ESetIterator, SWIG_POINTER_NO_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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___eq____SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___eq____SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___eq____SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___eq____SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___eq____SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___eq____SWIG_5); return;
    }
  }
  
  croak("No matching function for overloaded '__eq__'");
  XSRETURN(0);
}


XS(_wrap___ne____SWIG_5) {
  {
    Xapian::ESetIterator *arg1 = 0 ;
    Xapian::ESetIterator *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: __ne__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', 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 '" "__ne__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator !=((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___lt____SWIG_1) {
  {
    Xapian::ESetIterator *arg1 = 0 ;
    Xapian::ESetIterator *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: __lt__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__lt__" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lt__" "', 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 '" "__lt__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__lt__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator <((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___lt__) {
  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__MSetIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___lt____SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___lt____SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded '__lt__'");
  XSRETURN(0);
}


XS(_wrap___gt____SWIG_1) {
  {
    Xapian::ESetIterator *arg1 = 0 ;
    Xapian::ESetIterator *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: __gt__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__gt__" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__gt__" "', 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 '" "__gt__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__gt__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator >((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___gt__) {
  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__MSetIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___gt____SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___gt____SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded '__gt__'");
  XSRETURN(0);
}


XS(_wrap___ge____SWIG_1) {
  {
    Xapian::ESetIterator *arg1 = 0 ;
    Xapian::ESetIterator *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: __ge__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ge__" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ge__" "', 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 '" "__ge__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ge__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator >=((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___ge__) {
  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__MSetIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ge____SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ge____SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded '__ge__'");
  XSRETURN(0);
}


XS(_wrap___le____SWIG_1) {
  {
    Xapian::ESetIterator *arg1 = 0 ;
    Xapian::ESetIterator *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: __le__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__le__" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__le__" "', 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 '" "__le__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__le__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator <=((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___le__) {
  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__MSetIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___le____SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___le____SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded '__le__'");
  XSRETURN(0);
}


XS(_wrap___add____SWIG_1) {
  {
    Xapian::ESetIterator::difference_type arg1 ;
    Xapian::ESetIterator *arg2 = 0 ;
    int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::ESetIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: __add__(n,it);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "__add__" "', argument " "1"" of type '" "Xapian::ESetIterator::difference_type""'");
    } 
    arg1 = static_cast< Xapian::ESetIterator::difference_type >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__add__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__add__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
    {
      try {
        result = Xapian::operator +(arg1,(Xapian::ESetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::ESetIterator(result)), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap___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;
      {
        {
          int res = SWIG_AsVal_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NO_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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___add____SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___add____SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded '__add__'");
  XSRETURN(0);
}


XS(_wrap_new_RSet) {
  {
    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_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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    
    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 const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        (arg1)->add_document((Xapian::MSetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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, SWIG_POINTER_NO_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;
      {
        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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_RSet_add_document__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    
    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 const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        (arg1)->remove_document((Xapian::MSetIterator const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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, SWIG_POINTER_NO_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;
      {
        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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_RSet_remove_document__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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 const *""'"); 
    }
    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)((Xapian::RSet const *)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 const *""'"); 
    }
    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 const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
    {
      try {
        result = (bool)((Xapian::RSet const *)arg1)->contains((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_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, SWIG_POINTER_NO_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;
      {
        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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_RSet_contains__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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 *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MatchDecider___call__(self,doc);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__MatchDecider, 0) != SWIG_OK) {
        arg1 = new perlMatchDecider(sv);
      }
    }
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MatchDecider(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__MatchDecider, 0) != SWIG_OK) {
        arg1 = new perlMatchDecider(sv);
      }
    }
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Enquire) {
  {
    Xapian::Database *arg1 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Enquire *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Enquire(database);");
    }
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_set_query__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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 const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
    {
      try {
        result = (Xapian::Query *) &((Xapian::Enquire const *)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 ;
    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);
    {
      SV* sv = ST(1);
      if (SWIG_ConvertPtr(sv, (void**)&arg2,
          SWIGTYPE_p_Xapian__MatchSpy, 0) != SWIG_OK) {
        arg2 = new perlMatchSpy(sv);
      }
    }
    {
      try {
        (arg1)->add_matchspy(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_expansion_scheme__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 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: Enquire_set_expansion_scheme(self,eweightname_,expand_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_set_expansion_scheme" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(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 '" "Enquire_set_expansion_scheme" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_set_expansion_scheme" "', 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 '" "Enquire_set_expansion_scheme" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        ((Xapian::Enquire const *)arg1)->set_expansion_scheme((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_expansion_scheme__SWIG_1) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 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: Enquire_set_expansion_scheme(self,eweightname_);");
    }
    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_expansion_scheme" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(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 '" "Enquire_set_expansion_scheme" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_set_expansion_scheme" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        ((Xapian::Enquire const *)arg1)->set_expansion_scheme((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_expansion_scheme) {
  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_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__Enquire, 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_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_set_expansion_scheme__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_set_expansion_scheme__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_set_expansion_scheme'");
  XSRETURN(0);
}


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) = &PL_sv_undef;
    
    
    
    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) = &PL_sv_undef;
    
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_set_collapse_key__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_cutoff__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    int arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->set_cutoff(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    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) = &PL_sv_undef;
    
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_set_cutoff__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_value) {
  {
    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) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_key) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 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);
    {
      SV* sv = ST(1);
      if (SWIG_ConvertPtr(sv, (void**)&arg2,
          SWIGTYPE_p_Xapian__KeyMaker, 0) != SWIG_OK) {
        arg2 = new perlKeyMaker(sv);
      }
    }
    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) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_value_then_relevance) {
  {
    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) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_key_then_relevance) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 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);
    {
      SV* sv = ST(1);
      if (SWIG_ConvertPtr(sv, (void**)&arg2,
          SWIGTYPE_p_Xapian__KeyMaker, 0) != SWIG_OK) {
        arg2 = new perlKeyMaker(sv);
      }
    }
    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) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_relevance_then_value) {
  {
    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) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_sort_by_relevance_then_key) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
    bool arg3 ;
    void *argp1 = 0 ;
    int res1 = 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);
    {
      SV* sv = ST(1);
      if (SWIG_ConvertPtr(sv, (void**)&arg2,
          SWIGTYPE_p_Xapian__KeyMaker, 0) != SWIG_OK) {
        arg2 = new perlKeyMaker(sv);
      }
    }
    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) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_set_time_limit) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 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: Enquire_set_time_limit(self,time_limit);");
    }
    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_time_limit" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Enquire * >(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 '" "Enquire_set_time_limit" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->set_time_limit(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


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 ;
    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 < 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);
    {
      SV* sv = ST(5);
      if (SWIG_ConvertPtr(sv, (void**)&arg6,
          SWIGTYPE_p_Xapian__MatchDecider, 0) != SWIG_OK) {
        arg6 = new perlMatchDecider(sv);
      }
    }
    {
      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(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 ;
    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(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 ;
    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(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 ;
    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(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 ;
    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 ;
    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);
    {
      SV* sv = ST(4);
      if (SWIG_ConvertPtr(sv, (void**)&arg5,
          SWIGTYPE_p_Xapian__MatchDecider, 0) != SWIG_OK) {
        arg5 = new perlMatchDecider(sv);
      }
    }
    {
      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(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 ;
    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(result)), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_eset__SWIG_0) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::RSet *arg3 = 0 ;
    int arg4 ;
    Xapian::ExpandDecider *arg5 = (Xapian::ExpandDecider *) 0 ;
    double arg6 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Xapian::ESet result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Enquire_get_eset(self,maxitems,omrset,flags,edecider,min_wt);");
    }
    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);
    {
      SV* sv = ST(4);
      if (SWIG_ConvertPtr(sv, (void**)&arg5,
          SWIGTYPE_p_Xapian__ExpandDecider, 0) != SWIG_OK) {
        arg5 = new perlExpandDecider(sv);
      }
    }
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Enquire_get_eset" "', argument " "6"" of type '" "double""'");
    } 
    arg6 = static_cast< double >(val6);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,(Xapian::ExpandDecider const *)arg5,arg6);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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 ;
    Xapian::ExpandDecider *arg5 = (Xapian::ExpandDecider *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::ESet result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Enquire_get_eset(self,maxitems,omrset,flags,edecider);");
    }
    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);
    {
      SV* sv = ST(4);
      if (SWIG_ConvertPtr(sv, (void**)&arg5,
          SWIGTYPE_p_Xapian__ExpandDecider, 0) != SWIG_OK) {
        arg5 = new perlExpandDecider(sv);
      }
    }
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,(Xapian::ExpandDecider const *)arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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 ;
    int arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 = 0 ;
    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(result)), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_eset__SWIG_3) {
  {
    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 = 0 ;
    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(result)), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Enquire_get_eset__SWIG_4) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::RSet *arg3 = 0 ;
    Xapian::ExpandDecider *arg4 = (Xapian::ExpandDecider *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::ESet result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Enquire_get_eset(self,maxitems,omrset,edecider);");
    }
    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);
    {
      SV* sv = ST(3);
      if (SWIG_ConvertPtr(sv, (void**)&arg4,
          SWIGTYPE_p_Xapian__ExpandDecider, 0) != SWIG_OK) {
        arg4 = new perlExpandDecider(sv);
      }
    }
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,(Xapian::ExpandDecider const *)arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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_5) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::RSet *arg3 = 0 ;
    int arg4 ;
    double arg5 ;
    Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
    double arg7 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val7 ;
    int ecode7 = 0 ;
    int argvi = 0;
    Xapian::ESet result;
    dXSARGS;
    
    if ((items < 7) || (items > 7)) {
      SWIG_croak("Usage: Enquire_get_eset(self,maxitems,rset,flags,k,edecider,min_wt);");
    }
    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);
    {
      SV* sv = ST(5);
      if (SWIG_ConvertPtr(sv, (void**)&arg6,
          SWIGTYPE_p_Xapian__ExpandDecider, 0) != SWIG_OK) {
        arg6 = new perlExpandDecider(sv);
      }
    }
    ecode7 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), &val7);
    if (!SWIG_IsOK(ecode7)) {
      SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Enquire_get_eset" "', argument " "7"" of type '" "double""'");
    } 
    arg7 = static_cast< double >(val7);
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6,arg7);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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_6) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::RSet *arg3 = 0 ;
    int arg4 ;
    double arg5 ;
    Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::ESet result;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Enquire_get_eset(self,maxitems,rset,flags,k,edecider);");
    }
    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);
    {
      SV* sv = ST(5);
      if (SWIG_ConvertPtr(sv, (void**)&arg6,
          SWIGTYPE_p_Xapian__ExpandDecider, 0) != SWIG_OK) {
        arg6 = new perlExpandDecider(sv);
      }
    }
    {
      try {
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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_7) {
  {
    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 = 0 ;
    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,rset,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(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, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_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(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 == 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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          SV* sv = ST(3);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__ExpandDecider, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_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(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_4;
      _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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _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_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          SV* sv = ST(4);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__ExpandDecider, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _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_6;
      _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_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          SV* sv = ST(5);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__ExpandDecider, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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 == 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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_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(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          SV* sv = ST(4);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__ExpandDecider, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), 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 == 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_8;
      _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_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _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_8;
      _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_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          SV* sv = ST(5);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__ExpandDecider, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_7); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_6); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_0); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_eset__SWIG_5); 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(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,Xapian::docid);");
    }
    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);
    result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_get_matching_terms_begin(self,it);");
    }
    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(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, SWIG_POINTER_NO_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;
      {
        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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_matching_terms_begin__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::TermIterator result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Enquire_get_matching_terms_end(self,Xapian::MSetIterator const &);");
    }
    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);
    result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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, SWIG_POINTER_NO_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;
      {
        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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_matching_terms_end__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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_Enquire_get_mset__SWIG_6) {
  {
    Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
    Xapian::doccount arg2 ;
    Xapian::doccount arg3 ;
    Xapian::MatchDecider *arg4 = (Xapian::MatchDecider *) 0 ;
    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 < 4) || (items > 4)) {
      SWIG_croak("Usage: Enquire_get_mset(self,first,maxitems,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 *""'"); 
    }
    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);
    {
      SV* sv = ST(3);
      if (SWIG_ConvertPtr(sv, (void**)&arg4,
          SWIGTYPE_p_Xapian__MatchDecider, 0) != SWIG_OK) {
        arg4 = new perlMatchDecider(sv);
      }
    }
    result = Xapian_Enquire_get_mset__SWIG_6(arg1,arg2,arg3,(Xapian::MatchDecider const *)arg4);
    ST(argvi) = SWIG_NewPointerObj((new 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 == 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_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;
      {
        {
          SV* sv = ST(3);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__MatchDecider, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          SV* sv = ST(4);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__MatchDecider, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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 == 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_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;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    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_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;
      {
        {
          SV* sv = ST(5);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__MatchDecider, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_6); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Enquire_get_mset__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Enquire_get_mset'");
  XSRETURN(0);
}


XS(_wrap_ExpandDecider___call__) {
  {
    Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
    std::string *arg2 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: ExpandDecider___call__(self,term);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__ExpandDecider, 0) != SWIG_OK) {
        arg1 = new perlExpandDecider(sv);
      }
    }
    {
      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 '" "ExpandDecider___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExpandDecider___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (bool)((Xapian::ExpandDecider 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_ExpandDecider) {
  {
    Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ExpandDecider(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__ExpandDecider, 0) != SWIG_OK) {
        arg1 = new perlExpandDecider(sv);
      }
    }
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExpandDecider_release) {
  {
    Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
    int argvi = 0;
    Xapian::ExpandDecider *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ExpandDecider_release(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__ExpandDecider, 0) != SWIG_OK) {
        arg1 = new perlExpandDecider(sv);
      }
    }
    {
      try {
        result = (Xapian::ExpandDecider *)((Xapian::ExpandDecider const *)arg1)->release();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ExpandDecider, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ExpandDeciderAnd) {
  {
    Xapian::ExpandDecider *arg1 = 0 ;
    Xapian::ExpandDecider *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::ExpandDeciderAnd *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_ExpandDeciderAnd(first_,second_);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__ExpandDecider,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ExpandDeciderAnd" "', argument " "1"" of type '" "Xapian::ExpandDecider const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExpandDeciderAnd" "', argument " "1"" of type '" "Xapian::ExpandDecider const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__ExpandDecider,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ExpandDeciderAnd" "', argument " "2"" of type '" "Xapian::ExpandDecider const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExpandDeciderAnd" "', argument " "2"" of type '" "Xapian::ExpandDecider const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::ExpandDecider * >(argp2);
    {
      try {
        result = (Xapian::ExpandDeciderAnd *)new Xapian::ExpandDeciderAnd((Xapian::ExpandDecider const &)*arg1,(Xapian::ExpandDecider const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ExpandDeciderAnd, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ExpandDeciderAnd___call__) {
  {
    Xapian::ExpandDeciderAnd *arg1 = (Xapian::ExpandDeciderAnd *) 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: ExpandDeciderAnd___call__(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ExpandDeciderAnd, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExpandDeciderAnd___call__" "', argument " "1"" of type '" "Xapian::ExpandDeciderAnd const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ExpandDeciderAnd * >(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 '" "ExpandDeciderAnd___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExpandDeciderAnd___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (bool)((Xapian::ExpandDeciderAnd 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_ExpandDeciderAnd) {
  {
    Xapian::ExpandDeciderAnd *arg1 = (Xapian::ExpandDeciderAnd *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ExpandDeciderAnd(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ExpandDeciderAnd, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExpandDeciderAnd" "', argument " "1"" of type '" "Xapian::ExpandDeciderAnd *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ExpandDeciderAnd * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_ExpandDeciderFilterPrefix) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::ExpandDeciderFilterPrefix *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_ExpandDeciderFilterPrefix(prefix_);");
    }
    {
      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_ExpandDeciderFilterPrefix" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ExpandDeciderFilterPrefix" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (Xapian::ExpandDeciderFilterPrefix *)new Xapian::ExpandDeciderFilterPrefix((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, 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_ExpandDeciderFilterPrefix___call__) {
  {
    Xapian::ExpandDeciderFilterPrefix *arg1 = (Xapian::ExpandDeciderFilterPrefix *) 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: ExpandDeciderFilterPrefix___call__(self,term);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExpandDeciderFilterPrefix___call__" "', argument " "1"" of type '" "Xapian::ExpandDeciderFilterPrefix const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ExpandDeciderFilterPrefix * >(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 '" "ExpandDeciderFilterPrefix___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ExpandDeciderFilterPrefix___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (bool)((Xapian::ExpandDeciderFilterPrefix 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_ExpandDeciderFilterPrefix) {
  {
    Xapian::ExpandDeciderFilterPrefix *arg1 = (Xapian::ExpandDeciderFilterPrefix *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_ExpandDeciderFilterPrefix(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExpandDeciderFilterPrefix" "', argument " "1"" of type '" "Xapian::ExpandDeciderFilterPrefix *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ExpandDeciderFilterPrefix * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_KeyMaker___call__) {
  {
    Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: KeyMaker___call__(self,doc);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__KeyMaker, 0) != SWIG_OK) {
        arg1 = new perlKeyMaker(sv);
      }
    }
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_KeyMaker(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__KeyMaker, 0) != SWIG_OK) {
        arg1 = new perlKeyMaker(sv);
      }
    }
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_KeyMaker_release) {
  {
    Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
    int argvi = 0;
    Xapian::KeyMaker *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: KeyMaker_release(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__KeyMaker, 0) != SWIG_OK) {
        arg1 = new perlKeyMaker(sv);
      }
    }
    {
      try {
        result = (Xapian::KeyMaker *)((Xapian::KeyMaker const *)arg1)->release();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__KeyMaker, 0 | SWIG_SHADOW); argvi++ ;
    
    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 = 0 ;
    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 ;
    std::string *arg4 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    bool val3 ;
    int ecode3 = 0 ;
    int res4 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: MultiValueKeyMaker_add_value(self,slot,reverse,defvalue);");
    }
    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);
    {
      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 '" "MultiValueKeyMaker_add_value" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiValueKeyMaker_add_value" "', argument " "4"" of type '" "std::string const &""'"); 
      }
      arg4 = ptr;
    }
    {
      try {
        (arg1)->add_value(arg2,arg3,(std::string const &)*arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    if (SWIG_IsNewObj(res4)) delete arg4;
    XSRETURN(argvi);
  fail:
    
    
    
    if (SWIG_IsNewObj(res4)) delete arg4;
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueKeyMaker_add_value__SWIG_1) {
  {
    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) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MultiValueKeyMaker_add_value__SWIG_2) {
  {
    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) = &PL_sv_undef;
    
    
    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:
    
    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__MultiValueKeyMaker, 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_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;
      {
        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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultiValueKeyMaker_add_value__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_MultiValueKeyMaker_add_value__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); 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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Stopper___call__) {
  {
    Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
    std::string *arg2 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Stopper___call__(self,term);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__Stopper, 0) != SWIG_OK) {
        arg1 = new perlStopper(sv);
      }
    }
    {
      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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Stopper(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__Stopper, 0) != SWIG_OK) {
        arg1 = new perlStopper(sv);
      }
    }
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Stopper_get_description) {
  {
    Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Stopper_get_description(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__Stopper, 0) != SWIG_OK) {
        arg1 = new perlStopper(sv);
      }
    }
    {
      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_Stopper_release) {
  {
    Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
    int argvi = 0;
    Xapian::Stopper *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Stopper_release(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__Stopper, 0) != SWIG_OK) {
        arg1 = new perlStopper(sv);
      }
    }
    {
      try {
        result = (Xapian::Stopper *)((Xapian::Stopper const *)arg1)->release();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stopper, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_SimpleStopper__SWIG_0) {
  {
    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) = &PL_sv_undef;
    
    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,SWIG_STD_MOVE(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_SimpleStopper__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::SimpleStopper *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_SimpleStopper(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 '" "new_SimpleStopper" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimpleStopper" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (Xapian::SimpleStopper *)new_Xapian_SimpleStopper__SWIG_1((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SimpleStopper, 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_SimpleStopper) {
  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_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SimpleStopper__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_SimpleStopper__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_SimpleStopper'");
  XSRETURN(0);
}


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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_RangeProcessor__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::RangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_RangeProcessor(slot_,str_,flags_);");
    }
    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_RangeProcessor" "', 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_RangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeProcessor" "', 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 '" "new_RangeProcessor" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg1,(std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeProcessor, 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_RangeProcessor__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::RangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_RangeProcessor(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_RangeProcessor" "', 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_RangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg1,(std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeProcessor, 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_RangeProcessor__SWIG_3) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::RangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_RangeProcessor(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_RangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::RangeProcessor *)new Xapian::RangeProcessor(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_RangeProcessor) {
  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:
    
    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_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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RangeProcessor__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RangeProcessor__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RangeProcessor__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_RangeProcessor__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_RangeProcessor'");
  XSRETURN(0);
}


XS(_wrap_delete_RangeProcessor) {
  {
    Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_RangeProcessor(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__RangeProcessor, 0) != SWIG_OK) {
        arg1 = new perlRangeProcessor(sv);
      }
    }
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RangeProcessor_check_range) {
  {
    Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: RangeProcessor_check_range(self,b,e);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__RangeProcessor, 0) != SWIG_OK) {
        arg1 = new perlRangeProcessor(sv);
      }
    }
    {
      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 '" "RangeProcessor_check_range" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RangeProcessor_check_range" "', 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 '" "RangeProcessor_check_range" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RangeProcessor_check_range" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = (arg1)->check_range((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(result)), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | 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_RangeProcessor___call__) {
  {
    Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: RangeProcessor___call__(self,begin,end);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__RangeProcessor, 0) != SWIG_OK) {
        arg1 = new perlRangeProcessor(sv);
      }
    }
    {
      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 '" "RangeProcessor___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RangeProcessor___call__" "', 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 '" "RangeProcessor___call__" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RangeProcessor___call__" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(result)), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | 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_RangeProcessor_release) {
  {
    Xapian::RangeProcessor *arg1 = (Xapian::RangeProcessor *) 0 ;
    int argvi = 0;
    Xapian::RangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: RangeProcessor_release(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__RangeProcessor, 0) != SWIG_OK) {
        arg1 = new perlRangeProcessor(sv);
      }
    }
    {
      try {
        result = (Xapian::RangeProcessor *)((Xapian::RangeProcessor const *)arg1)->release();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeProcessor, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateRangeProcessor__SWIG_0) {
  {
    Xapian::valueno arg1 ;
    unsigned int arg2 ;
    int arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DateRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DateRangeProcessor(slot_,flags_,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_DateRangeProcessor" "', 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_DateRangeProcessor" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned 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 '" "new_DateRangeProcessor" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    {
      try {
        result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateRangeProcessor__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    unsigned int arg2 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::DateRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DateRangeProcessor(slot_,flags_);");
    }
    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_DateRangeProcessor" "', 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_DateRangeProcessor" "', argument " "2"" of type '" "unsigned int""'");
    } 
    arg2 = static_cast< unsigned int >(val2);
    {
      try {
        result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateRangeProcessor__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::DateRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_DateRangeProcessor(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_DateRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_DateRangeProcessor__SWIG_3) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    int arg4 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::DateRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_DateRangeProcessor(slot_,str_,flags_,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_DateRangeProcessor" "', 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_DateRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateRangeProcessor" "', 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 '" "new_DateRangeProcessor" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DateRangeProcessor" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    {
      try {
        result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateRangeProcessor, 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_DateRangeProcessor__SWIG_4) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::DateRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_DateRangeProcessor(slot_,str_,flags_);");
    }
    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_DateRangeProcessor" "', 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_DateRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateRangeProcessor" "', 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 '" "new_DateRangeProcessor" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateRangeProcessor, 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_DateRangeProcessor__SWIG_5) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::DateRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_DateRangeProcessor(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_DateRangeProcessor" "', 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_DateRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::DateRangeProcessor *)new Xapian::DateRangeProcessor(arg1,(std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateRangeProcessor, 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_DateRangeProcessor) {
  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 == 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_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_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_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;
      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_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_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;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateRangeProcessor__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateRangeProcessor__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateRangeProcessor__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateRangeProcessor__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateRangeProcessor__SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateRangeProcessor__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_DateRangeProcessor'");
  XSRETURN(0);
}


XS(_wrap_DateRangeProcessor___call__) {
  {
    Xapian::DateRangeProcessor *arg1 = (Xapian::DateRangeProcessor *) 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;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DateRangeProcessor___call__(self,begin,end);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DateRangeProcessor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateRangeProcessor___call__" "', argument " "1"" of type '" "Xapian::DateRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DateRangeProcessor * >(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 '" "DateRangeProcessor___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateRangeProcessor___call__" "', 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 '" "DateRangeProcessor___call__" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateRangeProcessor___call__" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(result)), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | 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_delete_DateRangeProcessor) {
  {
    Xapian::DateRangeProcessor *arg1 = (Xapian::DateRangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DateRangeProcessor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DateRangeProcessor, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DateRangeProcessor" "', argument " "1"" of type '" "Xapian::DateRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DateRangeProcessor * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumberRangeProcessor__SWIG_0) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::NumberRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_NumberRangeProcessor(slot_,str_,flags_);");
    }
    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_NumberRangeProcessor" "', 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_NumberRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumberRangeProcessor" "', 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 '" "new_NumberRangeProcessor" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1,(std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberRangeProcessor, 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_NumberRangeProcessor__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    std::string *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::NumberRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_NumberRangeProcessor(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_NumberRangeProcessor" "', 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_NumberRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumberRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1,(std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberRangeProcessor, 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_NumberRangeProcessor__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::NumberRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_NumberRangeProcessor(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_NumberRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    {
      try {
        result = (Xapian::NumberRangeProcessor *)new Xapian::NumberRangeProcessor(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberRangeProcessor, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_NumberRangeProcessor) {
  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_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumberRangeProcessor__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumberRangeProcessor__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumberRangeProcessor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_NumberRangeProcessor'");
  XSRETURN(0);
}


XS(_wrap_NumberRangeProcessor___call__) {
  {
    Xapian::NumberRangeProcessor *arg1 = (Xapian::NumberRangeProcessor *) 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;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: NumberRangeProcessor___call__(self,begin,end);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__NumberRangeProcessor, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NumberRangeProcessor___call__" "', argument " "1"" of type '" "Xapian::NumberRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::NumberRangeProcessor * >(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 '" "NumberRangeProcessor___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NumberRangeProcessor___call__" "', 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 '" "NumberRangeProcessor___call__" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NumberRangeProcessor___call__" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = (arg1)->operator ()((std::string const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Query(result)), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | 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_delete_NumberRangeProcessor) {
  {
    Xapian::NumberRangeProcessor *arg1 = (Xapian::NumberRangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_NumberRangeProcessor(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__NumberRangeProcessor, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NumberRangeProcessor" "', argument " "1"" of type '" "Xapian::NumberRangeProcessor *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::NumberRangeProcessor * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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_ValueRangeProcessor_release) {
  {
    Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::ValueRangeProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValueRangeProcessor_release(self);");
    }
    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_release" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
    {
      try {
        result = (Xapian::ValueRangeProcessor *)((Xapian::ValueRangeProcessor const *)arg1)->release();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 | SWIG_SHADOW); 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StringValueRangeProcessor__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_StringValueRangeProcessor__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_0); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DateValueRangeProcessor__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumberValueRangeProcessor__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_NumberValueRangeProcessor__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FieldProcessor) {
  {
    Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FieldProcessor(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__FieldProcessor, 0) != SWIG_OK) {
        arg1 = new perlFieldProcessor(sv);
      }
    }
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldProcessor___call__) {
  {
    Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
    std::string *arg2 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::Query result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldProcessor___call__(self,str);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__FieldProcessor, 0) != SWIG_OK) {
        arg1 = new perlFieldProcessor(sv);
      }
    }
    {
      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 '" "FieldProcessor___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FieldProcessor___call__" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        result = (arg1)->operator ()((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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_FieldProcessor_release) {
  {
    Xapian::FieldProcessor *arg1 = (Xapian::FieldProcessor *) 0 ;
    int argvi = 0;
    Xapian::FieldProcessor *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldProcessor_release(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__FieldProcessor, 0) != SWIG_OK) {
        arg1 = new perlFieldProcessor(sv);
      }
    }
    {
      try {
        result = (Xapian::FieldProcessor *)((Xapian::FieldProcessor const *)arg1)->release();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FieldProcessor, 0 | SWIG_SHADOW); argvi++ ;
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    
    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 ;
    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);
    {
      SV* sv = ST(1);
      if (SWIG_ConvertPtr(sv, (void**)&arg2,
          SWIGTYPE_p_Xapian__Stopper, 0) != SWIG_OK) {
        arg2 = new perlStopper(sv);
      }
    }
    {
      try {
        (arg1)->set_stopper((Xapian::Stopper const *)arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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;
      {
        {
          SV* sv = ST(1);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__Stopper, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_set_stopper__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_max_expansion__SWIG_0) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::termcount arg2 ;
    int arg3 ;
    unsigned int arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: QueryParser_set_max_expansion(self,max_expansion,max_type,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_set_max_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_expansion" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(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 '" "QueryParser_set_max_expansion" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(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 '" "QueryParser_set_max_expansion" "', argument " "4"" of type '" "unsigned int""'");
    } 
    arg4 = static_cast< unsigned int >(val4);
    {
      try {
        (arg1)->set_max_expansion(arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_max_expansion__SWIG_1) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::termcount arg2 ;
    int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QueryParser_set_max_expansion(self,max_expansion,max_type);");
    }
    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_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_expansion" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(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 '" "QueryParser_set_max_expansion" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    {
      try {
        (arg1)->set_max_expansion(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_max_expansion__SWIG_2) {
  {
    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_expansion(self,max_expansion);");
    }
    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_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_expansion" "', argument " "2"" of type '" "Xapian::termcount""'");
    } 
    arg2 = static_cast< Xapian::termcount >(val2);
    {
      try {
        (arg1)->set_max_expansion(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_set_max_expansion) {
  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_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__QueryParser, 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_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_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_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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_set_max_expansion__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_set_max_expansion__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_set_max_expansion__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'QueryParser_set_max_expansion'");
  XSRETURN(0);
}


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,Xapian::termcount);");
    }
    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) = &PL_sv_undef;
    
    
    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(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(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(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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_parse_query__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_parse_query__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); 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__SWIG_0) {
  {
    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) = &PL_sv_undef;
    
    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_prefix__SWIG_1) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QueryParser_add_prefix(self,field,proc);");
    }
    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;
    }
    {
      SV* sv = ST(2);
      if (SWIG_ConvertPtr(sv, (void**)&arg3,
          SWIGTYPE_p_Xapian__FieldProcessor, 0) != SWIG_OK) {
        arg3 = new perlFieldProcessor(sv);
      }
    }
    {
      try {
        (arg1)->add_prefix((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_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;
      {
        {
          SV* sv = ST(2);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__FieldProcessor, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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_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;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_prefix__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_prefix__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'QueryParser_add_prefix'");
  XSRETURN(0);
}


XS(_wrap_QueryParser_add_boolean_prefix__SWIG_0) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = (std::string *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int res3 = SWIG_OLDOBJ ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: QueryParser_add_boolean_prefix(self,field,prefix,grouping);");
    }
    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;
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_std__string, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "QueryParser_add_boolean_prefix" "', argument " "4"" of type '" "std::string const *""'"); 
    }
    arg4 = reinterpret_cast< std::string * >(argp4);
    {
      try {
        (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,(std::string const *)arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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_2) {
  {
    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) = &PL_sv_undef;
    
    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_3) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
    std::string *arg4 = (std::string *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    void *argp4 = 0 ;
    int res4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: QueryParser_add_boolean_prefix(self,field,proc,grouping);");
    }
    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;
    }
    {
      SV* sv = ST(2);
      if (SWIG_ConvertPtr(sv, (void**)&arg3,
          SWIGTYPE_p_Xapian__FieldProcessor, 0) != SWIG_OK) {
        arg3 = new perlFieldProcessor(sv);
      }
    }
    res4 = SWIG_ConvertPtr(ST(3), &argp4,SWIGTYPE_p_std__string, 0 |  0 );
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "QueryParser_add_boolean_prefix" "', argument " "4"" of type '" "std::string const *""'"); 
    }
    arg4 = reinterpret_cast< std::string * >(argp4);
    {
      try {
        (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3,(std::string const *)arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_boolean_prefix__SWIG_4) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QueryParser_add_boolean_prefix(self,field,proc);");
    }
    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;
    }
    {
      SV* sv = ST(2);
      if (SWIG_ConvertPtr(sv, (void**)&arg3,
          SWIGTYPE_p_Xapian__FieldProcessor, 0) != SWIG_OK) {
        arg3 = new perlFieldProcessor(sv);
      }
    }
    {
      try {
        (arg1)->add_boolean_prefix((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_boolean_prefix__SWIG_5) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    std::string *arg2 = 0 ;
    Xapian::FieldProcessor *arg3 = (Xapian::FieldProcessor *) 0 ;
    bool arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = 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,proc,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;
    }
    {
      SV* sv = ST(2);
      if (SWIG_ConvertPtr(sv, (void**)&arg3,
          SWIGTYPE_p_Xapian__FieldProcessor, 0) != SWIG_OK) {
        arg3 = new perlFieldProcessor(sv);
      }
    }
    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,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    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;
      {
        {
          SV* sv = ST(2);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__FieldProcessor, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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_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;
      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;
      {
        {
          SV* sv = ST(2);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__FieldProcessor, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      if (!_v) goto check_3;
      _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_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 == 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_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;
      {
        {
          SV* sv = ST(2);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__FieldProcessor, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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(3), (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 == 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_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_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (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(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:
    
    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_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_AsPtr_std_string SWIG_PERL_CALL_ARGS_2(ST(2), (std::string**)(0));
        _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(3), (std::string**)(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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_boolean_prefix__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_boolean_prefix__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_boolean_prefix__SWIG_5); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_boolean_prefix__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_boolean_prefix__SWIG_2); return;
    case 6:
      PUSHMARK(MARK); 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(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);
    result = ((Xapian::QueryParser const *)arg1)->stoplist_end();
    ST(argvi) = SWIG_NewPointerObj((new 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(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;
    }
    result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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_rangeprocessor__SWIG_0) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::RangeProcessor *arg2 = (Xapian::RangeProcessor *) 0 ;
    std::string *arg3 = (std::string *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: QueryParser_add_rangeprocessor(self,range_proc,grouping);");
    }
    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_rangeprocessor" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      SV* sv = ST(1);
      if (SWIG_ConvertPtr(sv, (void**)&arg2,
          SWIGTYPE_p_Xapian__RangeProcessor, 0) != SWIG_OK) {
        arg2 = new perlRangeProcessor(sv);
      }
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_std__string, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "QueryParser_add_rangeprocessor" "', argument " "3"" of type '" "std::string const *""'"); 
    }
    arg3 = reinterpret_cast< std::string * >(argp3);
    {
      try {
        (arg1)->add_rangeprocessor(arg2,(std::string const *)arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_rangeprocessor__SWIG_1) {
  {
    Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
    Xapian::RangeProcessor *arg2 = (Xapian::RangeProcessor *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: QueryParser_add_rangeprocessor(self,range_proc);");
    }
    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_rangeprocessor" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
    {
      SV* sv = ST(1);
      if (SWIG_ConvertPtr(sv, (void**)&arg2,
          SWIGTYPE_p_Xapian__RangeProcessor, 0) != SWIG_OK) {
        arg2 = new perlRangeProcessor(sv);
      }
    }
    {
      try {
        (arg1)->add_rangeprocessor(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_QueryParser_add_rangeprocessor) {
  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;
      {
        {
          SV* sv = ST(1);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__RangeProcessor, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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;
      {
        {
          SV* sv = ST(1);
          void* ptr;
          if (SWIG_ConvertPtr(sv, &ptr, SWIGTYPE_p_Xapian__RangeProcessor, 0) == SWIG_OK) {
            (void)ptr;
            _v = 1;
          } else {
            /* The docs in perlapi for call_sv say:
            	 *
            	 *    [T]he SV may be any of a CV, a GV, a reference to a CV, a
            	 *    reference to a GV or "SvPV(sv)" will be used as the name of the
            	 *    sub to call.
            	 *
            	 * To make overloading work helpfully, we don't allow passing the name
            	 * of a sub.  Search::Xapian did in some cases, but it seems unlikely
            	 * anyone relied on this.
            	 */
            svtype t = SvTYPE(sv);
            if (t == SVt_RV) {
              t = SvTYPE(SvRV(sv));
            }
            _v = (t == SVt_PVCV || t == SVt_PVGV);
          }
        }
      }
      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;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_rangeprocessor__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_QueryParser_add_rangeprocessor__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'QueryParser_add_rangeprocessor'");
  XSRETURN(0);
}


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) = &PL_sv_undef;
    
    
    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(serialised);");
    }
    {
      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_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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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 = 0 ;
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Weight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    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);
    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 '" "Weight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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;
    double 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 = (double)((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 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Weight_get_sumextra(self,doclen,uniqterms);");
    }
    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);
    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_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::Weight const *)arg1)->get_sumextra(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_maxextra) {
  {
    Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double 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 = (double)((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_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 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BoolWeight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    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);
    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 '" "BoolWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::BoolWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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;
    double 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 = (double)((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 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BoolWeight_get_sumextra(self,doclen,uniqterms);");
    }
    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);
    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_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::BoolWeight const *)arg1)->get_sumextra(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_maxextra) {
  {
    Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double 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 = (double)((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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_TfIdfWeight__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::TfIdfWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_TfIdfWeight(normalizations);");
    }
    {
      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_TfIdfWeight" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TfIdfWeight" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = (Xapian::TfIdfWeight *)new Xapian::TfIdfWeight((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TfIdfWeight, 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_TfIdfWeight__SWIG_1) {
  {
    int argvi = 0;
    Xapian::TfIdfWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_TfIdfWeight();");
    }
    {
      try {
        result = (Xapian::TfIdfWeight *)new Xapian::TfIdfWeight();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TfIdfWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_TfIdfWeight) {
  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_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TfIdfWeight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TfIdfWeight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_TfIdfWeight'");
  XSRETURN(0);
}


XS(_wrap_TfIdfWeight_name) {
  {
    Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TfIdfWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TfIdfWeight_name" "', argument " "1"" of type '" "Xapian::TfIdfWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
    {
      try {
        result = ((Xapian::TfIdfWeight 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_TfIdfWeight_get_sumpart) {
  {
    Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: TfIdfWeight_get_sumpart(self,wdf,doclen,uniqterm);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TfIdfWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::TfIdfWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(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 '" "TfIdfWeight_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 '" "TfIdfWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "TfIdfWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::TfIdfWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_TfIdfWeight_get_maxpart) {
  {
    Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TfIdfWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TfIdfWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::TfIdfWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::TfIdfWeight 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_TfIdfWeight_get_sumextra) {
  {
    Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: TfIdfWeight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TfIdfWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::TfIdfWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(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 '" "TfIdfWeight_get_sumextra" "', 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 '" "TfIdfWeight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::TfIdfWeight const *)arg1)->get_sumextra(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_TfIdfWeight_get_maxextra) {
  {
    Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: TfIdfWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TfIdfWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::TfIdfWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::TfIdfWeight 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_TfIdfWeight) {
  {
    Xapian::TfIdfWeight *arg1 = (Xapian::TfIdfWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_TfIdfWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__TfIdfWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TfIdfWeight" "', argument " "1"" of type '" "Xapian::TfIdfWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::TfIdfWeight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BM25Weight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BM25Weight_get_sumpart(self,wdf,doclen,uniqterm);");
    }
    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);
    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 '" "BM25Weight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::BM25Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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;
    double 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 = (double)((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 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BM25Weight_get_sumextra(self,doclen,uniqterms);");
    }
    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);
    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_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::BM25Weight const *)arg1)->get_sumextra(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_maxextra) {
  {
    Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double 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 = (double)((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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BM25PlusWeight__SWIG_0) {
  {
    double arg1 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    double arg6 ;
    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 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Xapian::BM25PlusWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_BM25PlusWeight(k1,k2,k3,b,min_normlen,delta);");
    }
    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_BM25PlusWeight" "', 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_BM25PlusWeight" "', 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_BM25PlusWeight" "', 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_BM25PlusWeight" "', 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_BM25PlusWeight" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_BM25PlusWeight" "', argument " "6"" of type '" "double""'");
    } 
    arg6 = static_cast< double >(val6);
    {
      try {
        result = (Xapian::BM25PlusWeight *)new Xapian::BM25PlusWeight(arg1,arg2,arg3,arg4,arg5,arg6);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BM25PlusWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_BM25PlusWeight) {
  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 == 6) {
      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;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BM25PlusWeight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BM25PlusWeight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BM25PlusWeight'");
  XSRETURN(0);
}


XS(_wrap_BM25PlusWeight_name) {
  {
    Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BM25PlusWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25PlusWeight_name" "', argument " "1"" of type '" "Xapian::BM25PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
    {
      try {
        result = ((Xapian::BM25PlusWeight 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_BM25PlusWeight_get_sumpart) {
  {
    Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BM25PlusWeight_get_sumpart(self,wdf,doclen,uniqterm);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25PlusWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::BM25PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(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 '" "BM25PlusWeight_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 '" "BM25PlusWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "BM25PlusWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_BM25PlusWeight_get_maxpart) {
  {
    Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BM25PlusWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25PlusWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::BM25PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::BM25PlusWeight 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_BM25PlusWeight_get_sumextra) {
  {
    Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BM25PlusWeight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25PlusWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::BM25PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(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 '" "BM25PlusWeight_get_sumextra" "', 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 '" "BM25PlusWeight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::BM25PlusWeight const *)arg1)->get_sumextra(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_BM25PlusWeight_get_maxextra) {
  {
    Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BM25PlusWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25PlusWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::BM25PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::BM25PlusWeight 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_BM25PlusWeight) {
  {
    Xapian::BM25PlusWeight *arg1 = (Xapian::BM25PlusWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BM25PlusWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BM25PlusWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BM25PlusWeight" "', argument " "1"" of type '" "Xapian::BM25PlusWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BM25PlusWeight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_TradWeight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: TradWeight_get_sumpart(self,wdf,doclen,uniqueterms);");
    }
    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);
    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 '" "TradWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::TradWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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;
    double 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 = (double)((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 ;
    Xapian::termcount arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: TradWeight_get_sumextra(self,doclen,uniqterms);");
    }
    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);
    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_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::TradWeight const *)arg1)->get_sumextra(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_maxextra) {
  {
    Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double 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 = (double)((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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_InL2Weight__SWIG_0) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::InL2Weight *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_InL2Weight(c);");
    }
    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_InL2Weight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (Xapian::InL2Weight *)new Xapian::InL2Weight(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InL2Weight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_InL2Weight) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InL2Weight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_InL2Weight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_InL2Weight'");
  XSRETURN(0);
}


XS(_wrap_InL2Weight_name) {
  {
    Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InL2Weight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InL2Weight_name" "', argument " "1"" of type '" "Xapian::InL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
    {
      try {
        result = ((Xapian::InL2Weight 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_InL2Weight_get_sumpart) {
  {
    Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: InL2Weight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InL2Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::InL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InL2Weight * >(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 '" "InL2Weight_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 '" "InL2Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "InL2Weight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::InL2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_InL2Weight_get_maxpart) {
  {
    Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InL2Weight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InL2Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::InL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::InL2Weight 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_InL2Weight_get_sumextra) {
  {
    Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: InL2Weight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InL2Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::InL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InL2Weight * >(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 '" "InL2Weight_get_sumextra" "', 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 '" "InL2Weight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::InL2Weight const *)arg1)->get_sumextra(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_InL2Weight_get_maxextra) {
  {
    Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: InL2Weight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InL2Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::InL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::InL2Weight 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_InL2Weight) {
  {
    Xapian::InL2Weight *arg1 = (Xapian::InL2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_InL2Weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__InL2Weight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InL2Weight" "', argument " "1"" of type '" "Xapian::InL2Weight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::InL2Weight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IfB2Weight__SWIG_0) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::IfB2Weight *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_IfB2Weight(c);");
    }
    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_IfB2Weight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (Xapian::IfB2Weight *)new Xapian::IfB2Weight(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__IfB2Weight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_IfB2Weight) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IfB2Weight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IfB2Weight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_IfB2Weight'");
  XSRETURN(0);
}


XS(_wrap_IfB2Weight_name) {
  {
    Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IfB2Weight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IfB2Weight_name" "', argument " "1"" of type '" "Xapian::IfB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
    {
      try {
        result = ((Xapian::IfB2Weight 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_IfB2Weight_get_sumpart) {
  {
    Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: IfB2Weight_get_sumpart(self,wdf,doclen,uniqterm);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IfB2Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::IfB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IfB2Weight * >(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 '" "IfB2Weight_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 '" "IfB2Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "IfB2Weight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::IfB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_IfB2Weight_get_maxpart) {
  {
    Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IfB2Weight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IfB2Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::IfB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::IfB2Weight 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_IfB2Weight_get_sumextra) {
  {
    Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IfB2Weight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IfB2Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::IfB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IfB2Weight * >(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 '" "IfB2Weight_get_sumextra" "', 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 '" "IfB2Weight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::IfB2Weight const *)arg1)->get_sumextra(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_IfB2Weight_get_maxextra) {
  {
    Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IfB2Weight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IfB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IfB2Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::IfB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::IfB2Weight 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_IfB2Weight) {
  {
    Xapian::IfB2Weight *arg1 = (Xapian::IfB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IfB2Weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IfB2Weight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IfB2Weight" "', argument " "1"" of type '" "Xapian::IfB2Weight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IfB2Weight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_IneB2Weight__SWIG_0) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::IneB2Weight *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_IneB2Weight(c);");
    }
    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_IneB2Weight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (Xapian::IneB2Weight *)new Xapian::IneB2Weight(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__IneB2Weight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_IneB2Weight) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IneB2Weight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_IneB2Weight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_IneB2Weight'");
  XSRETURN(0);
}


XS(_wrap_IneB2Weight_name) {
  {
    Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IneB2Weight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IneB2Weight_name" "', argument " "1"" of type '" "Xapian::IneB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
    {
      try {
        result = ((Xapian::IneB2Weight 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_IneB2Weight_get_sumpart) {
  {
    Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: IneB2Weight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IneB2Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::IneB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IneB2Weight * >(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 '" "IneB2Weight_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 '" "IneB2Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "IneB2Weight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::IneB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_IneB2Weight_get_maxpart) {
  {
    Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IneB2Weight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IneB2Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::IneB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::IneB2Weight 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_IneB2Weight_get_sumextra) {
  {
    Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: IneB2Weight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IneB2Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::IneB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IneB2Weight * >(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 '" "IneB2Weight_get_sumextra" "', 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 '" "IneB2Weight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::IneB2Weight const *)arg1)->get_sumextra(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_IneB2Weight_get_maxextra) {
  {
    Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: IneB2Weight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IneB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IneB2Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::IneB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::IneB2Weight 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_IneB2Weight) {
  {
    Xapian::IneB2Weight *arg1 = (Xapian::IneB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_IneB2Weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__IneB2Weight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IneB2Weight" "', argument " "1"" of type '" "Xapian::IneB2Weight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::IneB2Weight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_BB2Weight__SWIG_0) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::BB2Weight *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_BB2Weight(c);");
    }
    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_BB2Weight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (Xapian::BB2Weight *)new Xapian::BB2Weight(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BB2Weight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_BB2Weight) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BB2Weight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_BB2Weight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_BB2Weight'");
  XSRETURN(0);
}


XS(_wrap_BB2Weight_name) {
  {
    Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BB2Weight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BB2Weight_name" "', argument " "1"" of type '" "Xapian::BB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
    {
      try {
        result = ((Xapian::BB2Weight 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_BB2Weight_get_sumpart) {
  {
    Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: BB2Weight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BB2Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::BB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BB2Weight * >(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 '" "BB2Weight_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 '" "BB2Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "BB2Weight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::BB2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_BB2Weight_get_maxpart) {
  {
    Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BB2Weight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BB2Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::BB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::BB2Weight 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_BB2Weight_get_sumextra) {
  {
    Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: BB2Weight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BB2Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::BB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BB2Weight * >(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 '" "BB2Weight_get_sumextra" "', 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 '" "BB2Weight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::BB2Weight const *)arg1)->get_sumextra(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_BB2Weight_get_maxextra) {
  {
    Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: BB2Weight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BB2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BB2Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::BB2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::BB2Weight 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_BB2Weight) {
  {
    Xapian::BB2Weight *arg1 = (Xapian::BB2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_BB2Weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__BB2Weight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BB2Weight" "', argument " "1"" of type '" "Xapian::BB2Weight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::BB2Weight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_DLHWeight_name) {
  {
    Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DLHWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DLHWeight_name" "', argument " "1"" of type '" "Xapian::DLHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
    {
      try {
        result = ((Xapian::DLHWeight 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_DLHWeight_get_sumpart) {
  {
    Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: DLHWeight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DLHWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::DLHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DLHWeight * >(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 '" "DLHWeight_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 '" "DLHWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "DLHWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::DLHWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_DLHWeight_get_maxpart) {
  {
    Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DLHWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DLHWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::DLHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::DLHWeight 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_DLHWeight_get_sumextra) {
  {
    Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DLHWeight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DLHWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::DLHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DLHWeight * >(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 '" "DLHWeight_get_sumextra" "', 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 '" "DLHWeight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::DLHWeight const *)arg1)->get_sumextra(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_DLHWeight_get_maxextra) {
  {
    Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DLHWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DLHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DLHWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::DLHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::DLHWeight 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_DLHWeight) {
  {
    Xapian::DLHWeight *arg1 = (Xapian::DLHWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DLHWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DLHWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DLHWeight" "', argument " "1"" of type '" "Xapian::DLHWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DLHWeight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PL2Weight__SWIG_0) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::PL2Weight *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_PL2Weight(c);");
    }
    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_PL2Weight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (Xapian::PL2Weight *)new Xapian::PL2Weight(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PL2Weight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_PL2Weight) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PL2Weight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PL2Weight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PL2Weight'");
  XSRETURN(0);
}


XS(_wrap_PL2Weight_name) {
  {
    Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PL2Weight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2Weight_name" "', argument " "1"" of type '" "Xapian::PL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
    {
      try {
        result = ((Xapian::PL2Weight 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_PL2Weight_get_sumpart) {
  {
    Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: PL2Weight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::PL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2Weight * >(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 '" "PL2Weight_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 '" "PL2Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "PL2Weight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::PL2Weight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_PL2Weight_get_maxpart) {
  {
    Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PL2Weight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::PL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::PL2Weight 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_PL2Weight_get_sumextra) {
  {
    Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: PL2Weight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::PL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2Weight * >(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 '" "PL2Weight_get_sumextra" "', 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 '" "PL2Weight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::PL2Weight const *)arg1)->get_sumextra(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_PL2Weight_get_maxextra) {
  {
    Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PL2Weight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2Weight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::PL2Weight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
    {
      try {
        result = (double)((Xapian::PL2Weight 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_PL2Weight) {
  {
    Xapian::PL2Weight *arg1 = (Xapian::PL2Weight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PL2Weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2Weight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PL2Weight" "', argument " "1"" of type '" "Xapian::PL2Weight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2Weight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_PL2PlusWeight__SWIG_0) {
  {
    double arg1 ;
    double arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::PL2PlusWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_PL2PlusWeight(c,delta);");
    }
    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_PL2PlusWeight" "', 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_PL2PlusWeight" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        result = (Xapian::PL2PlusWeight *)new Xapian::PL2PlusWeight(arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PL2PlusWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_PL2PlusWeight) {
  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 == 2) {
      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;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PL2PlusWeight__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_PL2PlusWeight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_PL2PlusWeight'");
  XSRETURN(0);
}


XS(_wrap_PL2PlusWeight_name) {
  {
    Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PL2PlusWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2PlusWeight_name" "', argument " "1"" of type '" "Xapian::PL2PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
    {
      try {
        result = ((Xapian::PL2PlusWeight 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_PL2PlusWeight_get_sumpart) {
  {
    Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: PL2PlusWeight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2PlusWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::PL2PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(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 '" "PL2PlusWeight_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 '" "PL2PlusWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "PL2PlusWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_PL2PlusWeight_get_maxpart) {
  {
    Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PL2PlusWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2PlusWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::PL2PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::PL2PlusWeight 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_PL2PlusWeight_get_sumextra) {
  {
    Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: PL2PlusWeight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2PlusWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::PL2PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(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 '" "PL2PlusWeight_get_sumextra" "', 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 '" "PL2PlusWeight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::PL2PlusWeight const *)arg1)->get_sumextra(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_PL2PlusWeight_get_maxextra) {
  {
    Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PL2PlusWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PL2PlusWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::PL2PlusWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::PL2PlusWeight 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_PL2PlusWeight) {
  {
    Xapian::PL2PlusWeight *arg1 = (Xapian::PL2PlusWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_PL2PlusWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__PL2PlusWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PL2PlusWeight" "', argument " "1"" of type '" "Xapian::PL2PlusWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PL2PlusWeight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_DPHWeight_name) {
  {
    Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DPHWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DPHWeight_name" "', argument " "1"" of type '" "Xapian::DPHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
    {
      try {
        result = ((Xapian::DPHWeight 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_DPHWeight_get_sumpart) {
  {
    Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: DPHWeight_get_sumpart(self,wdf,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DPHWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::DPHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DPHWeight * >(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 '" "DPHWeight_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 '" "DPHWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "DPHWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::DPHWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_DPHWeight_get_maxpart) {
  {
    Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DPHWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DPHWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::DPHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::DPHWeight 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_DPHWeight_get_sumextra) {
  {
    Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: DPHWeight_get_sumextra(self,doclen,uniqterms);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DPHWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::DPHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DPHWeight * >(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 '" "DPHWeight_get_sumextra" "', 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 '" "DPHWeight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::DPHWeight const *)arg1)->get_sumextra(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_DPHWeight_get_maxextra) {
  {
    Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: DPHWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DPHWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DPHWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::DPHWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::DPHWeight 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_DPHWeight) {
  {
    Xapian::DPHWeight *arg1 = (Xapian::DPHWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_DPHWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__DPHWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DPHWeight" "', argument " "1"" of type '" "Xapian::DPHWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::DPHWeight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LMWeight__SWIG_0) {
  {
    double arg1 ;
    Xapian::Weight::type_smoothing arg2 ;
    double arg3 ;
    double arg4 ;
    double val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::LMWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LMWeight(param_log_,select_smoothing_,param_smoothing1_,param_smoothing2_);");
    }
    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_LMWeight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    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_LMWeight" "', argument " "2"" of type '" "Xapian::Weight::type_smoothing""'");
    } 
    arg2 = static_cast< Xapian::Weight::type_smoothing >(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_LMWeight" "', 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_LMWeight" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
    {
      try {
        result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LMWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LMWeight__SWIG_1) {
  {
    double arg1 ;
    Xapian::Weight::type_smoothing arg2 ;
    double arg3 ;
    double val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::LMWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LMWeight(param_log_,select_smoothing_,param_smoothing1_);");
    }
    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_LMWeight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    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_LMWeight" "', argument " "2"" of type '" "Xapian::Weight::type_smoothing""'");
    } 
    arg2 = static_cast< Xapian::Weight::type_smoothing >(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_LMWeight" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LMWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LMWeight__SWIG_2) {
  {
    double arg1 ;
    Xapian::Weight::type_smoothing arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::LMWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LMWeight(param_log_,select_smoothing_);");
    }
    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_LMWeight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    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_LMWeight" "', argument " "2"" of type '" "Xapian::Weight::type_smoothing""'");
    } 
    arg2 = static_cast< Xapian::Weight::type_smoothing >(val2);
    {
      try {
        result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LMWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LMWeight__SWIG_3) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::LMWeight *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_LMWeight(param_log_);");
    }
    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_LMWeight" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (Xapian::LMWeight *)new Xapian::LMWeight(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LMWeight, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_LMWeight) {
  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:
    
    if (items == 2) {
      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_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:
    
    if (items == 3) {
      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_4;
      _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_4;
      _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_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_AsVal_double 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_AsVal_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_double 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_double 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LMWeight__SWIG_4); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LMWeight__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LMWeight__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LMWeight__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LMWeight__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LMWeight'");
  XSRETURN(0);
}


XS(_wrap_LMWeight_name) {
  {
    Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LMWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LMWeight_name" "', argument " "1"" of type '" "Xapian::LMWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
    {
      try {
        result = ((Xapian::LMWeight 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_LMWeight_get_sumpart) {
  {
    Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: LMWeight_get_sumpart(self,wdf,doclen,uniqterm);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LMWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::LMWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LMWeight * >(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 '" "LMWeight_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 '" "LMWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "LMWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::LMWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_LMWeight_get_maxpart) {
  {
    Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LMWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LMWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::LMWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::LMWeight 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_LMWeight_get_sumextra) {
  {
    Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LMWeight_get_sumextra(self,doclen,Xapian::termcount);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LMWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::LMWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LMWeight * >(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 '" "LMWeight_get_sumextra" "', 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 '" "LMWeight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::LMWeight const *)arg1)->get_sumextra(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_LMWeight_get_maxextra) {
  {
    Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LMWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LMWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LMWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::LMWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::LMWeight 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_LMWeight) {
  {
    Xapian::LMWeight *arg1 = (Xapian::LMWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LMWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LMWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LMWeight" "', argument " "1"" of type '" "Xapian::LMWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LMWeight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CoordWeight_init) {
  {
    Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 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: CoordWeight_init(self,factor_);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordWeight_init" "', argument " "1"" of type '" "Xapian::CoordWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::CoordWeight * >(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 '" "CoordWeight_init" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->init(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_CoordWeight_name) {
  {
    Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CoordWeight_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordWeight_name" "', argument " "1"" of type '" "Xapian::CoordWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
    {
      try {
        result = ((Xapian::CoordWeight 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_CoordWeight_get_sumpart) {
  {
    Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
    Xapian::termcount arg2 ;
    Xapian::termcount arg3 ;
    Xapian::termcount 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;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: CoordWeight_get_sumpart(self,wdf,doclen,uniqterm);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::CoordWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::CoordWeight * >(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 '" "CoordWeight_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 '" "CoordWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(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 '" "CoordWeight_get_sumpart" "', argument " "4"" of type '" "Xapian::termcount""'");
    } 
    arg4 = static_cast< Xapian::termcount >(val4);
    {
      try {
        result = (double)((Xapian::CoordWeight const *)arg1)->get_sumpart(arg2,arg3,arg4);
      } 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_CoordWeight_get_maxpart) {
  {
    Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CoordWeight_get_maxpart(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::CoordWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::CoordWeight 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_CoordWeight_get_sumextra) {
  {
    Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 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;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: CoordWeight_get_sumextra(self,Xapian::termcount,Xapian::termcount);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::CoordWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::CoordWeight * >(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 '" "CoordWeight_get_sumextra" "', 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 '" "CoordWeight_get_sumextra" "', argument " "3"" of type '" "Xapian::termcount""'");
    } 
    arg3 = static_cast< Xapian::termcount >(val3);
    {
      try {
        result = (double)((Xapian::CoordWeight const *)arg1)->get_sumextra(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_CoordWeight_get_maxextra) {
  {
    Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CoordWeight_get_maxextra(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__CoordWeight, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::CoordWeight const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
    {
      try {
        result = (double)((Xapian::CoordWeight 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_CoordWeight) {
  {
    Xapian::CoordWeight *arg1 = (Xapian::CoordWeight *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_CoordWeight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__CoordWeight, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordWeight" "', argument " "1"" of type '" "Xapian::CoordWeight *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::CoordWeight * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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(SWIG_STD_MOVE(arg2));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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 = (std::string *) (std::string *)0 ;
    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,SWIG_STD_MOVE(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();
  }
}


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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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_set_maxweight) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 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: PostingSource_set_maxweight(self,max_weight);");
    }
    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_set_maxweight" "', 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_set_maxweight" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->set_maxweight(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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;
    double 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);
    result = (double)((Xapian::PostingSource const *)arg1)->get_maxweight();
    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;
    double 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 = (double)((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 ;
    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: 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 '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_skip_to) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_PostingSource_check) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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_PostingSource_release) {
  {
    Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::PostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: PostingSource_release(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_release" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
    {
      try {
        result = (Xapian::PostingSource *)((Xapian::PostingSource const *)arg1)->release();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingSource, 0 | SWIG_SHADOW); 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 ;
    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: 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 '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_skip_to) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_check) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(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 = 0 ;
    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) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_get_database) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::Database result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_get_database(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_database" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = ((Xapian::ValuePostingSource const *)arg1)->get_database();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Database(result)), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_get_slot) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::valueno result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_get_slot(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_slot" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = (Xapian::valueno)((Xapian::ValuePostingSource const *)arg1)->get_slot();
      } 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_value) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_get_value(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_value" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = ((Xapian::ValuePostingSource const *)arg1)->get_value();
      } 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_ValuePostingSource_done) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ValuePostingSource_done(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_done" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        (arg1)->done();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_get_started) {
  {
    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_get_started(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_started" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
    {
      try {
        result = (bool)((Xapian::ValuePostingSource const *)arg1)->get_started();
      } 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_set_termfreq_min) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::doccount 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: ValuePostingSource_set_termfreq_min(self,termfreq_min_);");
    }
    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_set_termfreq_min" "', 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_set_termfreq_min" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    {
      try {
        (arg1)->set_termfreq_min(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_set_termfreq_est) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::doccount 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: ValuePostingSource_set_termfreq_est(self,termfreq_est_);");
    }
    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_set_termfreq_est" "', 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_set_termfreq_est" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    {
      try {
        (arg1)->set_termfreq_est(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ValuePostingSource_set_termfreq_max) {
  {
    Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
    Xapian::doccount 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: ValuePostingSource_set_termfreq_max(self,termfreq_max_);");
    }
    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_set_termfreq_max" "', 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_set_termfreq_max" "', argument " "2"" of type '" "Xapian::doccount""'");
    } 
    arg2 = static_cast< Xapian::doccount >(val2);
    {
      try {
        (arg1)->set_termfreq_max(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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;
    double 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 = (double)((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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DecreasingValueWeightPostingSource__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_DecreasingValueWeightPostingSource__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); 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;
    double 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 = (double)((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 = 0 ;
    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) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_increment_weight) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 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: 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 '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_skip_to) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_DecreasingValueWeightPostingSource_check) {
  {
    Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    
    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;
    double 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 = (double)((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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FixedWeightPostingSource) {
  {
    double 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 '" "double""'");
    } 
    arg1 = static_cast< double >(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;
    double 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 = (double)((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 ;
    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: 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 '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_skip_to) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FixedWeightPostingSource_check) {
  {
    Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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 '" "double""'");
    } 
    arg3 = static_cast< double >(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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_MatchSpy) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_MatchSpy(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__MatchSpy, 0) != SWIG_OK) {
        arg1 = new perlMatchSpy(sv);
      }
    }
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_MatchSpy___call__) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    Xapian::Document *arg2 = 0 ;
    double arg3 ;
    void *argp2 = 0 ;
    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);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__MatchSpy, 0) != SWIG_OK) {
        arg1 = new perlMatchSpy(sv);
      }
    }
    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 '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_MatchSpy_name) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MatchSpy_name(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__MatchSpy, 0) != SWIG_OK) {
        arg1 = new perlMatchSpy(sv);
      }
    }
    {
      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 ;
    int res2 = SWIG_OLDOBJ ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: MatchSpy_merge_results(self,serialised);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__MatchSpy, 0) != SWIG_OK) {
        arg1 = new perlMatchSpy(sv);
      }
    }
    {
      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) = &PL_sv_undef;
    
    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 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MatchSpy_get_description(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__MatchSpy, 0) != SWIG_OK) {
        arg1 = new perlMatchSpy(sv);
      }
    }
    {
      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_MatchSpy_release) {
  {
    Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
    int argvi = 0;
    Xapian::MatchSpy *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: MatchSpy_release(self);");
    }
    {
      SV* sv = ST(0);
      if (SWIG_ConvertPtr(sv, (void**)&arg1,
          SWIGTYPE_p_Xapian__MatchSpy, 0) != SWIG_OK) {
        arg1 = new perlMatchSpy(sv);
      }
    }
    {
      try {
        result = (Xapian::MatchSpy *)((Xapian::MatchSpy const *)arg1)->release();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MatchSpy, 0 | SWIG_SHADOW); 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_ValueCountMatchSpy__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); 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);
    result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total();
    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(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);
    result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end();
    ST(argvi) = SWIG_NewPointerObj((new 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(SWIG_STD_MOVE(arg2));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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);
    result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(SWIG_STD_MOVE(arg2));
    ST(argvi) = SWIG_NewPointerObj((new 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 ;
    double arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    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 '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    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,serialised);");
    }
    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) = &PL_sv_undef;
    
    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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_miles_to_metres) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: miles_to_metres(miles);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "miles_to_metres" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (double)Xapian::miles_to_metres(arg1);
      } 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_metres_to_miles) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: metres_to_miles(metres);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "metres_to_miles" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (double)Xapian::metres_to_miles(arg1);
      } 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_LatLongCoord_latitude_set) {
  {
    Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 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: LatLongCoord_latitude_set(self,latitude);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoord_latitude_set" "', argument " "1"" of type '" "Xapian::LatLongCoord *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoord * >(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 '" "LatLongCoord_latitude_set" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    if (arg1) (arg1)->latitude = arg2;
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongCoord_latitude_get) {
  {
    Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoord_latitude_get(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoord_latitude_get" "', argument " "1"" of type '" "Xapian::LatLongCoord *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
    result = (double) ((arg1)->latitude);
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongCoord_longitude_set) {
  {
    Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 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: LatLongCoord_longitude_set(self,longitude);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoord_longitude_set" "', argument " "1"" of type '" "Xapian::LatLongCoord *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoord * >(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 '" "LatLongCoord_longitude_set" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    if (arg1) (arg1)->longitude = arg2;
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongCoord_longitude_get) {
  {
    Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoord_longitude_get(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoord_longitude_get" "', argument " "1"" of type '" "Xapian::LatLongCoord *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
    result = (double) ((arg1)->longitude);
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_new_LatLongCoord__SWIG_1) {
  {
    double arg1 ;
    double arg2 ;
    double val1 ;
    int ecode1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::LatLongCoord *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LatLongCoord(latitude_,longitude_);");
    }
    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_LatLongCoord" "', 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_LatLongCoord" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        result = (Xapian::LatLongCoord *)new Xapian::LatLongCoord(arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongCoord, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongCoord) {
  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 == 2) {
      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;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongCoord__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongCoord__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LatLongCoord'");
  XSRETURN(0);
}


XS(_wrap_LatLongCoord_unserialise) {
  {
    Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 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: LatLongCoord_unserialise(self,serialised);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoord_unserialise" "', argument " "1"" of type '" "Xapian::LatLongCoord *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoord * >(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 '" "LatLongCoord_unserialise" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongCoord_unserialise" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->unserialise((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongCoord_serialise) {
  {
    Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoord_serialise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoord_serialise" "', argument " "1"" of type '" "Xapian::LatLongCoord const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
    {
      try {
        result = ((Xapian::LatLongCoord 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_LatLongCoord_get_description) {
  {
    Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoord_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoord, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoord_get_description" "', argument " "1"" of type '" "Xapian::LatLongCoord const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
    {
      try {
        result = ((Xapian::LatLongCoord 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_LatLongCoord) {
  {
    Xapian::LatLongCoord *arg1 = (Xapian::LatLongCoord *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LatLongCoord(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LatLongCoord" "', argument " "1"" of type '" "Xapian::LatLongCoord *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoord * >(argp1);
    {
      try {
        delete arg1;
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_LatLongCoordsIterator___eq__) {
  {
    Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
    Xapian::LatLongCoordsIterator *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: LatLongCoordsIterator___eq__(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoordsIterator___eq__" "', argument " "1"" of type '" "Xapian::LatLongCoordsIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoordsIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongCoordsIterator___eq__" "', argument " "2"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongCoordsIterator___eq__" "', argument " "2"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp2);
    {
      try {
        result = (bool)((Xapian::LatLongCoordsIterator const *)arg1)->operator ==((Xapian::LatLongCoordsIterator 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_LatLongCoordsIterator_equal) {
  {
    Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
    Xapian::LatLongCoordsIterator *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: LatLongCoordsIterator_equal(self,o);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoordsIterator_equal" "', argument " "1"" of type '" "Xapian::LatLongCoordsIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoordsIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongCoordsIterator_equal" "', argument " "2"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongCoordsIterator_equal" "', argument " "2"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_LatLongCoordsIterator_equal((Xapian::LatLongCoordsIterator const *)arg1,(Xapian::LatLongCoordsIterator 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_LatLongCoordsIterator_nequal) {
  {
    Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
    Xapian::LatLongCoordsIterator *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: LatLongCoordsIterator_nequal(self,o);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoordsIterator_nequal" "', argument " "1"" of type '" "Xapian::LatLongCoordsIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoordsIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongCoordsIterator_nequal" "', argument " "2"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongCoordsIterator_nequal" "', argument " "2"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp2);
    {
      try {
        result = (bool)Xapian_LatLongCoordsIterator_nequal((Xapian::LatLongCoordsIterator const *)arg1,(Xapian::LatLongCoordsIterator 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_LatLongCoordsIterator_get_coord) {
  {
    Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::LatLongCoord result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoordsIterator_get_coord(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoordsIterator_get_coord" "', argument " "1"" of type '" "Xapian::LatLongCoordsIterator const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
    {
      try {
        result = Xapian_LatLongCoordsIterator_get_coord((Xapian::LatLongCoordsIterator const *)arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::LatLongCoord(result)), SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


XS(_wrap_delete_LatLongCoordsIterator) {
  {
    Xapian::LatLongCoordsIterator *arg1 = (Xapian::LatLongCoordsIterator *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LatLongCoordsIterator(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoordsIterator, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LatLongCoordsIterator" "', argument " "1"" of type '" "Xapian::LatLongCoordsIterator *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


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


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


XS(_wrap_LatLongCoords_size) {
  {
    Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    size_t result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoords_size(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoords_size" "', argument " "1"" of type '" "Xapian::LatLongCoords const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
    {
      try {
        result = ((Xapian::LatLongCoords const *)arg1)->size();
      } 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_LatLongCoords_empty) {
  {
    Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoords_empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoords_empty" "', argument " "1"" of type '" "Xapian::LatLongCoords const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
    {
      try {
        result = (bool)((Xapian::LatLongCoords 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_LatLongCoords_append) {
  {
    Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
    Xapian::LatLongCoord *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: LatLongCoords_append(self,coord);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoords_append" "', argument " "1"" of type '" "Xapian::LatLongCoords *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongCoords_append" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongCoords_append" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
    {
      try {
        (arg1)->append((Xapian::LatLongCoord const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


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


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


XS(_wrap_new_LatLongCoords) {
  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__LatLongCoord, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongCoords__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongCoords__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LatLongCoords'");
  XSRETURN(0);
}


XS(_wrap_LatLongCoords_unserialise) {
  {
    Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 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: LatLongCoords_unserialise(self,serialised);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoords_unserialise" "', argument " "1"" of type '" "Xapian::LatLongCoords *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoords * >(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 '" "LatLongCoords_unserialise" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongCoords_unserialise" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->unserialise((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongCoords_serialise) {
  {
    Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoords_serialise(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoords_serialise" "', argument " "1"" of type '" "Xapian::LatLongCoords const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
    {
      try {
        result = ((Xapian::LatLongCoords 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_LatLongCoords_get_description) {
  {
    Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongCoords_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoords, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongCoords_get_description" "', argument " "1"" of type '" "Xapian::LatLongCoords const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
    {
      try {
        result = ((Xapian::LatLongCoords 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_LatLongCoords) {
  {
    Xapian::LatLongCoords *arg1 = (Xapian::LatLongCoords *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LatLongCoords(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LatLongCoords" "', argument " "1"" of type '" "Xapian::LatLongCoords *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoords * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap___ne____SWIG_6) {
  {
    Xapian::LatLongCoordsIterator *arg1 = 0 ;
    Xapian::LatLongCoordsIterator *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: __ne__(a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1, SWIGTYPE_p_Xapian__LatLongCoordsIterator,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "1"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoordsIterator,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "__ne__" "', argument " "2"" of type '" "Xapian::LatLongCoordsIterator const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoordsIterator * >(argp2);
    {
      try {
        result = (bool)Xapian::operator !=((Xapian::LatLongCoordsIterator const &)*arg1,(Xapian::LatLongCoordsIterator 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__) {
  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__PositionIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_NO_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 == 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__ValueIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_NO_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 == 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__MSetIterator, SWIG_POINTER_NO_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_Xapian__MSetIterator, SWIG_POINTER_NO_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 == 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__ESetIterator, SWIG_POINTER_NO_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_Xapian__ESetIterator, SWIG_POINTER_NO_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 == 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__LatLongCoordsIterator, SWIG_POINTER_NO_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(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoordsIterator, SWIG_POINTER_NO_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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ne____SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ne____SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ne____SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ne____SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ne____SWIG_4); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ne____SWIG_5); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap___ne____SWIG_6); return;
    }
  }
  
  croak("No matching function for overloaded '__ne__'");
  XSRETURN(0);
}


XS(_wrap_delete_LatLongMetric) {
  {
    Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LatLongMetric(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LatLongMetric" "', argument " "1"" of type '" "Xapian::LatLongMetric *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongMetric_pointwise_distance) {
  {
    Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
    Xapian::LatLongCoord *arg2 = 0 ;
    Xapian::LatLongCoord *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LatLongMetric_pointwise_distance(self,a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongMetric_pointwise_distance" "', argument " "1"" of type '" "Xapian::LatLongMetric const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongMetric_pointwise_distance" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongMetric_pointwise_distance" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LatLongMetric_pointwise_distance" "', argument " "3"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongMetric_pointwise_distance" "', argument " "3"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongCoord * >(argp3);
    {
      try {
        result = (double)((Xapian::LatLongMetric const *)arg1)->pointwise_distance((Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongCoord const &)*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_LatLongMetric___call____SWIG_0) {
  {
    Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    Xapian::LatLongCoords *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LatLongMetric___call__(self,a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongMetric___call__" "', argument " "1"" of type '" "Xapian::LatLongMetric const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongMetric___call__" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongMetric___call__" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LatLongMetric___call__" "', argument " "3"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongMetric___call__" "', argument " "3"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongCoords * >(argp3);
    {
      try {
        result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongCoords const &)*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_LatLongMetric___call____SWIG_1) {
  {
    Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    std::string *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int res3 = SWIG_OLDOBJ ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: LatLongMetric___call__(self,a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongMetric___call__" "', argument " "1"" of type '" "Xapian::LatLongMetric const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongMetric___call__" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongMetric___call__" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    {
      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 '" "LatLongMetric___call__" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongMetric___call__" "', argument " "3"" of type '" "std::string const &""'"); 
      }
      arg3 = ptr;
    }
    {
      try {
        result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(std::string const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    XSRETURN(argvi);
  fail:
    
    
    if (SWIG_IsNewObj(res3)) delete arg3;
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongMetric___call____SWIG_2) {
  {
    Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    char *arg3 = (char *) 0 ;
    size_t arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    size_t val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: LatLongMetric___call__(self,a,b_ptr,b_len);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongMetric___call__" "', argument " "1"" of type '" "Xapian::LatLongMetric const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongMetric___call__" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongMetric___call__" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LatLongMetric___call__" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    ecode4 = SWIG_AsVal_size_t SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "LatLongMetric___call__" "', argument " "4"" of type '" "size_t""'");
    } 
    arg4 = static_cast< size_t >(val4);
    {
      try {
        result = (double)((Xapian::LatLongMetric const *)arg1)->operator ()((Xapian::LatLongCoords const &)*arg2,(char const *)arg3,SWIG_STD_MOVE(arg4));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    
    XSRETURN(argvi);
  fail:
    
    
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongMetric___call__) {
  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__LatLongMetric, 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__LatLongCoords, SWIG_POINTER_NO_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__LatLongCoords, SWIG_POINTER_NO_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__LatLongMetric, 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__LatLongCoords, SWIG_POINTER_NO_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(2), (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 == 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__LatLongMetric, 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__LatLongCoords, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _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_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_size_t 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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LatLongMetric___call____SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LatLongMetric___call____SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_LatLongMetric___call____SWIG_2); return;
    }
  }
  
  croak("No matching function for overloaded 'LatLongMetric___call__'");
  XSRETURN(0);
}


XS(_wrap_LatLongMetric_name) {
  {
    Xapian::LatLongMetric *arg1 = (Xapian::LatLongMetric *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongMetric_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongMetric, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongMetric_name" "', argument " "1"" of type '" "Xapian::LatLongMetric const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongMetric * >(argp1);
    {
      try {
        result = ((Xapian::LatLongMetric 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_new_GreatCircleMetric__SWIG_0) {
  {
    int argvi = 0;
    Xapian::GreatCircleMetric *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_GreatCircleMetric();");
    }
    {
      try {
        result = (Xapian::GreatCircleMetric *)new Xapian::GreatCircleMetric();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__GreatCircleMetric, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_GreatCircleMetric__SWIG_1) {
  {
    double arg1 ;
    double val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::GreatCircleMetric *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_GreatCircleMetric(radius_);");
    }
    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_GreatCircleMetric" "', argument " "1"" of type '" "double""'");
    } 
    arg1 = static_cast< double >(val1);
    {
      try {
        result = (Xapian::GreatCircleMetric *)new Xapian::GreatCircleMetric(arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__GreatCircleMetric, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GreatCircleMetric) {
  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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GreatCircleMetric__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_GreatCircleMetric__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_GreatCircleMetric'");
  XSRETURN(0);
}


XS(_wrap_GreatCircleMetric_pointwise_distance) {
  {
    Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
    Xapian::LatLongCoord *arg2 = 0 ;
    Xapian::LatLongCoord *arg3 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: GreatCircleMetric_pointwise_distance(self,a,b);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__GreatCircleMetric, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GreatCircleMetric_pointwise_distance" "', argument " "1"" of type '" "Xapian::GreatCircleMetric const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::GreatCircleMetric * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GreatCircleMetric_pointwise_distance" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GreatCircleMetric_pointwise_distance" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "GreatCircleMetric_pointwise_distance" "', argument " "3"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "GreatCircleMetric_pointwise_distance" "', argument " "3"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongCoord * >(argp3);
    {
      try {
        result = (double)((Xapian::GreatCircleMetric const *)arg1)->pointwise_distance((Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongCoord const &)*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_GreatCircleMetric_name) {
  {
    Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GreatCircleMetric_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__GreatCircleMetric, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GreatCircleMetric_name" "', argument " "1"" of type '" "Xapian::GreatCircleMetric const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::GreatCircleMetric * >(argp1);
    {
      try {
        result = ((Xapian::GreatCircleMetric 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_delete_GreatCircleMetric) {
  {
    Xapian::GreatCircleMetric *arg1 = (Xapian::GreatCircleMetric *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GreatCircleMetric(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__GreatCircleMetric, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GreatCircleMetric" "', argument " "1"" of type '" "Xapian::GreatCircleMetric *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::GreatCircleMetric * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource__SWIG_0) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    Xapian::LatLongMetric *arg3 = 0 ;
    double arg4 ;
    double arg5 ;
    double arg6 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    double val6 ;
    int ecode6 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistancePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: new_LatLongDistancePostingSource(slot_,centre_,metric_,max_range_,k1_,k2_);");
    }
    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_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LatLongDistancePostingSource" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
    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_LatLongDistancePostingSource" "', 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_LatLongDistancePostingSource" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
    ecode6 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_LatLongDistancePostingSource" "', argument " "6"" of type '" "double""'");
    } 
    arg6 = static_cast< double >(val6);
    {
      try {
        result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4,arg5,arg6);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    Xapian::LatLongMetric *arg3 = 0 ;
    double arg4 ;
    double arg5 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistancePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_LatLongDistancePostingSource(slot_,centre_,metric_,max_range_,k1_);");
    }
    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_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LatLongDistancePostingSource" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
    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_LatLongDistancePostingSource" "', 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_LatLongDistancePostingSource" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
    {
      try {
        result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4,arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    Xapian::LatLongMetric *arg3 = 0 ;
    double arg4 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistancePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LatLongDistancePostingSource(slot_,centre_,metric_,max_range_);");
    }
    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_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LatLongDistancePostingSource" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
    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_LatLongDistancePostingSource" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
    {
      try {
        result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource__SWIG_3) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    Xapian::LatLongMetric *arg3 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistancePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LatLongDistancePostingSource(slot_,centre_,metric_);");
    }
    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_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LatLongDistancePostingSource" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
    {
      try {
        result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource__SWIG_4) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistancePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: new_LatLongDistancePostingSource(slot_,centre_,max_range_,k1_,k2_);");
    }
    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_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(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_LatLongDistancePostingSource" "', 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_LatLongDistancePostingSource" "', 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_LatLongDistancePostingSource" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
    {
      try {
        result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3,arg4,arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource__SWIG_5) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    double arg3 ;
    double arg4 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistancePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LatLongDistancePostingSource(slot_,centre_,max_range_,k1_);");
    }
    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_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(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_LatLongDistancePostingSource" "', 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_LatLongDistancePostingSource" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
    {
      try {
        result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource__SWIG_6) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    double arg3 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistancePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LatLongDistancePostingSource(slot_,centre_,max_range_);");
    }
    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_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(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_LatLongDistancePostingSource" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource__SWIG_7) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistancePostingSource *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LatLongDistancePostingSource(slot_,centre_);");
    }
    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_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistancePostingSource" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    {
      try {
        result = (Xapian::LatLongDistancePostingSource *)new Xapian::LatLongDistancePostingSource(arg1,(Xapian::LatLongCoords const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistancePostingSource) {
  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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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;
      {
        {
          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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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__LatLongMetric, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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(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 == 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_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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(2), &vptr, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _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_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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _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_5;
      _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_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 == 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_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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(2), &vptr, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _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_6;
      _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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _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_7;
      _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_7;
      _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_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 == 6) {
      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_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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(2), &vptr, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _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_8;
      _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_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistancePostingSource__SWIG_7); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistancePostingSource__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistancePostingSource__SWIG_6); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistancePostingSource__SWIG_2); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistancePostingSource__SWIG_5); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistancePostingSource__SWIG_1); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistancePostingSource__SWIG_4); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistancePostingSource__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LatLongDistancePostingSource'");
  XSRETURN(0);
}


XS(_wrap_delete_LatLongDistancePostingSource) {
  {
    Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LatLongDistancePostingSource(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LatLongDistancePostingSource" "', argument " "1"" of type '" "Xapian::LatLongDistancePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongDistancePostingSource_increment_weight) {
  {
    Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 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: LatLongDistancePostingSource_increment_weight(self,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongDistancePostingSource_increment_weight" "', argument " "1"" of type '" "Xapian::LatLongDistancePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(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 '" "LatLongDistancePostingSource_increment_weight" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    {
      try {
        (arg1)->next(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongDistancePostingSource_skip_to) {
  {
    Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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: LatLongDistancePostingSource_skip_to(self,min_docid,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongDistancePostingSource_skip_to" "', argument " "1"" of type '" "Xapian::LatLongDistancePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(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 '" "LatLongDistancePostingSource_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 '" "LatLongDistancePostingSource_skip_to" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      try {
        (arg1)->skip_to(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongDistancePostingSource_check) {
  {
    Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
    Xapian::docid arg2 ;
    double 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: LatLongDistancePostingSource_check(self,min_docid,min_wt);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongDistancePostingSource_check" "', argument " "1"" of type '" "Xapian::LatLongDistancePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(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 '" "LatLongDistancePostingSource_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 '" "LatLongDistancePostingSource_check" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(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_LatLongDistancePostingSource_get_weight) {
  {
    Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongDistancePostingSource_get_weight(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongDistancePostingSource_get_weight" "', argument " "1"" of type '" "Xapian::LatLongDistancePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
    {
      try {
        result = (double)((Xapian::LatLongDistancePostingSource 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_LatLongDistancePostingSource_name) {
  {
    Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongDistancePostingSource_name(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongDistancePostingSource_name" "', argument " "1"" of type '" "Xapian::LatLongDistancePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
    {
      try {
        result = ((Xapian::LatLongDistancePostingSource 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_LatLongDistancePostingSource_init) {
  {
    Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
    Xapian::Database *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: LatLongDistancePostingSource_init(self,db_);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongDistancePostingSource_init" "', argument " "1"" of type '" "Xapian::LatLongDistancePostingSource *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Database,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongDistancePostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongDistancePostingSource_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) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongDistancePostingSource_get_description) {
  {
    Xapian::LatLongDistancePostingSource *arg1 = (Xapian::LatLongDistancePostingSource *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: LatLongDistancePostingSource_get_description(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistancePostingSource, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongDistancePostingSource_get_description" "', argument " "1"" of type '" "Xapian::LatLongDistancePostingSource const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistancePostingSource * >(argp1);
    {
      try {
        result = ((Xapian::LatLongDistancePostingSource 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_LatLongDistanceKeyMaker__SWIG_0) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    Xapian::LatLongMetric *arg3 = 0 ;
    double arg4 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistanceKeyMaker *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LatLongDistanceKeyMaker(slot_,centre_,metric_,defdistance);");
    }
    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_LatLongDistanceKeyMaker" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
    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_LatLongDistanceKeyMaker" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
    {
      try {
        result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistanceKeyMaker__SWIG_1) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    Xapian::LatLongMetric *arg3 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistanceKeyMaker *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LatLongDistanceKeyMaker(slot_,centre_,metric_);");
    }
    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_LatLongDistanceKeyMaker" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
    {
      try {
        result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistanceKeyMaker__SWIG_2) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoords *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistanceKeyMaker *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LatLongDistanceKeyMaker(slot_,centre_);");
    }
    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_LatLongDistanceKeyMaker" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoords,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoords const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoords * >(argp2);
    {
      try {
        result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoords const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistanceKeyMaker__SWIG_3) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoord *arg2 = 0 ;
    Xapian::LatLongMetric *arg3 = 0 ;
    double arg4 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistanceKeyMaker *result = 0 ;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: new_LatLongDistanceKeyMaker(slot_,centre_,metric_,defdistance);");
    }
    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_LatLongDistanceKeyMaker" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
    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_LatLongDistanceKeyMaker" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
    {
      try {
        result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongMetric const &)*arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistanceKeyMaker__SWIG_4) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoord *arg2 = 0 ;
    Xapian::LatLongMetric *arg3 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistanceKeyMaker *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_LatLongDistanceKeyMaker(slot_,centre_,metric_);");
    }
    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_LatLongDistanceKeyMaker" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
    res3 = SWIG_ConvertPtr(ST(2), &argp3, SWIGTYPE_p_Xapian__LatLongMetric,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "3"" of type '" "Xapian::LatLongMetric const &""'"); 
    }
    arg3 = reinterpret_cast< Xapian::LatLongMetric * >(argp3);
    {
      try {
        result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2,(Xapian::LatLongMetric const &)*arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistanceKeyMaker__SWIG_5) {
  {
    Xapian::valueno arg1 ;
    Xapian::LatLongCoord *arg2 = 0 ;
    unsigned int val1 ;
    int ecode1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    Xapian::LatLongDistanceKeyMaker *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_LatLongDistanceKeyMaker(slot_,centre_);");
    }
    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_LatLongDistanceKeyMaker" "', argument " "1"" of type '" "Xapian::valueno""'");
    } 
    arg1 = static_cast< Xapian::valueno >(val1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__LatLongCoord,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_LatLongDistanceKeyMaker" "', argument " "2"" of type '" "Xapian::LatLongCoord const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::LatLongCoord * >(argp2);
    {
      try {
        result = (Xapian::LatLongDistanceKeyMaker *)new Xapian::LatLongDistanceKeyMaker(arg1,(Xapian::LatLongCoord const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_LatLongDistanceKeyMaker) {
  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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_NO_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_NO_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__LatLongMetric, SWIG_POINTER_NO_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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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(2), &vptr, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoords, SWIG_POINTER_NO_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(2), &vptr, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_Xapian__LatLongCoord, SWIG_POINTER_NO_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(2), &vptr, SWIGTYPE_p_Xapian__LatLongMetric, SWIG_POINTER_NO_NULL);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _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_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistanceKeyMaker__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistanceKeyMaker__SWIG_5); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistanceKeyMaker__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistanceKeyMaker__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistanceKeyMaker__SWIG_0); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_LatLongDistanceKeyMaker__SWIG_3); return;
    }
  }
  
  croak("No matching function for overloaded 'new_LatLongDistanceKeyMaker'");
  XSRETURN(0);
}


XS(_wrap_delete_LatLongDistanceKeyMaker) {
  {
    Xapian::LatLongDistanceKeyMaker *arg1 = (Xapian::LatLongDistanceKeyMaker *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_LatLongDistanceKeyMaker(self);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LatLongDistanceKeyMaker" "', argument " "1"" of type '" "Xapian::LatLongDistanceKeyMaker *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistanceKeyMaker * >(argp1);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_LatLongDistanceKeyMaker___call__) {
  {
    Xapian::LatLongDistanceKeyMaker *arg1 = (Xapian::LatLongDistanceKeyMaker *) 0 ;
    Xapian::Document *arg2 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    std::string result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: LatLongDistanceKeyMaker___call__(self,doc);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LatLongDistanceKeyMaker___call__" "', argument " "1"" of type '" "Xapian::LatLongDistanceKeyMaker const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::LatLongDistanceKeyMaker * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__Document,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LatLongDistanceKeyMaker___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LatLongDistanceKeyMaker___call__" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::Document * >(argp2);
    {
      try {
        result = ((Xapian::LatLongDistanceKeyMaker 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_Database_add_database) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::Database *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: 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) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_size) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    size_t result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_size(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_size" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = ((Xapian::Database const *)arg1)->size();
      } 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_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 arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::Database *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Database(path,flags);");
    }
    {
      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;
    }
    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_Database" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1,arg2);
      } 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_new_Database__SWIG_2) {
  {
    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_new_Database__SWIG_3) {
  {
    int arg1 ;
    int arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    Xapian::Database *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: new_Database(fd,flags);");
    }
    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_Database" "', argument " "1"" of type '" "int""'");
    } 
    arg1 = static_cast< int >(val1);
    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_Database" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = (Xapian::Database *)new Xapian::Database(arg1,arg2);
      } 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_4) {
  {
    int arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    Xapian::Database *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Database(fd);");
    }
    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_Database" "', argument " "1"" of type '" "int""'");
    } 
    arg1 = static_cast< int >(val1);
    {
      try {
        result = (Xapian::Database *)new Xapian::Database(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;
      {
        {
          int res = SWIG_AsVal_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:
    
    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:
    
    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_4;
      _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_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_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_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;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Database__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Database__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Database__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Database__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_Database__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_Database'");
  XSRETURN(0);
}


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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_reopen) {
  {
    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_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 {
        result = (bool)(arg1)->reopen();
      } 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_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) = &PL_sv_undef;
    
    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(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,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_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;
    }
    result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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(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,Xapian::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_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);
    result = ((Xapian::Database const *)arg1)->termlist_end(arg2);
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(result)), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); 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_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(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,Xapian::docid,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_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;
    }
    result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3);
    ST(argvi) = SWIG_NewPointerObj((new 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 ;
    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(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__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_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(result)), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_allterms_begin__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_allterms_begin__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_allterms_begin'");
  XSRETURN(0);
}


XS(_wrap_Database_allterms_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_allterms_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_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;
    }
    result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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__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_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);
    result = ((Xapian::Database const *)arg1)->allterms_end();
    ST(argvi) = SWIG_NewPointerObj((new Xapian::TermIterator(result)), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_allterms_end__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_allterms_end__SWIG_0); 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_average_length) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_average_length(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_average_length" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (double)((Xapian::Database const *)arg1)->get_average_length();
      } 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_total_length) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::totallength result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_total_length(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_total_length" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::totallength)((Xapian::Database const *)arg1)->get_total_length();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_long  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long >(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,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_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,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_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,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_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(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);
    result = ((Xapian::Database const *)arg1)->valuestream_end(arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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,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_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_get_unique_terms) {
  {
    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_unique_terms(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_unique_terms" "', 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_unique_terms" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_unique_terms(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) = &PL_sv_undef;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_document__SWIG_0) {
  {
    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 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_document" "', argument " "2"" of type '" "Xapian::docid""'");
    } 
    arg2 = static_cast< Xapian::docid >(val2);
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_document(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Document(result)), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_document__SWIG_1) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    Xapian::docid arg2 ;
    unsigned int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::Document result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Database_get_document(self,did,flags);");
    }
    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 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_document" "', 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 '" "Database_get_document" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        result = ((Xapian::Database const *)arg1)->get_document(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new Xapian::Document(result)), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_get_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__Database, 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__Database, 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_get_document__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_get_document__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_get_document'");
  XSRETURN(0);
}


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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_get_spelling_suggestion__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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(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);
    result = ((Xapian::Database const *)arg1)->spellings_end();
    ST(argvi) = SWIG_NewPointerObj((new 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(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;
    }
    result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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(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(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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_synonym_keys_begin__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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,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_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;
    }
    result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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);
    result = ((Xapian::Database const *)arg1)->synonym_keys_end();
    ST(argvi) = SWIG_NewPointerObj((new 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_synonym_keys_end__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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(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(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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_metadata_keys_begin__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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,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_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;
    }
    result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2);
    ST(argvi) = SWIG_NewPointerObj((new 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);
    result = ((Xapian::Database const *)arg1)->metadata_keys_end();
    ST(argvi) = SWIG_NewPointerObj((new 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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_metadata_keys_end__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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_locked) {
  {
    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_locked(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_locked" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (bool)((Xapian::Database const *)arg1)->locked();
      } 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_Database_get_revision) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    Xapian::rev result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_get_revision(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_revision" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(argp1);
    {
      try {
        result = (Xapian::rev)((Xapian::Database const *)arg1)->get_revision();
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_unsigned_SS_long  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned long >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_check__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    int arg2 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    size_t result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_check(path,opts);");
    }
    {
      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 '" "Database_check" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_check" "', 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 '" "Database_check" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = Xapian::Database::check((std::string const &)*arg1,arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_check__SWIG_1) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    size_t result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_check(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 '" "Database_check" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_check" "', argument " "1"" of type '" "std::string const &""'"); 
      }
      arg1 = ptr;
    }
    {
      try {
        result = Xapian::Database::check((std::string const &)*arg1);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_From_size_t  SWIG_PERL_CALL_ARGS_1(static_cast< size_t >(result)); argvi++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_check__SWIG_2) {
  {
    int arg1 ;
    int arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    size_t result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Database_check(fd,opts);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Database_check" "', argument " "1"" of type '" "int""'");
    } 
    arg1 = static_cast< int >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_check" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        result = Xapian::Database::check(arg1,arg2);
      } 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_Database_check__SWIG_3) {
  {
    int arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    size_t result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Database_check(fd);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "Database_check" "', argument " "1"" of type '" "int""'");
    } 
    arg1 = static_cast< int >(val1);
    {
      try {
        result = Xapian::Database::check(arg1);
      } 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_Database_check) {
  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_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 == 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:
    
    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_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:
    
    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_4;
      _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_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_check__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_check__SWIG_1); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_check__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_check__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_check'");
  XSRETURN(0);
}


XS(_wrap_Database_compact__SWIG_0) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    int arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Database_compact(self,output,flags,block_size);");
    }
    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_compact" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    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_compact" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_compact" "', 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_compact" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Database_compact" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    {
      try {
        (arg1)->compact((std::string const &)*arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_compact__SWIG_1) {
  {
    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;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Database_compact(self,output,flags);");
    }
    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_compact" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    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_compact" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_compact" "', 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_compact" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        (arg1)->compact((std::string const &)*arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_compact__SWIG_2) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 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: Database_compact(self,output);");
    }
    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_compact" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    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_compact" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_compact" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      arg2 = ptr;
    }
    {
      try {
        (arg1)->compact((std::string const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    SWIG_croak_null();
  }
}


XS(_wrap_Database_compact__SWIG_3) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    int arg2 ;
    unsigned int arg3 ;
    int arg4 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Database_compact(self,fd,flags,block_size);");
    }
    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_compact" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(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 '" "Database_compact" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< 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 '" "Database_compact" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Database_compact" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    {
      try {
        (arg1)->compact(arg2,arg3,arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_compact__SWIG_4) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    int arg2 ;
    unsigned int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Database_compact(self,fd,flags);");
    }
    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_compact" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(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 '" "Database_compact" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< 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 '" "Database_compact" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    {
      try {
        (arg1)->compact(arg2,arg3);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_compact__SWIG_5) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 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: Database_compact(self,fd);");
    }
    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_compact" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(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 '" "Database_compact" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      try {
        (arg1)->compact(arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_compact__SWIG_6) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    std::string *arg2 = 0 ;
    unsigned int arg3 ;
    int arg4 ;
    Xapian::Compactor *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 = 0 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Database_compact(self,output,flags,block_size,compactor);");
    }
    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_compact" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    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_compact" "', argument " "2"" of type '" "std::string const &""'"); 
      }
      if (!ptr) {
        SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_compact" "', 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_compact" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Database_compact" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Xapian__Compactor,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Database_compact" "', argument " "5"" of type '" "Xapian::Compactor &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_compact" "', argument " "5"" of type '" "Xapian::Compactor &""'"); 
    }
    arg5 = reinterpret_cast< Xapian::Compactor * >(argp5);
    {
      try {
        (arg1)->compact((std::string const &)*arg2,arg3,arg4,*arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_compact__SWIG_7) {
  {
    Xapian::Database *arg1 = (Xapian::Database *) 0 ;
    int arg2 ;
    unsigned int arg3 ;
    int arg4 ;
    Xapian::Compactor *arg5 = 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    void *argp5 = 0 ;
    int res5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Database_compact(self,fd,flags,block_size,compactor);");
    }
    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_compact" "', argument " "1"" of type '" "Xapian::Database *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::Database * >(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 '" "Database_compact" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< 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 '" "Database_compact" "', argument " "3"" of type '" "unsigned int""'");
    } 
    arg3 = static_cast< unsigned int >(val3);
    ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Database_compact" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    res5 = SWIG_ConvertPtr(ST(4), &argp5, SWIGTYPE_p_Xapian__Compactor,  0 );
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Database_compact" "', argument " "5"" of type '" "Xapian::Compactor &""'"); 
    }
    if (!argp5) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_compact" "', argument " "5"" of type '" "Xapian::Compactor &""'"); 
    }
    arg5 = reinterpret_cast< Xapian::Compactor * >(argp5);
    {
      try {
        (arg1)->compact(arg2,arg3,arg4,*arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Database_compact) {
  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_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 == 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:
    
    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_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_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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _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_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_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:
    
    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__Database, 0);
        _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_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_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;
      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;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_Xapian__Database, 0);
        _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(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_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__Compactor, SWIG_POINTER_NO_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 == 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__Database, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _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_8;
      _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_8;
      _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_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(4), &vptr, SWIGTYPE_p_Xapian__Compactor, SWIG_POINTER_NO_NULL);
        _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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_compact__SWIG_5); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_compact__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_compact__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_compact__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_compact__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_compact__SWIG_0); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_compact__SWIG_7); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Database_compact__SWIG_6); return;
    }
  }
  
  croak("No matching function for overloaded 'Database_compact'");
  XSRETURN(0);
}


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);
    delete arg1;
    ST(argvi) = &PL_sv_undef;
    
    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 arg3 ;
    int res1 = SWIG_OLDOBJ ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase *result = 0 ;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: new_WritableDatabase(path,flags,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 '" "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);
    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_WritableDatabase" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
    {
      try {
        result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2,arg3);
      } 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) {
  {
    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,flags);");
    }
    {
      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_3) {
  {
    std::string *arg1 = 0 ;
    int res1 = SWIG_OLDOBJ ;
    int argvi = 0;
    Xapian::WritableDatabase *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_WritableDatabase(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_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;
    }
    {
      try {
        result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string 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++ ;
    if (SWIG_IsNewObj(res1)) delete arg1;
    XSRETURN(argvi);
  fail:
    if (SWIG_IsNewObj(res1)) delete arg1;
    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;
      {
        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:
    
    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:
    
    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_AsVal_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_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:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WritableDatabase__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WritableDatabase__SWIG_3); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WritableDatabase__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_new_WritableDatabase__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'new_WritableDatabase'");
  XSRETURN(0);
}


XS(_wrap_WritableDatabase_add_database) {
  {
    Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
    Xapian::WritableDatabase *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: WritableDatabase_add_database(self,other);");
    }
    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_database" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
    }
    arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
    res2 = SWIG_ConvertPtr(ST(1), &argp2, SWIGTYPE_p_Xapian__WritableDatabase,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_add_database" "', argument " "2"" of type '" "Xapian::WritableDatabase const &""'"); 
    }
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_database" "', argument " "2"" of type '" "Xapian::WritableDatabase const &""'"); 
    }
    arg2 = reinterpret_cast< Xapian::WritableDatabase * >(argp2);
    {
      try {
        (arg1)->add_database((Xapian::WritableDatabase const &)*arg2);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = &PL_sv_undef;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_WritableDatabase_begin_transaction__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    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) = &PL_sv_undef;
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    XSRETURN(argvi);
  fail:
    
    if (SWIG_IsNewObj(res2)) delete arg2;
    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 = 0 ;
    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) = &PL_sv_undef;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    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 = 0 ;
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_WritableDatabase_add_spelling__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_WritableDatabase_remove_spelling__SWIG_1); return;
    case 2:
      PUSHMARK(MARK); 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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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) = &PL_sv_undef;
    
    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,metadata);");
    }
    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) = &PL_sv_undef;
    
    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_remote_open__SWIG_0) {
  {
    std::string *arg1 = 0 ;
    unsigned int arg2 ;
    useconds_t arg3 ;
    useconds_t 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 '" "useconds_t""'");
    } 
    arg3 = static_cast< useconds_t >(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 '" "useconds_t""'");
    } 
    arg4 = static_cast< useconds_t >(val4);
    {
      try {
        result = Xapian::Remote::open((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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 ;
    useconds_t 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 '" "useconds_t""'");
    } 
    arg3 = static_cast< useconds_t >(val3);
    {
      try {
        result = Xapian::Remote::open((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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(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 ;
    useconds_t arg3 ;
    useconds_t arg4 ;
    int arg5 ;
    int res1 = SWIG_OLDOBJ ;
    unsigned int val2 ;
    int ecode2 = 0 ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    unsigned int val4 ;
    int ecode4 = 0 ;
    int val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: remote_open_writable(host,port,timeout,connect_timeout,flags);");
    }
    {
      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 '" "useconds_t""'");
    } 
    arg3 = static_cast< useconds_t >(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 '" "useconds_t""'");
    } 
    arg4 = static_cast< useconds_t >(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 '" "remote_open_writable" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4),arg5);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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 ;
    useconds_t arg3 ;
    useconds_t 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 '" "useconds_t""'");
    } 
    arg3 = static_cast< useconds_t >(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 '" "useconds_t""'");
    } 
    arg4 = static_cast< useconds_t >(val4);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3),SWIG_STD_MOVE(arg4));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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 ;
    useconds_t 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 '" "useconds_t""'");
    } 
    arg3 = static_cast< useconds_t >(val3);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,SWIG_STD_MOVE(arg3));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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_3) {
  {
    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(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 ;
    useconds_t 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 '" "useconds_t""'");
    } 
    arg3 = static_cast< useconds_t >(val3);
    {
      try {
        result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,SWIG_STD_MOVE(arg3));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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(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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open__SWIG_2); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open__SWIG_4); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open__SWIG_1); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open__SWIG_3); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'remote_open'");
  XSRETURN(0);
}


XS(_wrap_remote_open_writable__SWIG_4) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    useconds_t arg3 ;
    int arg4 ;
    int res1 = SWIG_OLDOBJ ;
    int res2 = SWIG_OLDOBJ ;
    unsigned int val3 ;
    int ecode3 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    Xapian::WritableDatabase result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: remote_open_writable(program,args,timeout,flags);");
    }
    {
      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 '" "useconds_t""'");
    } 
    arg3 = static_cast< useconds_t >(val3);
    ecode4 = SWIG_AsVal_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 '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,SWIG_STD_MOVE(arg3),arg4);
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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_5) {
  {
    std::string *arg1 = 0 ;
    std::string *arg2 = 0 ;
    useconds_t 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 '" "useconds_t""'");
    } 
    arg3 = static_cast< useconds_t >(val3);
    {
      try {
        result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,SWIG_STD_MOVE(arg3));
      } catch (...) {
        Xapian::handle_exception();
        SWIG_fail;
      }
    }
    ST(argvi) = SWIG_NewPointerObj((new 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_6) {
  {
    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(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:
    
    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_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_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_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;
      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_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;
      {
        {
          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;
      {
        {
          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:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open_writable__SWIG_3); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open_writable__SWIG_6); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open_writable__SWIG_2); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open_writable__SWIG_5); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open_writable__SWIG_1); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open_writable__SWIG_4); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_remote_open_writable__SWIG_0); return;
    }
  }
  
  croak("No matching function for overloaded 'remote_open_writable'");
  XSRETURN(0);
}



/* -------- 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__DatabaseClosedErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseClosedError *) 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__DatabaseCreateErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseCreateError *) 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__DatabaseNotFoundErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *) (Xapian::DatabaseOpeningError *) ((Xapian::DatabaseNotFoundError *) 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__DatabaseVersionErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *) (Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__DatabaseNotFoundErrorTo_p_Xapian__DatabaseOpeningError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseOpeningError *)  ((Xapian::DatabaseNotFoundError *) 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__AssertionErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::AssertionError *) x));
}
static void *_p_Xapian__DatabaseClosedErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseClosedError *) 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__DatabaseCreateErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) 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__DatabaseLockErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) 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__DatabaseNotFoundErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseNotFoundError *) 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__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__DocNotFoundErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::DocNotFoundError *) 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__InternalErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::InternalError *) 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__InvalidOperationErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::InvalidOperationError *) 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__NetworkErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::NetworkError *) 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__QueryParserErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::QueryParserError *) 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__RuntimeErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *)  ((Xapian::RuntimeError *) 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__UnimplementedErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::UnimplementedError *) x));
}
static void *_p_Xapian__WildcardErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::WildcardError *) x));
}
static void *_p_Xapian__ExpandDeciderAndTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderAnd *) x));
}
static void *_p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderFilterPrefix *) x));
}
static void *_p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ExpandDecider *)  ((Xapian::ExpandDeciderFilterTerms *) x));
}
static void *_p_Xapian__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *)  ((Xapian::LatLongDistanceKeyMaker *) 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__GreatCircleMetricTo_p_Xapian__LatLongMetric(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LatLongMetric *)  ((Xapian::GreatCircleMetric *) 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__InvalidArgumentErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::InvalidArgumentError *) 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__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchDecider *)  ((Xapian::ValueSetMatchDecider *) 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__NetworkTimeoutErrorTo_p_Xapian__NetworkError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::NetworkError *)  ((Xapian::NetworkTimeoutError *) 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__FixedWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::FixedWeightPostingSource *) x));
}
static void *_p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::LatLongDistancePostingSource *) 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__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__DateRangeProcessorTo_p_Xapian__RangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RangeProcessor *)  ((Xapian::DateRangeProcessor *) x));
}
static void *_p_Xapian__NumberRangeProcessorTo_p_Xapian__RangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RangeProcessor *)  ((Xapian::NumberRangeProcessor *) x));
}
static void *_p_Xapian__DatabaseClosedErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseClosedError *) 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__DatabaseCreateErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) 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__DatabaseLockErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) 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__DatabaseNotFoundErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseNotFoundError *) 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__DatabaseVersionErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) 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__FeatureUnavailableErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::FeatureUnavailableError *) 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__NetworkErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::NetworkError *) 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__QueryParserErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::QueryParserError *) 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__WildcardErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::WildcardError *) 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__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__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *) (Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::LatLongDistancePostingSource *) 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__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueWeightPostingSource *) 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__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *)  ((Xapian::StringValueRangeProcessor *) 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__BB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BB2Weight *) x));
}
static void *_p_Xapian__BM25PlusWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BM25PlusWeight *) 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__BoolWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BoolWeight *) x));
}
static void *_p_Xapian__CoordWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::CoordWeight *) x));
}
static void *_p_Xapian__DLHWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::DLHWeight *) x));
}
static void *_p_Xapian__DPHWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::DPHWeight *) x));
}
static void *_p_Xapian__IfB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::IfB2Weight *) x));
}
static void *_p_Xapian__InL2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::InL2Weight *) x));
}
static void *_p_Xapian__IneB2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::IneB2Weight *) x));
}
static void *_p_Xapian__LMWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::LMWeight *) x));
}
static void *_p_Xapian__PL2PlusWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::PL2PlusWeight *) x));
}
static void *_p_Xapian__PL2WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::PL2Weight *) x));
}
static void *_p_Xapian__TfIdfWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TfIdfWeight *) x));
}
static void *_p_Xapian__TradWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TradWeight *) x));
}
static swig_type_info _swigt__p_Xapian__AssertionError = {"_p_Xapian__AssertionError", "Xapian::AssertionError *", 0, 0, (void*)"Xapian::AssertionError", 0};
static swig_type_info _swigt__p_Xapian__BB2Weight = {"_p_Xapian__BB2Weight", "Xapian::BB2Weight *", 0, 0, (void*)"Xapian::BB2Weight", 0};
static swig_type_info _swigt__p_Xapian__BM25PlusWeight = {"_p_Xapian__BM25PlusWeight", "Xapian::BM25PlusWeight *", 0, 0, (void*)"Xapian::BM25PlusWeight", 0};
static swig_type_info _swigt__p_Xapian__BM25Weight = {"_p_Xapian__BM25Weight", "Xapian::BM25Weight *", 0, 0, (void*)"Xapian::BM25Weight", 0};
static swig_type_info _swigt__p_Xapian__BoolWeight = {"_p_Xapian__BoolWeight", "Xapian::BoolWeight *", 0, 0, (void*)"Xapian::BoolWeight", 0};
static swig_type_info _swigt__p_Xapian__Compactor = {"_p_Xapian__Compactor", "Xapian::Compactor *", 0, 0, (void*)"Xapian::Compactor", 0};
static swig_type_info _swigt__p_Xapian__CoordWeight = {"_p_Xapian__CoordWeight", "Xapian::CoordWeight *", 0, 0, (void*)"Xapian::CoordWeight", 0};
static swig_type_info _swigt__p_Xapian__DLHWeight = {"_p_Xapian__DLHWeight", "Xapian::DLHWeight *", 0, 0, (void*)"Xapian::DLHWeight", 0};
static swig_type_info _swigt__p_Xapian__DPHWeight = {"_p_Xapian__DPHWeight", "Xapian::DPHWeight *", 0, 0, (void*)"Xapian::DPHWeight", 0};
static swig_type_info _swigt__p_Xapian__Database = {"_p_Xapian__Database", "Xapian::Database *", 0, 0, (void*)"Xapian::Database", 0};
static swig_type_info _swigt__p_Xapian__DatabaseClosedError = {"_p_Xapian__DatabaseClosedError", "Xapian::DatabaseClosedError *", 0, 0, (void*)"Xapian::DatabaseClosedError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseCorruptError = {"_p_Xapian__DatabaseCorruptError", "Xapian::DatabaseCorruptError *", 0, 0, (void*)"Xapian::DatabaseCorruptError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseCreateError = {"_p_Xapian__DatabaseCreateError", "Xapian::DatabaseCreateError *", 0, 0, (void*)"Xapian::DatabaseCreateError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseError = {"_p_Xapian__DatabaseError", "Xapian::DatabaseError *", 0, 0, (void*)"Xapian::DatabaseError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseLockError = {"_p_Xapian__DatabaseLockError", "Xapian::DatabaseLockError *", 0, 0, (void*)"Xapian::DatabaseLockError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseModifiedError = {"_p_Xapian__DatabaseModifiedError", "Xapian::DatabaseModifiedError *", 0, 0, (void*)"Xapian::DatabaseModifiedError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseNotFoundError = {"_p_Xapian__DatabaseNotFoundError", "Xapian::DatabaseNotFoundError *", 0, 0, (void*)"Xapian::DatabaseNotFoundError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseOpeningError = {"_p_Xapian__DatabaseOpeningError", "Xapian::DatabaseOpeningError *", 0, 0, (void*)"Xapian::DatabaseOpeningError", 0};
static swig_type_info _swigt__p_Xapian__DatabaseVersionError = {"_p_Xapian__DatabaseVersionError", "Xapian::DatabaseVersionError *", 0, 0, (void*)"Xapian::DatabaseVersionError", 0};
static swig_type_info _swigt__p_Xapian__DateRangeProcessor = {"_p_Xapian__DateRangeProcessor", "Xapian::DateRangeProcessor *", 0, 0, (void*)"Xapian::DateRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__DateValueRangeProcessor = {"_p_Xapian__DateValueRangeProcessor", "Xapian::DateValueRangeProcessor *", 0, 0, (void*)"Xapian::DateValueRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__DecreasingValueWeightPostingSource = {"_p_Xapian__DecreasingValueWeightPostingSource", "Xapian::DecreasingValueWeightPostingSource *", 0, 0, (void*)"Xapian::DecreasingValueWeightPostingSource", 0};
static swig_type_info _swigt__p_Xapian__DocNotFoundError = {"_p_Xapian__DocNotFoundError", "Xapian::DocNotFoundError *", 0, 0, (void*)"Xapian::DocNotFoundError", 0};
static swig_type_info _swigt__p_Xapian__Document = {"_p_Xapian__Document", "Xapian::Document *", 0, 0, (void*)"Xapian::Document", 0};
static swig_type_info _swigt__p_Xapian__ESet = {"_p_Xapian__ESet", "Xapian::ESet *", 0, 0, (void*)"Xapian::ESet", 0};
static swig_type_info _swigt__p_Xapian__ESetIterator = {"_p_Xapian__ESetIterator", "Xapian::ESetIterator *", 0, 0, (void*)"Xapian::ESetIterator", 0};
static swig_type_info _swigt__p_Xapian__Enquire = {"_p_Xapian__Enquire", "Xapian::Enquire *", 0, 0, (void*)"Xapian::Enquire", 0};
static swig_type_info _swigt__p_Xapian__Error = {"_p_Xapian__Error", "Xapian::Error *", 0, 0, (void*)"Xapian::Error", 0};
static swig_type_info _swigt__p_Xapian__ExpandDecider = {"_p_Xapian__ExpandDecider", "Xapian::ExpandDecider *", 0, 0, (void*)"Xapian::ExpandDecider", 0};
static swig_type_info _swigt__p_Xapian__ExpandDeciderFilterTerms = {"_p_Xapian__ExpandDeciderFilterTerms", 0, 0, 0, 0, 0};
static swig_type_info _swigt__p_Xapian__ExpandDeciderAnd = {"_p_Xapian__ExpandDeciderAnd", "Xapian::ExpandDeciderAnd *", 0, 0, (void*)"Xapian::ExpandDeciderAnd", 0};
static swig_type_info _swigt__p_Xapian__ExpandDeciderFilterPrefix = {"_p_Xapian__ExpandDeciderFilterPrefix", "Xapian::ExpandDeciderFilterPrefix *", 0, 0, (void*)"Xapian::ExpandDeciderFilterPrefix", 0};
static swig_type_info _swigt__p_Xapian__FeatureUnavailableError = {"_p_Xapian__FeatureUnavailableError", "Xapian::FeatureUnavailableError *", 0, 0, (void*)"Xapian::FeatureUnavailableError", 0};
static swig_type_info _swigt__p_Xapian__FieldProcessor = {"_p_Xapian__FieldProcessor", "Xapian::FieldProcessor *", 0, 0, (void*)"Xapian::FieldProcessor", 0};
static swig_type_info _swigt__p_Xapian__FixedWeightPostingSource = {"_p_Xapian__FixedWeightPostingSource", "Xapian::FixedWeightPostingSource *", 0, 0, (void*)"Xapian::FixedWeightPostingSource", 0};
static swig_type_info _swigt__p_Xapian__GreatCircleMetric = {"_p_Xapian__GreatCircleMetric", "Xapian::GreatCircleMetric *", 0, 0, (void*)"Xapian::GreatCircleMetric", 0};
static swig_type_info _swigt__p_Xapian__IfB2Weight = {"_p_Xapian__IfB2Weight", "Xapian::IfB2Weight *", 0, 0, (void*)"Xapian::IfB2Weight", 0};
static swig_type_info _swigt__p_Xapian__InL2Weight = {"_p_Xapian__InL2Weight", "Xapian::InL2Weight *", 0, 0, (void*)"Xapian::InL2Weight", 0};
static swig_type_info _swigt__p_Xapian__IneB2Weight = {"_p_Xapian__IneB2Weight", "Xapian::IneB2Weight *", 0, 0, (void*)"Xapian::IneB2Weight", 0};
static swig_type_info _swigt__p_Xapian__InternalError = {"_p_Xapian__InternalError", "Xapian::InternalError *", 0, 0, (void*)"Xapian::InternalError", 0};
static swig_type_info _swigt__p_Xapian__InvalidArgumentError = {"_p_Xapian__InvalidArgumentError", "Xapian::InvalidArgumentError *", 0, 0, (void*)"Xapian::InvalidArgumentError", 0};
static swig_type_info _swigt__p_Xapian__InvalidOperationError = {"_p_Xapian__InvalidOperationError", "Xapian::InvalidOperationError *", 0, 0, (void*)"Xapian::InvalidOperationError", 0};
static swig_type_info _swigt__p_Xapian__KeyMaker = {"_p_Xapian__KeyMaker", "Xapian::KeyMaker *", 0, 0, (void*)"Xapian::KeyMaker", 0};
static swig_type_info _swigt__p_Xapian__LMWeight = {"_p_Xapian__LMWeight", "Xapian::LMWeight *", 0, 0, (void*)"Xapian::LMWeight", 0};
static swig_type_info _swigt__p_Xapian__LatLongCoord = {"_p_Xapian__LatLongCoord", "Xapian::LatLongCoord *", 0, 0, (void*)"Xapian::LatLongCoord", 0};
static swig_type_info _swigt__p_Xapian__LatLongCoords = {"_p_Xapian__LatLongCoords", "Xapian::LatLongCoords *", 0, 0, (void*)"Xapian::LatLongCoords", 0};
static swig_type_info _swigt__p_Xapian__LatLongCoordsIterator = {"_p_Xapian__LatLongCoordsIterator", "Xapian::LatLongCoordsIterator *", 0, 0, (void*)"Xapian::LatLongCoordsIterator", 0};
static swig_type_info _swigt__p_Xapian__LatLongDistanceKeyMaker = {"_p_Xapian__LatLongDistanceKeyMaker", "Xapian::LatLongDistanceKeyMaker *", 0, 0, (void*)"Xapian::LatLongDistanceKeyMaker", 0};
static swig_type_info _swigt__p_Xapian__LatLongDistancePostingSource = {"_p_Xapian__LatLongDistancePostingSource", "Xapian::LatLongDistancePostingSource *", 0, 0, (void*)"Xapian::LatLongDistancePostingSource", 0};
static swig_type_info _swigt__p_Xapian__LatLongMetric = {"_p_Xapian__LatLongMetric", "Xapian::LatLongMetric *", 0, 0, (void*)"Xapian::LatLongMetric", 0};
static swig_type_info _swigt__p_Xapian__LogicError = {"_p_Xapian__LogicError", "Xapian::LogicError *", 0, 0, (void*)"Xapian::LogicError", 0};
static swig_type_info _swigt__p_Xapian__MSet = {"_p_Xapian__MSet", "Xapian::MSet *", 0, 0, (void*)"Xapian::MSet", 0};
static swig_type_info _swigt__p_Xapian__MSetIterator = {"_p_Xapian__MSetIterator", "Xapian::MSetIterator *", 0, 0, (void*)"Xapian::MSetIterator", 0};
static swig_type_info _swigt__p_Xapian__MatchDecider = {"_p_Xapian__MatchDecider", "Xapian::MatchDecider *", 0, 0, (void*)"Xapian::MatchDecider", 0};
static swig_type_info _swigt__p_Xapian__MatchSpy = {"_p_Xapian__MatchSpy", "Xapian::MatchSpy *", 0, 0, (void*)"Xapian::MatchSpy", 0};
static swig_type_info _swigt__p_Xapian__MultiValueKeyMaker = {"_p_Xapian__MultiValueKeyMaker", "Xapian::MultiValueKeyMaker *", 0, 0, (void*)"Xapian::MultiValueKeyMaker", 0};
static swig_type_info _swigt__p_Xapian__NetworkError = {"_p_Xapian__NetworkError", "Xapian::NetworkError *", 0, 0, (void*)"Xapian::NetworkError", 0};
static swig_type_info _swigt__p_Xapian__NetworkTimeoutError = {"_p_Xapian__NetworkTimeoutError", "Xapian::NetworkTimeoutError *", 0, 0, (void*)"Xapian::NetworkTimeoutError", 0};
static swig_type_info _swigt__p_Xapian__NumberRangeProcessor = {"_p_Xapian__NumberRangeProcessor", "Xapian::NumberRangeProcessor *", 0, 0, (void*)"Xapian::NumberRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__NumberValueRangeProcessor = {"_p_Xapian__NumberValueRangeProcessor", "Xapian::NumberValueRangeProcessor *", 0, 0, (void*)"Xapian::NumberValueRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__PL2PlusWeight = {"_p_Xapian__PL2PlusWeight", "Xapian::PL2PlusWeight *", 0, 0, (void*)"Xapian::PL2PlusWeight", 0};
static swig_type_info _swigt__p_Xapian__PL2Weight = {"_p_Xapian__PL2Weight", "Xapian::PL2Weight *", 0, 0, (void*)"Xapian::PL2Weight", 0};
static swig_type_info _swigt__p_Xapian__PositionIterator = {"_p_Xapian__PositionIterator", "Xapian::PositionIterator *", 0, 0, (void*)"Xapian::PositionIterator", 0};
static swig_type_info _swigt__p_Xapian__PostingIterator = {"_p_Xapian__PostingIterator", "Xapian::PostingIterator *", 0, 0, (void*)"Xapian::PostingIterator", 0};
static swig_type_info _swigt__p_Xapian__PostingSource = {"_p_Xapian__PostingSource", "Xapian::PostingSource *", 0, 0, (void*)"Xapian::PostingSource", 0};
static swig_type_info _swigt__p_Xapian__Query = {"_p_Xapian__Query", "Xapian::Query *", 0, 0, (void*)"Xapian::Query", 0};
static swig_type_info _swigt__p_Xapian__QueryParser = {"_p_Xapian__QueryParser", "Xapian::QueryParser *", 0, 0, (void*)"Xapian::QueryParser", 0};
static swig_type_info _swigt__p_Xapian__QueryParserError = {"_p_Xapian__QueryParserError", "Xapian::QueryParserError *", 0, 0, (void*)"Xapian::QueryParserError", 0};
static swig_type_info _swigt__p_Xapian__RSet = {"_p_Xapian__RSet", "Xapian::RSet *", 0, 0, (void*)"Xapian::RSet", 0};
static swig_type_info _swigt__p_Xapian__RangeError = {"_p_Xapian__RangeError", "Xapian::RangeError *", 0, 0, (void*)"Xapian::RangeError", 0};
static swig_type_info _swigt__p_Xapian__RangeProcessor = {"_p_Xapian__RangeProcessor", "Xapian::RangeProcessor *", 0, 0, (void*)"Xapian::RangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__Registry = {"_p_Xapian__Registry", "Xapian::Registry *", 0, 0, (void*)"Xapian::Registry", 0};
static swig_type_info _swigt__p_Xapian__RuntimeError = {"_p_Xapian__RuntimeError", "Xapian::RuntimeError *", 0, 0, (void*)"Xapian::RuntimeError", 0};
static swig_type_info _swigt__p_Xapian__SerialisationError = {"_p_Xapian__SerialisationError", "Xapian::SerialisationError *", 0, 0, (void*)"Xapian::SerialisationError", 0};
static swig_type_info _swigt__p_Xapian__SimpleStopper = {"_p_Xapian__SimpleStopper", "Xapian::SimpleStopper *", 0, 0, (void*)"Xapian::SimpleStopper", 0};
static swig_type_info _swigt__p_Xapian__Stem = {"_p_Xapian__Stem", "Xapian::Stem *", 0, 0, (void*)"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*)"Xapian::Stopper", 0};
static swig_type_info _swigt__p_Xapian__StringValueRangeProcessor = {"_p_Xapian__StringValueRangeProcessor", "Xapian::StringValueRangeProcessor *", 0, 0, (void*)"Xapian::StringValueRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__TermGenerator = {"_p_Xapian__TermGenerator", "Xapian::TermGenerator *", 0, 0, (void*)"Xapian::TermGenerator", 0};
static swig_type_info _swigt__p_Xapian__TermIterator = {"_p_Xapian__TermIterator", "Xapian::TermIterator *", 0, 0, (void*)"Xapian::TermIterator", 0};
static swig_type_info _swigt__p_Xapian__TfIdfWeight = {"_p_Xapian__TfIdfWeight", "Xapian::TfIdfWeight *", 0, 0, (void*)"Xapian::TfIdfWeight", 0};
static swig_type_info _swigt__p_Xapian__TradWeight = {"_p_Xapian__TradWeight", "Xapian::TradWeight *", 0, 0, (void*)"Xapian::TradWeight", 0};
static swig_type_info _swigt__p_Xapian__UnimplementedError = {"_p_Xapian__UnimplementedError", "Xapian::UnimplementedError *", 0, 0, (void*)"Xapian::UnimplementedError", 0};
static swig_type_info _swigt__p_Xapian__ValueCountMatchSpy = {"_p_Xapian__ValueCountMatchSpy", "Xapian::ValueCountMatchSpy *", 0, 0, (void*)"Xapian::ValueCountMatchSpy", 0};
static swig_type_info _swigt__p_Xapian__ValueIterator = {"_p_Xapian__ValueIterator", "Xapian::ValueIterator *", 0, 0, (void*)"Xapian::ValueIterator", 0};
static swig_type_info _swigt__p_Xapian__ValueMapPostingSource = {"_p_Xapian__ValueMapPostingSource", "Xapian::ValueMapPostingSource *", 0, 0, (void*)"Xapian::ValueMapPostingSource", 0};
static swig_type_info _swigt__p_Xapian__ValuePostingSource = {"_p_Xapian__ValuePostingSource", "Xapian::ValuePostingSource *", 0, 0, (void*)"Xapian::ValuePostingSource", 0};
static swig_type_info _swigt__p_Xapian__ValueRangeProcessor = {"_p_Xapian__ValueRangeProcessor", "Xapian::ValueRangeProcessor *", 0, 0, (void*)"Xapian::ValueRangeProcessor", 0};
static swig_type_info _swigt__p_Xapian__ValueSetMatchDecider = {"_p_Xapian__ValueSetMatchDecider", "Xapian::ValueSetMatchDecider *", 0, 0, (void*)"Xapian::ValueSetMatchDecider", 0};
static swig_type_info _swigt__p_Xapian__ValueWeightPostingSource = {"_p_Xapian__ValueWeightPostingSource", "Xapian::ValueWeightPostingSource *", 0, 0, (void*)"Xapian::ValueWeightPostingSource", 0};
static swig_type_info _swigt__p_Xapian__Weight = {"_p_Xapian__Weight", "Xapian::Weight *", 0, 0, (void*)"Xapian::Weight", 0};
static swig_type_info _swigt__p_Xapian__WildcardError = {"_p_Xapian__WildcardError", "Xapian::WildcardError *", 0, 0, (void*)"Xapian::WildcardError", 0};
static swig_type_info _swigt__p_Xapian__WritableDatabase = {"_p_Xapian__WritableDatabase", "Xapian::WritableDatabase *", 0, 0, (void*)"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_const_reference = {"_p_const_reference", "const_reference *", 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 *|Xapian::weight *|double *", 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_flags = {"_p_flags", "flags *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "Xapian::doccount_diff *|Xapian::percent *|Xapian::termcount_diff *|Xapian::termpos_diff *|Xapian::valueno_diff *|int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 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_stem_strategy = {"_p_stem_strategy", "stem_strategy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_stop_strategy = {"_p_stop_strategy", "stop_strategy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_type_smoothing = {"_p_type_smoothing", "type_smoothing *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "Xapian::doccount *|Xapian::docid *|Xapian::termcount *|Xapian::termpos *|Xapian::timeout *|Xapian::valueno *|unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "Xapian::rev *|Xapian::totallength *|unsigned long *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_Xapian__AssertionError,
  &_swigt__p_Xapian__BB2Weight,
  &_swigt__p_Xapian__BM25PlusWeight,
  &_swigt__p_Xapian__BM25Weight,
  &_swigt__p_Xapian__BoolWeight,
  &_swigt__p_Xapian__Compactor,
  &_swigt__p_Xapian__CoordWeight,
  &_swigt__p_Xapian__DLHWeight,
  &_swigt__p_Xapian__DPHWeight,
  &_swigt__p_Xapian__Database,
  &_swigt__p_Xapian__DatabaseClosedError,
  &_swigt__p_Xapian__DatabaseCorruptError,
  &_swigt__p_Xapian__DatabaseCreateError,
  &_swigt__p_Xapian__DatabaseError,
  &_swigt__p_Xapian__DatabaseLockError,
  &_swigt__p_Xapian__DatabaseModifiedError,
  &_swigt__p_Xapian__DatabaseNotFoundError,
  &_swigt__p_Xapian__DatabaseOpeningError,
  &_swigt__p_Xapian__DatabaseVersionError,
  &_swigt__p_Xapian__DateRangeProcessor,
  &_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__ExpandDecider,
  &_swigt__p_Xapian__ExpandDeciderAnd,
  &_swigt__p_Xapian__ExpandDeciderFilterPrefix,
  &_swigt__p_Xapian__ExpandDeciderFilterTerms,
  &_swigt__p_Xapian__FeatureUnavailableError,
  &_swigt__p_Xapian__FieldProcessor,
  &_swigt__p_Xapian__FixedWeightPostingSource,
  &_swigt__p_Xapian__GreatCircleMetric,
  &_swigt__p_Xapian__IfB2Weight,
  &_swigt__p_Xapian__InL2Weight,
  &_swigt__p_Xapian__IneB2Weight,
  &_swigt__p_Xapian__InternalError,
  &_swigt__p_Xapian__InvalidArgumentError,
  &_swigt__p_Xapian__InvalidOperationError,
  &_swigt__p_Xapian__KeyMaker,
  &_swigt__p_Xapian__LMWeight,
  &_swigt__p_Xapian__LatLongCoord,
  &_swigt__p_Xapian__LatLongCoords,
  &_swigt__p_Xapian__LatLongCoordsIterator,
  &_swigt__p_Xapian__LatLongDistanceKeyMaker,
  &_swigt__p_Xapian__LatLongDistancePostingSource,
  &_swigt__p_Xapian__LatLongMetric,
  &_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__NetworkError,
  &_swigt__p_Xapian__NetworkTimeoutError,
  &_swigt__p_Xapian__NumberRangeProcessor,
  &_swigt__p_Xapian__NumberValueRangeProcessor,
  &_swigt__p_Xapian__PL2PlusWeight,
  &_swigt__p_Xapian__PL2Weight,
  &_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__RangeProcessor,
  &_swigt__p_Xapian__Registry,
  &_swigt__p_Xapian__RuntimeError,
  &_swigt__p_Xapian__SerialisationError,
  &_swigt__p_Xapian__SimpleStopper,
  &_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__TfIdfWeight,
  &_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__WildcardError,
  &_swigt__p_Xapian__WritableDatabase,
  &_swigt__p_char,
  &_swigt__p_compaction_level,
  &_swigt__p_const_reference,
  &_swigt__p_docid_order,
  &_swigt__p_double,
  &_swigt__p_feature_flag,
  &_swigt__p_flags,
  &_swigt__p_int,
  &_swigt__p_reference,
  &_swigt__p_std__string,
  &_swigt__p_stem_strategy,
  &_swigt__p_stop_strategy,
  &_swigt__p_type_smoothing,
  &_swigt__p_unsigned_int,
  &_swigt__p_unsigned_long,
};

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__BB2Weight[] = {  {&_swigt__p_Xapian__BB2Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BM25PlusWeight[] = {  {&_swigt__p_Xapian__BM25PlusWeight, 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__CoordWeight[] = {  {&_swigt__p_Xapian__CoordWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DLHWeight[] = {  {&_swigt__p_Xapian__DLHWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DPHWeight[] = {  {&_swigt__p_Xapian__DPHWeight, 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__DatabaseClosedError[] = {  {&_swigt__p_Xapian__DatabaseClosedError, 0, 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__DatabaseError, 0, 0, 0},  {&_swigt__p_Xapian__DatabaseClosedError, _p_Xapian__DatabaseClosedErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_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__DatabaseNotFoundError, _p_Xapian__DatabaseNotFoundErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_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__DatabaseNotFoundError[] = {  {&_swigt__p_Xapian__DatabaseNotFoundError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseOpeningError[] = {  {&_swigt__p_Xapian__DatabaseOpeningError, 0, 0, 0},  {&_swigt__p_Xapian__DatabaseNotFoundError, _p_Xapian__DatabaseNotFoundErrorTo_p_Xapian__DatabaseOpeningError, 0, 0},  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseOpeningError, 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__DateRangeProcessor[] = {  {&_swigt__p_Xapian__DateRangeProcessor, 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__Error, 0, 0, 0},  {&_swigt__p_Xapian__AssertionError, _p_Xapian__AssertionErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseClosedError, _p_Xapian__DatabaseClosedErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseError, _p_Xapian__DatabaseErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseNotFoundError, _p_Xapian__DatabaseNotFoundErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DocNotFoundError, _p_Xapian__DocNotFoundErrorTo_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__InvalidArgumentError, _p_Xapian__InvalidArgumentErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__InvalidOperationError, _p_Xapian__InvalidOperationErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__LogicError, _p_Xapian__LogicErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__NetworkError, _p_Xapian__NetworkErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__QueryParserError, _p_Xapian__QueryParserErrorTo_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__SerialisationError, _p_Xapian__SerialisationErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__UnimplementedError, _p_Xapian__UnimplementedErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__WildcardError, _p_Xapian__WildcardErrorTo_p_Xapian__Error, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDeciderFilterTerms[] = {{&_swigt__p_Xapian__ExpandDeciderFilterTerms, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDecider[] = {  {&_swigt__p_Xapian__ExpandDecider, 0, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderAnd, _p_Xapian__ExpandDeciderAndTo_p_Xapian__ExpandDecider, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderFilterPrefix, _p_Xapian__ExpandDeciderFilterPrefixTo_p_Xapian__ExpandDecider, 0, 0},  {&_swigt__p_Xapian__ExpandDeciderFilterTerms, _p_Xapian__ExpandDeciderFilterTermsTo_p_Xapian__ExpandDecider, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDeciderAnd[] = {  {&_swigt__p_Xapian__ExpandDeciderAnd, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDeciderFilterPrefix[] = {  {&_swigt__p_Xapian__ExpandDeciderFilterPrefix, 0, 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__FieldProcessor[] = {  {&_swigt__p_Xapian__FieldProcessor, 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__GreatCircleMetric[] = {  {&_swigt__p_Xapian__GreatCircleMetric, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__IfB2Weight[] = {  {&_swigt__p_Xapian__IfB2Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__InL2Weight[] = {  {&_swigt__p_Xapian__InL2Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__IneB2Weight[] = {  {&_swigt__p_Xapian__IneB2Weight, 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__KeyMaker, 0, 0, 0},  {&_swigt__p_Xapian__LatLongDistanceKeyMaker, _p_Xapian__LatLongDistanceKeyMakerTo_p_Xapian__KeyMaker, 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__LMWeight[] = {  {&_swigt__p_Xapian__LMWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoord[] = {  {&_swigt__p_Xapian__LatLongCoord, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoords[] = {  {&_swigt__p_Xapian__LatLongCoords, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongCoordsIterator[] = {  {&_swigt__p_Xapian__LatLongCoordsIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongDistanceKeyMaker[] = {  {&_swigt__p_Xapian__LatLongDistanceKeyMaker, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongDistancePostingSource[] = {  {&_swigt__p_Xapian__LatLongDistancePostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LatLongMetric[] = {  {&_swigt__p_Xapian__LatLongMetric, 0, 0, 0},  {&_swigt__p_Xapian__GreatCircleMetric, _p_Xapian__GreatCircleMetricTo_p_Xapian__LatLongMetric, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LogicError[] = {  {&_swigt__p_Xapian__LogicError, 0, 0, 0},  {&_swigt__p_Xapian__AssertionError, _p_Xapian__AssertionErrorTo_p_Xapian__LogicError, 0, 0},  {&_swigt__p_Xapian__InvalidArgumentError, _p_Xapian__InvalidArgumentErrorTo_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},{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__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__NumberRangeProcessor[] = {  {&_swigt__p_Xapian__NumberRangeProcessor, 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__PL2PlusWeight[] = {  {&_swigt__p_Xapian__PL2PlusWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PL2Weight[] = {  {&_swigt__p_Xapian__PL2Weight, 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__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__FixedWeightPostingSource, _p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__LatLongDistancePostingSource, _p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource, 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},{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__RangeProcessor[] = {  {&_swigt__p_Xapian__RangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__DateRangeProcessor, _p_Xapian__DateRangeProcessorTo_p_Xapian__RangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberRangeProcessor, _p_Xapian__NumberRangeProcessorTo_p_Xapian__RangeProcessor, 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__RuntimeError, 0, 0, 0},  {&_swigt__p_Xapian__DatabaseClosedError, _p_Xapian__DatabaseClosedErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseError, _p_Xapian__DatabaseErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseNotFoundError, _p_Xapian__DatabaseNotFoundErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DocNotFoundError, _p_Xapian__DocNotFoundErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__FeatureUnavailableError, _p_Xapian__FeatureUnavailableErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__InternalError, _p_Xapian__InternalErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__NetworkError, _p_Xapian__NetworkErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__QueryParserError, _p_Xapian__QueryParserErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__RangeError, _p_Xapian__RangeErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__SerialisationError, _p_Xapian__SerialisationErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__WildcardError, _p_Xapian__WildcardErrorTo_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__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__TfIdfWeight[] = {  {&_swigt__p_Xapian__TfIdfWeight, 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__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__LatLongDistancePostingSource, _p_Xapian__LatLongDistancePostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_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__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__StringValueRangeProcessor, _p_Xapian__StringValueRangeProcessorTo_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__Weight, 0, 0, 0},  {&_swigt__p_Xapian__BB2Weight, _p_Xapian__BB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BM25PlusWeight, _p_Xapian__BM25PlusWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BM25Weight, _p_Xapian__BM25WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__BoolWeight, _p_Xapian__BoolWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__CoordWeight, _p_Xapian__CoordWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__DLHWeight, _p_Xapian__DLHWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__DPHWeight, _p_Xapian__DPHWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__IfB2Weight, _p_Xapian__IfB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__InL2Weight, _p_Xapian__InL2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__IneB2Weight, _p_Xapian__IneB2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__LMWeight, _p_Xapian__LMWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__PL2PlusWeight, _p_Xapian__PL2PlusWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__PL2Weight, _p_Xapian__PL2WeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TfIdfWeight, _p_Xapian__TfIdfWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TradWeight, _p_Xapian__TradWeightTo_p_Xapian__Weight, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__WildcardError[] = {  {&_swigt__p_Xapian__WildcardError, 0, 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_const_reference[] = {  {&_swigt__p_const_reference, 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_flags[] = {  {&_swigt__p_flags, 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_reference[] = {  {&_swigt__p_reference, 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_stem_strategy[] = {  {&_swigt__p_stem_strategy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_stop_strategy[] = {  {&_swigt__p_stop_strategy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_type_smoothing[] = {  {&_swigt__p_type_smoothing, 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 _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_Xapian__AssertionError,
  _swigc__p_Xapian__BB2Weight,
  _swigc__p_Xapian__BM25PlusWeight,
  _swigc__p_Xapian__BM25Weight,
  _swigc__p_Xapian__BoolWeight,
  _swigc__p_Xapian__Compactor,
  _swigc__p_Xapian__CoordWeight,
  _swigc__p_Xapian__DLHWeight,
  _swigc__p_Xapian__DPHWeight,
  _swigc__p_Xapian__Database,
  _swigc__p_Xapian__DatabaseClosedError,
  _swigc__p_Xapian__DatabaseCorruptError,
  _swigc__p_Xapian__DatabaseCreateError,
  _swigc__p_Xapian__DatabaseError,
  _swigc__p_Xapian__DatabaseLockError,
  _swigc__p_Xapian__DatabaseModifiedError,
  _swigc__p_Xapian__DatabaseNotFoundError,
  _swigc__p_Xapian__DatabaseOpeningError,
  _swigc__p_Xapian__DatabaseVersionError,
  _swigc__p_Xapian__DateRangeProcessor,
  _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__ExpandDecider,
  _swigc__p_Xapian__ExpandDeciderAnd,
  _swigc__p_Xapian__ExpandDeciderFilterPrefix,
  _swigc__p_Xapian__ExpandDeciderFilterTerms,
  _swigc__p_Xapian__FeatureUnavailableError,
  _swigc__p_Xapian__FieldProcessor,
  _swigc__p_Xapian__FixedWeightPostingSource,
  _swigc__p_Xapian__GreatCircleMetric,
  _swigc__p_Xapian__IfB2Weight,
  _swigc__p_Xapian__InL2Weight,
  _swigc__p_Xapian__IneB2Weight,
  _swigc__p_Xapian__InternalError,
  _swigc__p_Xapian__InvalidArgumentError,
  _swigc__p_Xapian__InvalidOperationError,
  _swigc__p_Xapian__KeyMaker,
  _swigc__p_Xapian__LMWeight,
  _swigc__p_Xapian__LatLongCoord,
  _swigc__p_Xapian__LatLongCoords,
  _swigc__p_Xapian__LatLongCoordsIterator,
  _swigc__p_Xapian__LatLongDistanceKeyMaker,
  _swigc__p_Xapian__LatLongDistancePostingSource,
  _swigc__p_Xapian__LatLongMetric,
  _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__NetworkError,
  _swigc__p_Xapian__NetworkTimeoutError,
  _swigc__p_Xapian__NumberRangeProcessor,
  _swigc__p_Xapian__NumberValueRangeProcessor,
  _swigc__p_Xapian__PL2PlusWeight,
  _swigc__p_Xapian__PL2Weight,
  _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__RangeProcessor,
  _swigc__p_Xapian__Registry,
  _swigc__p_Xapian__RuntimeError,
  _swigc__p_Xapian__SerialisationError,
  _swigc__p_Xapian__SimpleStopper,
  _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__TfIdfWeight,
  _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__WildcardError,
  _swigc__p_Xapian__WritableDatabase,
  _swigc__p_char,
  _swigc__p_compaction_level,
  _swigc__p_const_reference,
  _swigc__p_docid_order,
  _swigc__p_double,
  _swigc__p_feature_flag,
  _swigc__p_flags,
  _swigc__p_int,
  _swigc__p_reference,
  _swigc__p_std__string,
  _swigc__p_stem_strategy,
  _swigc__p_stop_strategy,
  _swigc__p_type_smoothing,
  _swigc__p_unsigned_int,
  _swigc__p_unsigned_long,
};


/* -------- 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[] = {
{0,0,0,0}
};
static swig_command_info swig_commands[] = {
{"Xapianc::newN", _wrap_newN},
{"Xapianc::Error_get_type", _wrap_Error_get_type},
{"Xapianc::Error_get_msg", _wrap_Error_get_msg},
{"Xapianc::Error_get_context", _wrap_Error_get_context},
{"Xapianc::Error_get_error_string", _wrap_Error_get_error_string},
{"Xapianc::Error_get_description", _wrap_Error_get_description},
{"Xapianc::delete_Error", _wrap_delete_Error},
{"Xapianc::delete_LogicError", _wrap_delete_LogicError},
{"Xapianc::delete_RuntimeError", _wrap_delete_RuntimeError},
{"Xapianc::new_AssertionError", _wrap_new_AssertionError},
{"Xapianc::delete_AssertionError", _wrap_delete_AssertionError},
{"Xapianc::new_InvalidArgumentError", _wrap_new_InvalidArgumentError},
{"Xapianc::delete_InvalidArgumentError", _wrap_delete_InvalidArgumentError},
{"Xapianc::new_InvalidOperationError", _wrap_new_InvalidOperationError},
{"Xapianc::delete_InvalidOperationError", _wrap_delete_InvalidOperationError},
{"Xapianc::new_UnimplementedError", _wrap_new_UnimplementedError},
{"Xapianc::delete_UnimplementedError", _wrap_delete_UnimplementedError},
{"Xapianc::new_DatabaseError", _wrap_new_DatabaseError},
{"Xapianc::delete_DatabaseError", _wrap_delete_DatabaseError},
{"Xapianc::new_DatabaseCorruptError", _wrap_new_DatabaseCorruptError},
{"Xapianc::delete_DatabaseCorruptError", _wrap_delete_DatabaseCorruptError},
{"Xapianc::new_DatabaseCreateError", _wrap_new_DatabaseCreateError},
{"Xapianc::delete_DatabaseCreateError", _wrap_delete_DatabaseCreateError},
{"Xapianc::new_DatabaseLockError", _wrap_new_DatabaseLockError},
{"Xapianc::delete_DatabaseLockError", _wrap_delete_DatabaseLockError},
{"Xapianc::new_DatabaseModifiedError", _wrap_new_DatabaseModifiedError},
{"Xapianc::delete_DatabaseModifiedError", _wrap_delete_DatabaseModifiedError},
{"Xapianc::new_DatabaseOpeningError", _wrap_new_DatabaseOpeningError},
{"Xapianc::delete_DatabaseOpeningError", _wrap_delete_DatabaseOpeningError},
{"Xapianc::new_DatabaseVersionError", _wrap_new_DatabaseVersionError},
{"Xapianc::delete_DatabaseVersionError", _wrap_delete_DatabaseVersionError},
{"Xapianc::new_DocNotFoundError", _wrap_new_DocNotFoundError},
{"Xapianc::delete_DocNotFoundError", _wrap_delete_DocNotFoundError},
{"Xapianc::new_FeatureUnavailableError", _wrap_new_FeatureUnavailableError},
{"Xapianc::delete_FeatureUnavailableError", _wrap_delete_FeatureUnavailableError},
{"Xapianc::new_InternalError", _wrap_new_InternalError},
{"Xapianc::delete_InternalError", _wrap_delete_InternalError},
{"Xapianc::new_NetworkError", _wrap_new_NetworkError},
{"Xapianc::delete_NetworkError", _wrap_delete_NetworkError},
{"Xapianc::new_NetworkTimeoutError", _wrap_new_NetworkTimeoutError},
{"Xapianc::delete_NetworkTimeoutError", _wrap_delete_NetworkTimeoutError},
{"Xapianc::new_QueryParserError", _wrap_new_QueryParserError},
{"Xapianc::delete_QueryParserError", _wrap_delete_QueryParserError},
{"Xapianc::new_SerialisationError", _wrap_new_SerialisationError},
{"Xapianc::delete_SerialisationError", _wrap_delete_SerialisationError},
{"Xapianc::new_RangeError", _wrap_new_RangeError},
{"Xapianc::delete_RangeError", _wrap_delete_RangeError},
{"Xapianc::new_WildcardError", _wrap_new_WildcardError},
{"Xapianc::delete_WildcardError", _wrap_delete_WildcardError},
{"Xapianc::new_DatabaseNotFoundError", _wrap_new_DatabaseNotFoundError},
{"Xapianc::delete_DatabaseNotFoundError", _wrap_delete_DatabaseNotFoundError},
{"Xapianc::new_DatabaseClosedError", _wrap_new_DatabaseClosedError},
{"Xapianc::delete_DatabaseClosedError", _wrap_delete_DatabaseClosedError},
{"Xapianc::version_string", _wrap_version_string},
{"Xapianc::major_version", _wrap_major_version},
{"Xapianc::minor_version", _wrap_minor_version},
{"Xapianc::revision", _wrap_revision},
{"Xapianc::new_PositionIterator", _wrap_new_PositionIterator},
{"Xapianc::delete_PositionIterator", _wrap_delete_PositionIterator},
{"Xapianc::PositionIterator_skip_to", _wrap_PositionIterator_skip_to},
{"Xapianc::PositionIterator_get_description", _wrap_PositionIterator_get_description},
{"Xapianc::PositionIterator_equal", _wrap_PositionIterator_equal},
{"Xapianc::PositionIterator_nequal", _wrap_PositionIterator_nequal},
{"Xapianc::PositionIterator_get_termpos", _wrap_PositionIterator_get_termpos},
{"Xapianc::PositionIterator_inc", _wrap_PositionIterator_inc},
{"Xapianc::new_PostingIterator", _wrap_new_PostingIterator},
{"Xapianc::delete_PostingIterator", _wrap_delete_PostingIterator},
{"Xapianc::PostingIterator_get_wdf", _wrap_PostingIterator_get_wdf},
{"Xapianc::PostingIterator_get_doclength", _wrap_PostingIterator_get_doclength},
{"Xapianc::PostingIterator_get_unique_terms", _wrap_PostingIterator_get_unique_terms},
{"Xapianc::PostingIterator_positionlist_begin", _wrap_PostingIterator_positionlist_begin},
{"Xapianc::PostingIterator_positionlist_end", _wrap_PostingIterator_positionlist_end},
{"Xapianc::PostingIterator_skip_to", _wrap_PostingIterator_skip_to},
{"Xapianc::PostingIterator_get_description", _wrap_PostingIterator_get_description},
{"Xapianc::PostingIterator_equal", _wrap_PostingIterator_equal},
{"Xapianc::PostingIterator_nequal", _wrap_PostingIterator_nequal},
{"Xapianc::PostingIterator_get_docid", _wrap_PostingIterator_get_docid},
{"Xapianc::PostingIterator_inc", _wrap_PostingIterator_inc},
{"Xapianc::new_TermIterator", _wrap_new_TermIterator},
{"Xapianc::delete_TermIterator", _wrap_delete_TermIterator},
{"Xapianc::TermIterator_get_wdf", _wrap_TermIterator_get_wdf},
{"Xapianc::TermIterator_get_termfreq", _wrap_TermIterator_get_termfreq},
{"Xapianc::TermIterator_positionlist_count", _wrap_TermIterator_positionlist_count},
{"Xapianc::TermIterator_positionlist_begin", _wrap_TermIterator_positionlist_begin},
{"Xapianc::TermIterator_positionlist_end", _wrap_TermIterator_positionlist_end},
{"Xapianc::TermIterator_skip_to", _wrap_TermIterator_skip_to},
{"Xapianc::TermIterator_get_description", _wrap_TermIterator_get_description},
{"Xapianc::TermIterator_equal", _wrap_TermIterator_equal},
{"Xapianc::TermIterator_nequal", _wrap_TermIterator_nequal},
{"Xapianc::TermIterator_get_termname", _wrap_TermIterator_get_termname},
{"Xapianc::TermIterator_inc", _wrap_TermIterator_inc},
{"Xapianc::new_ValueIterator", _wrap_new_ValueIterator},
{"Xapianc::delete_ValueIterator", _wrap_delete_ValueIterator},
{"Xapianc::ValueIterator_get_docid", _wrap_ValueIterator_get_docid},
{"Xapianc::ValueIterator_get_valueno", _wrap_ValueIterator_get_valueno},
{"Xapianc::ValueIterator_skip_to", _wrap_ValueIterator_skip_to},
{"Xapianc::ValueIterator_check", _wrap_ValueIterator_check},
{"Xapianc::ValueIterator_get_description", _wrap_ValueIterator_get_description},
{"Xapianc::ValueIterator_equal", _wrap_ValueIterator_equal},
{"Xapianc::ValueIterator_nequal", _wrap_ValueIterator_nequal},
{"Xapianc::ValueIterator_get_value", _wrap_ValueIterator_get_value},
{"Xapianc::ValueIterator_inc", _wrap_ValueIterator_inc},
{"Xapianc::new_Document", _wrap_new_Document},
{"Xapianc::delete_Document", _wrap_delete_Document},
{"Xapianc::Document_get_value", _wrap_Document_get_value},
{"Xapianc::Document_add_value", _wrap_Document_add_value},
{"Xapianc::Document_remove_value", _wrap_Document_remove_value},
{"Xapianc::Document_clear_values", _wrap_Document_clear_values},
{"Xapianc::Document_get_data", _wrap_Document_get_data},
{"Xapianc::Document_set_data", _wrap_Document_set_data},
{"Xapianc::Document_add_posting", _wrap_Document_add_posting},
{"Xapianc::Document_add_term", _wrap_Document_add_term},
{"Xapianc::Document_add_boolean_term", _wrap_Document_add_boolean_term},
{"Xapianc::Document_remove_posting", _wrap_Document_remove_posting},
{"Xapianc::Document_remove_postings", _wrap_Document_remove_postings},
{"Xapianc::Document_remove_term", _wrap_Document_remove_term},
{"Xapianc::Document_clear_terms", _wrap_Document_clear_terms},
{"Xapianc::Document_termlist_count", _wrap_Document_termlist_count},
{"Xapianc::Document_termlist_begin", _wrap_Document_termlist_begin},
{"Xapianc::Document_termlist_end", _wrap_Document_termlist_end},
{"Xapianc::Document_values_count", _wrap_Document_values_count},
{"Xapianc::Document_values_begin", _wrap_Document_values_begin},
{"Xapianc::Document_values_end", _wrap_Document_values_end},
{"Xapianc::Document_get_docid", _wrap_Document_get_docid},
{"Xapianc::Document_serialise", _wrap_Document_serialise},
{"Xapianc::Document_unserialise", _wrap_Document_unserialise},
{"Xapianc::Document_get_description", _wrap_Document_get_description},
{"Xapianc::new_Registry", _wrap_new_Registry},
{"Xapianc::delete_Registry", _wrap_delete_Registry},
{"Xapianc::Registry_register_weighting_scheme", _wrap_Registry_register_weighting_scheme},
{"Xapianc::Registry_get_weighting_scheme", _wrap_Registry_get_weighting_scheme},
{"Xapianc::Registry_register_posting_source", _wrap_Registry_register_posting_source},
{"Xapianc::Registry_get_posting_source", _wrap_Registry_get_posting_source},
{"Xapianc::Registry_register_match_spy", _wrap_Registry_register_match_spy},
{"Xapianc::Registry_get_match_spy", _wrap_Registry_get_match_spy},
{"Xapianc::Registry_register_lat_long_metric", _wrap_Registry_register_lat_long_metric},
{"Xapianc::Registry_get_lat_long_metric", _wrap_Registry_get_lat_long_metric},
{"Xapianc::delete_Query", _wrap_delete_Query},
{"Xapianc::Query_get_terms_begin", _wrap_Query_get_terms_begin},
{"Xapianc::Query_get_terms_end", _wrap_Query_get_terms_end},
{"Xapianc::Query_get_unique_terms_begin", _wrap_Query_get_unique_terms_begin},
{"Xapianc::Query_get_unique_terms_end", _wrap_Query_get_unique_terms_end},
{"Xapianc::Query_get_length", _wrap_Query_get_length},
{"Xapianc::Query_empty", _wrap_Query_empty},
{"Xapianc::Query_serialise", _wrap_Query_serialise},
{"Xapianc::Query_unserialise", _wrap_Query_unserialise},
{"Xapianc::Query_get_type", _wrap_Query_get_type},
{"Xapianc::Query_get_num_subqueries", _wrap_Query_get_num_subqueries},
{"Xapianc::Query_get_subquery", _wrap_Query_get_subquery},
{"Xapianc::Query_get_description", _wrap_Query_get_description},
{"Xapianc::new_Query", _wrap_new_Query},
{"Xapianc::new_Stem", _wrap_new_Stem},
{"Xapianc::delete_Stem", _wrap_delete_Stem},
{"Xapianc::Stem___call__", _wrap_Stem___call__},
{"Xapianc::Stem_is_none", _wrap_Stem_is_none},
{"Xapianc::Stem_get_description", _wrap_Stem_get_description},
{"Xapianc::Stem_get_available_languages", _wrap_Stem_get_available_languages},
{"Xapianc::Stem_stem_word", _wrap_Stem_stem_word},
{"Xapianc::new_TermGenerator", _wrap_new_TermGenerator},
{"Xapianc::delete_TermGenerator", _wrap_delete_TermGenerator},
{"Xapianc::TermGenerator_set_stemmer", _wrap_TermGenerator_set_stemmer},
{"Xapianc::TermGenerator_set_stopper", _wrap_TermGenerator_set_stopper},
{"Xapianc::TermGenerator_set_document", _wrap_TermGenerator_set_document},
{"Xapianc::TermGenerator_get_document", _wrap_TermGenerator_get_document},
{"Xapianc::TermGenerator_set_database", _wrap_TermGenerator_set_database},
{"Xapianc::TermGenerator_set_flags", _wrap_TermGenerator_set_flags},
{"Xapianc::TermGenerator_set_stemming_strategy", _wrap_TermGenerator_set_stemming_strategy},
{"Xapianc::TermGenerator_set_stopper_strategy", _wrap_TermGenerator_set_stopper_strategy},
{"Xapianc::TermGenerator_set_max_word_length", _wrap_TermGenerator_set_max_word_length},
{"Xapianc::TermGenerator_index_text", _wrap_TermGenerator_index_text},
{"Xapianc::TermGenerator_index_text_without_positions", _wrap_TermGenerator_index_text_without_positions},
{"Xapianc::TermGenerator_increase_termpos", _wrap_TermGenerator_increase_termpos},
{"Xapianc::TermGenerator_get_termpos", _wrap_TermGenerator_get_termpos},
{"Xapianc::TermGenerator_set_termpos", _wrap_TermGenerator_set_termpos},
{"Xapianc::TermGenerator_get_description", _wrap_TermGenerator_get_description},
{"Xapianc::new_MSet", _wrap_new_MSet},
{"Xapianc::delete_MSet", _wrap_delete_MSet},
{"Xapianc::MSet_convert_to_percent", _wrap_MSet_convert_to_percent},
{"Xapianc::MSet_get_termfreq", _wrap_MSet_get_termfreq},
{"Xapianc::MSet_get_termweight", _wrap_MSet_get_termweight},
{"Xapianc::MSet_get_firstitem", _wrap_MSet_get_firstitem},
{"Xapianc::MSet_get_matches_lower_bound", _wrap_MSet_get_matches_lower_bound},
{"Xapianc::MSet_get_matches_estimated", _wrap_MSet_get_matches_estimated},
{"Xapianc::MSet_get_matches_upper_bound", _wrap_MSet_get_matches_upper_bound},
{"Xapianc::MSet_get_uncollapsed_matches_lower_bound", _wrap_MSet_get_uncollapsed_matches_lower_bound},
{"Xapianc::MSet_get_uncollapsed_matches_estimated", _wrap_MSet_get_uncollapsed_matches_estimated},
{"Xapianc::MSet_get_uncollapsed_matches_upper_bound", _wrap_MSet_get_uncollapsed_matches_upper_bound},
{"Xapianc::MSet_get_max_attained", _wrap_MSet_get_max_attained},
{"Xapianc::MSet_get_max_possible", _wrap_MSet_get_max_possible},
{"Xapianc::MSet_snippet", _wrap_MSet_snippet},
{"Xapianc::MSet_fetch", _wrap_MSet_fetch},
{"Xapianc::MSet_size", _wrap_MSet_size},
{"Xapianc::MSet_empty", _wrap_MSet_empty},
{"Xapianc::MSet_begin", _wrap_MSet_begin},
{"Xapianc::MSet_end", _wrap_MSet_end},
{"Xapianc::MSet_back", _wrap_MSet_back},
{"Xapianc::MSet_get_description", _wrap_MSet_get_description},
{"Xapianc::MSet_FETCH", _wrap_MSet_FETCH},
{"Xapianc::MSet_get_docid", _wrap_MSet_get_docid},
{"Xapianc::MSet_get_document", _wrap_MSet_get_document},
{"Xapianc::MSet_get_hit", _wrap_MSet_get_hit},
{"Xapianc::MSet_get_document_percentage", _wrap_MSet_get_document_percentage},
{"Xapianc::MSetIterator_mset_set", _wrap_MSetIterator_mset_set},
{"Xapianc::MSetIterator_mset_get", _wrap_MSetIterator_mset_get},
{"Xapianc::MSetIterator_off_from_end_set", _wrap_MSetIterator_off_from_end_set},
{"Xapianc::MSetIterator_off_from_end_get", _wrap_MSetIterator_off_from_end_get},
{"Xapianc::new_MSetIterator", _wrap_new_MSetIterator},
{"Xapianc::MSetIterator_get_rank", _wrap_MSetIterator_get_rank},
{"Xapianc::MSetIterator_get_document", _wrap_MSetIterator_get_document},
{"Xapianc::MSetIterator_get_weight", _wrap_MSetIterator_get_weight},
{"Xapianc::MSetIterator_get_collapse_key", _wrap_MSetIterator_get_collapse_key},
{"Xapianc::MSetIterator_get_collapse_count", _wrap_MSetIterator_get_collapse_count},
{"Xapianc::MSetIterator_get_sort_key", _wrap_MSetIterator_get_sort_key},
{"Xapianc::MSetIterator_get_percent", _wrap_MSetIterator_get_percent},
{"Xapianc::MSetIterator_get_description", _wrap_MSetIterator_get_description},
{"Xapianc::MSetIterator_equal", _wrap_MSetIterator_equal},
{"Xapianc::MSetIterator_nequal", _wrap_MSetIterator_nequal},
{"Xapianc::MSetIterator_get_docid", _wrap_MSetIterator_get_docid},
{"Xapianc::MSetIterator_inc", _wrap_MSetIterator_inc},
{"Xapianc::MSetIterator_dec", _wrap_MSetIterator_dec},
{"Xapianc::delete_MSetIterator", _wrap_delete_MSetIterator},
{"Xapianc::new_ESet", _wrap_new_ESet},
{"Xapianc::delete_ESet", _wrap_delete_ESet},
{"Xapianc::ESet_size", _wrap_ESet_size},
{"Xapianc::ESet_empty", _wrap_ESet_empty},
{"Xapianc::ESet_get_ebound", _wrap_ESet_get_ebound},
{"Xapianc::ESet_begin", _wrap_ESet_begin},
{"Xapianc::ESet_end", _wrap_ESet_end},
{"Xapianc::ESet_back", _wrap_ESet_back},
{"Xapianc::ESet_get_description", _wrap_ESet_get_description},
{"Xapianc::ESet_FETCH", _wrap_ESet_FETCH},
{"Xapianc::ESetIterator_eset_set", _wrap_ESetIterator_eset_set},
{"Xapianc::ESetIterator_eset_get", _wrap_ESetIterator_eset_get},
{"Xapianc::ESetIterator_off_from_end_set", _wrap_ESetIterator_off_from_end_set},
{"Xapianc::ESetIterator_off_from_end_get", _wrap_ESetIterator_off_from_end_get},
{"Xapianc::new_ESetIterator", _wrap_new_ESetIterator},
{"Xapianc::ESetIterator_get_weight", _wrap_ESetIterator_get_weight},
{"Xapianc::ESetIterator_get_description", _wrap_ESetIterator_get_description},
{"Xapianc::ESetIterator_get_termname", _wrap_ESetIterator_get_termname},
{"Xapianc::ESetIterator_equal", _wrap_ESetIterator_equal},
{"Xapianc::ESetIterator_nequal", _wrap_ESetIterator_nequal},
{"Xapianc::ESetIterator_get_term", _wrap_ESetIterator_get_term},
{"Xapianc::ESetIterator_inc", _wrap_ESetIterator_inc},
{"Xapianc::ESetIterator_dec", _wrap_ESetIterator_dec},
{"Xapianc::delete_ESetIterator", _wrap_delete_ESetIterator},
{"Xapianc::__eq__", _wrap___eq__},
{"Xapianc::__lt__", _wrap___lt__},
{"Xapianc::__gt__", _wrap___gt__},
{"Xapianc::__ge__", _wrap___ge__},
{"Xapianc::__le__", _wrap___le__},
{"Xapianc::__add__", _wrap___add__},
{"Xapianc::new_RSet", _wrap_new_RSet},
{"Xapianc::delete_RSet", _wrap_delete_RSet},
{"Xapianc::RSet_size", _wrap_RSet_size},
{"Xapianc::RSet_empty", _wrap_RSet_empty},
{"Xapianc::RSet_add_document", _wrap_RSet_add_document},
{"Xapianc::RSet_remove_document", _wrap_RSet_remove_document},
{"Xapianc::RSet_contains", _wrap_RSet_contains},
{"Xapianc::RSet_get_description", _wrap_RSet_get_description},
{"Xapianc::MatchDecider___call__", _wrap_MatchDecider___call__},
{"Xapianc::delete_MatchDecider", _wrap_delete_MatchDecider},
{"Xapianc::new_Enquire", _wrap_new_Enquire},
{"Xapianc::delete_Enquire", _wrap_delete_Enquire},
{"Xapianc::Enquire_set_query", _wrap_Enquire_set_query},
{"Xapianc::Enquire_get_query", _wrap_Enquire_get_query},
{"Xapianc::Enquire_add_matchspy", _wrap_Enquire_add_matchspy},
{"Xapianc::Enquire_clear_matchspies", _wrap_Enquire_clear_matchspies},
{"Xapianc::Enquire_set_weighting_scheme", _wrap_Enquire_set_weighting_scheme},
{"Xapianc::Enquire_set_expansion_scheme", _wrap_Enquire_set_expansion_scheme},
{"Xapianc::Enquire_set_collapse_key", _wrap_Enquire_set_collapse_key},
{"Xapianc::Enquire_set_docid_order", _wrap_Enquire_set_docid_order},
{"Xapianc::Enquire_set_cutoff", _wrap_Enquire_set_cutoff},
{"Xapianc::Enquire_set_sort_by_relevance", _wrap_Enquire_set_sort_by_relevance},
{"Xapianc::Enquire_set_sort_by_value", _wrap_Enquire_set_sort_by_value},
{"Xapianc::Enquire_set_sort_by_key", _wrap_Enquire_set_sort_by_key},
{"Xapianc::Enquire_set_sort_by_value_then_relevance", _wrap_Enquire_set_sort_by_value_then_relevance},
{"Xapianc::Enquire_set_sort_by_key_then_relevance", _wrap_Enquire_set_sort_by_key_then_relevance},
{"Xapianc::Enquire_set_sort_by_relevance_then_value", _wrap_Enquire_set_sort_by_relevance_then_value},
{"Xapianc::Enquire_set_sort_by_relevance_then_key", _wrap_Enquire_set_sort_by_relevance_then_key},
{"Xapianc::Enquire_set_time_limit", _wrap_Enquire_set_time_limit},
{"Xapianc::Enquire_get_eset", _wrap_Enquire_get_eset},
{"Xapianc::Enquire_get_matching_terms_begin", _wrap_Enquire_get_matching_terms_begin},
{"Xapianc::Enquire_get_matching_terms_end", _wrap_Enquire_get_matching_terms_end},
{"Xapianc::Enquire_get_description", _wrap_Enquire_get_description},
{"Xapianc::Enquire_get_mset", _wrap_Enquire_get_mset},
{"Xapianc::ExpandDecider___call__", _wrap_ExpandDecider___call__},
{"Xapianc::delete_ExpandDecider", _wrap_delete_ExpandDecider},
{"Xapianc::ExpandDecider_release", _wrap_ExpandDecider_release},
{"Xapianc::new_ExpandDeciderAnd", _wrap_new_ExpandDeciderAnd},
{"Xapianc::ExpandDeciderAnd___call__", _wrap_ExpandDeciderAnd___call__},
{"Xapianc::delete_ExpandDeciderAnd", _wrap_delete_ExpandDeciderAnd},
{"Xapianc::new_ExpandDeciderFilterPrefix", _wrap_new_ExpandDeciderFilterPrefix},
{"Xapianc::ExpandDeciderFilterPrefix___call__", _wrap_ExpandDeciderFilterPrefix___call__},
{"Xapianc::delete_ExpandDeciderFilterPrefix", _wrap_delete_ExpandDeciderFilterPrefix},
{"Xapianc::KeyMaker___call__", _wrap_KeyMaker___call__},
{"Xapianc::delete_KeyMaker", _wrap_delete_KeyMaker},
{"Xapianc::KeyMaker_release", _wrap_KeyMaker_release},
{"Xapianc::new_MultiValueKeyMaker", _wrap_new_MultiValueKeyMaker},
{"Xapianc::MultiValueKeyMaker___call__", _wrap_MultiValueKeyMaker___call__},
{"Xapianc::MultiValueKeyMaker_add_value", _wrap_MultiValueKeyMaker_add_value},
{"Xapianc::delete_MultiValueKeyMaker", _wrap_delete_MultiValueKeyMaker},
{"Xapianc::Stopper___call__", _wrap_Stopper___call__},
{"Xapianc::delete_Stopper", _wrap_delete_Stopper},
{"Xapianc::Stopper_get_description", _wrap_Stopper_get_description},
{"Xapianc::Stopper_release", _wrap_Stopper_release},
{"Xapianc::SimpleStopper_add", _wrap_SimpleStopper_add},
{"Xapianc::SimpleStopper___call__", _wrap_SimpleStopper___call__},
{"Xapianc::SimpleStopper_get_description", _wrap_SimpleStopper_get_description},
{"Xapianc::SimpleStopper_stop_word", _wrap_SimpleStopper_stop_word},
{"Xapianc::new_SimpleStopper", _wrap_new_SimpleStopper},
{"Xapianc::delete_SimpleStopper", _wrap_delete_SimpleStopper},
{"Xapianc::new_RangeProcessor", _wrap_new_RangeProcessor},
{"Xapianc::delete_RangeProcessor", _wrap_delete_RangeProcessor},
{"Xapianc::RangeProcessor_check_range", _wrap_RangeProcessor_check_range},
{"Xapianc::RangeProcessor___call__", _wrap_RangeProcessor___call__},
{"Xapianc::RangeProcessor_release", _wrap_RangeProcessor_release},
{"Xapianc::new_DateRangeProcessor", _wrap_new_DateRangeProcessor},
{"Xapianc::DateRangeProcessor___call__", _wrap_DateRangeProcessor___call__},
{"Xapianc::delete_DateRangeProcessor", _wrap_delete_DateRangeProcessor},
{"Xapianc::new_NumberRangeProcessor", _wrap_new_NumberRangeProcessor},
{"Xapianc::NumberRangeProcessor___call__", _wrap_NumberRangeProcessor___call__},
{"Xapianc::delete_NumberRangeProcessor", _wrap_delete_NumberRangeProcessor},
{"Xapianc::delete_ValueRangeProcessor", _wrap_delete_ValueRangeProcessor},
{"Xapianc::ValueRangeProcessor___call__", _wrap_ValueRangeProcessor___call__},
{"Xapianc::ValueRangeProcessor_release", _wrap_ValueRangeProcessor_release},
{"Xapianc::new_StringValueRangeProcessor", _wrap_new_StringValueRangeProcessor},
{"Xapianc::StringValueRangeProcessor___call__", _wrap_StringValueRangeProcessor___call__},
{"Xapianc::delete_StringValueRangeProcessor", _wrap_delete_StringValueRangeProcessor},
{"Xapianc::new_DateValueRangeProcessor", _wrap_new_DateValueRangeProcessor},
{"Xapianc::DateValueRangeProcessor___call__", _wrap_DateValueRangeProcessor___call__},
{"Xapianc::delete_DateValueRangeProcessor", _wrap_delete_DateValueRangeProcessor},
{"Xapianc::new_NumberValueRangeProcessor", _wrap_new_NumberValueRangeProcessor},
{"Xapianc::NumberValueRangeProcessor___call__", _wrap_NumberValueRangeProcessor___call__},
{"Xapianc::delete_NumberValueRangeProcessor", _wrap_delete_NumberValueRangeProcessor},
{"Xapianc::delete_FieldProcessor", _wrap_delete_FieldProcessor},
{"Xapianc::FieldProcessor___call__", _wrap_FieldProcessor___call__},
{"Xapianc::FieldProcessor_release", _wrap_FieldProcessor_release},
{"Xapianc::new_QueryParser", _wrap_new_QueryParser},
{"Xapianc::delete_QueryParser", _wrap_delete_QueryParser},
{"Xapianc::QueryParser_set_stemmer", _wrap_QueryParser_set_stemmer},
{"Xapianc::QueryParser_set_stemming_strategy", _wrap_QueryParser_set_stemming_strategy},
{"Xapianc::QueryParser_set_stopper", _wrap_QueryParser_set_stopper},
{"Xapianc::QueryParser_set_default_op", _wrap_QueryParser_set_default_op},
{"Xapianc::QueryParser_get_default_op", _wrap_QueryParser_get_default_op},
{"Xapianc::QueryParser_set_database", _wrap_QueryParser_set_database},
{"Xapianc::QueryParser_set_max_expansion", _wrap_QueryParser_set_max_expansion},
{"Xapianc::QueryParser_set_max_wildcard_expansion", _wrap_QueryParser_set_max_wildcard_expansion},
{"Xapianc::QueryParser_parse_query", _wrap_QueryParser_parse_query},
{"Xapianc::QueryParser_add_prefix", _wrap_QueryParser_add_prefix},
{"Xapianc::QueryParser_add_boolean_prefix", _wrap_QueryParser_add_boolean_prefix},
{"Xapianc::QueryParser_stoplist_begin", _wrap_QueryParser_stoplist_begin},
{"Xapianc::QueryParser_stoplist_end", _wrap_QueryParser_stoplist_end},
{"Xapianc::QueryParser_unstem_begin", _wrap_QueryParser_unstem_begin},
{"Xapianc::QueryParser_unstem_end", _wrap_QueryParser_unstem_end},
{"Xapianc::QueryParser_add_rangeprocessor", _wrap_QueryParser_add_rangeprocessor},
{"Xapianc::QueryParser_add_valuerangeprocessor", _wrap_QueryParser_add_valuerangeprocessor},
{"Xapianc::QueryParser_get_corrected_query_string", _wrap_QueryParser_get_corrected_query_string},
{"Xapianc::QueryParser_get_description", _wrap_QueryParser_get_description},
{"Xapianc::sortable_serialise", _wrap_sortable_serialise},
{"Xapianc::sortable_unserialise", _wrap_sortable_unserialise},
{"Xapianc::new_ValueSetMatchDecider", _wrap_new_ValueSetMatchDecider},
{"Xapianc::ValueSetMatchDecider_add_value", _wrap_ValueSetMatchDecider_add_value},
{"Xapianc::ValueSetMatchDecider_remove_value", _wrap_ValueSetMatchDecider_remove_value},
{"Xapianc::ValueSetMatchDecider___call__", _wrap_ValueSetMatchDecider___call__},
{"Xapianc::delete_ValueSetMatchDecider", _wrap_delete_ValueSetMatchDecider},
{"Xapianc::delete_Weight", _wrap_delete_Weight},
{"Xapianc::Weight_name", _wrap_Weight_name},
{"Xapianc::Weight_get_sumpart", _wrap_Weight_get_sumpart},
{"Xapianc::Weight_get_maxpart", _wrap_Weight_get_maxpart},
{"Xapianc::Weight_get_sumextra", _wrap_Weight_get_sumextra},
{"Xapianc::Weight_get_maxextra", _wrap_Weight_get_maxextra},
{"Xapianc::new_BoolWeight", _wrap_new_BoolWeight},
{"Xapianc::BoolWeight_name", _wrap_BoolWeight_name},
{"Xapianc::BoolWeight_get_sumpart", _wrap_BoolWeight_get_sumpart},
{"Xapianc::BoolWeight_get_maxpart", _wrap_BoolWeight_get_maxpart},
{"Xapianc::BoolWeight_get_sumextra", _wrap_BoolWeight_get_sumextra},
{"Xapianc::BoolWeight_get_maxextra", _wrap_BoolWeight_get_maxextra},
{"Xapianc::delete_BoolWeight", _wrap_delete_BoolWeight},
{"Xapianc::new_TfIdfWeight", _wrap_new_TfIdfWeight},
{"Xapianc::TfIdfWeight_name", _wrap_TfIdfWeight_name},
{"Xapianc::TfIdfWeight_get_sumpart", _wrap_TfIdfWeight_get_sumpart},
{"Xapianc::TfIdfWeight_get_maxpart", _wrap_TfIdfWeight_get_maxpart},
{"Xapianc::TfIdfWeight_get_sumextra", _wrap_TfIdfWeight_get_sumextra},
{"Xapianc::TfIdfWeight_get_maxextra", _wrap_TfIdfWeight_get_maxextra},
{"Xapianc::delete_TfIdfWeight", _wrap_delete_TfIdfWeight},
{"Xapianc::new_BM25Weight", _wrap_new_BM25Weight},
{"Xapianc::BM25Weight_name", _wrap_BM25Weight_name},
{"Xapianc::BM25Weight_get_sumpart", _wrap_BM25Weight_get_sumpart},
{"Xapianc::BM25Weight_get_maxpart", _wrap_BM25Weight_get_maxpart},
{"Xapianc::BM25Weight_get_sumextra", _wrap_BM25Weight_get_sumextra},
{"Xapianc::BM25Weight_get_maxextra", _wrap_BM25Weight_get_maxextra},
{"Xapianc::delete_BM25Weight", _wrap_delete_BM25Weight},
{"Xapianc::new_BM25PlusWeight", _wrap_new_BM25PlusWeight},
{"Xapianc::BM25PlusWeight_name", _wrap_BM25PlusWeight_name},
{"Xapianc::BM25PlusWeight_get_sumpart", _wrap_BM25PlusWeight_get_sumpart},
{"Xapianc::BM25PlusWeight_get_maxpart", _wrap_BM25PlusWeight_get_maxpart},
{"Xapianc::BM25PlusWeight_get_sumextra", _wrap_BM25PlusWeight_get_sumextra},
{"Xapianc::BM25PlusWeight_get_maxextra", _wrap_BM25PlusWeight_get_maxextra},
{"Xapianc::delete_BM25PlusWeight", _wrap_delete_BM25PlusWeight},
{"Xapianc::new_TradWeight", _wrap_new_TradWeight},
{"Xapianc::TradWeight_name", _wrap_TradWeight_name},
{"Xapianc::TradWeight_get_sumpart", _wrap_TradWeight_get_sumpart},
{"Xapianc::TradWeight_get_maxpart", _wrap_TradWeight_get_maxpart},
{"Xapianc::TradWeight_get_sumextra", _wrap_TradWeight_get_sumextra},
{"Xapianc::TradWeight_get_maxextra", _wrap_TradWeight_get_maxextra},
{"Xapianc::delete_TradWeight", _wrap_delete_TradWeight},
{"Xapianc::new_InL2Weight", _wrap_new_InL2Weight},
{"Xapianc::InL2Weight_name", _wrap_InL2Weight_name},
{"Xapianc::InL2Weight_get_sumpart", _wrap_InL2Weight_get_sumpart},
{"Xapianc::InL2Weight_get_maxpart", _wrap_InL2Weight_get_maxpart},
{"Xapianc::InL2Weight_get_sumextra", _wrap_InL2Weight_get_sumextra},
{"Xapianc::InL2Weight_get_maxextra", _wrap_InL2Weight_get_maxextra},
{"Xapianc::delete_InL2Weight", _wrap_delete_InL2Weight},
{"Xapianc::new_IfB2Weight", _wrap_new_IfB2Weight},
{"Xapianc::IfB2Weight_name", _wrap_IfB2Weight_name},
{"Xapianc::IfB2Weight_get_sumpart", _wrap_IfB2Weight_get_sumpart},
{"Xapianc::IfB2Weight_get_maxpart", _wrap_IfB2Weight_get_maxpart},
{"Xapianc::IfB2Weight_get_sumextra", _wrap_IfB2Weight_get_sumextra},
{"Xapianc::IfB2Weight_get_maxextra", _wrap_IfB2Weight_get_maxextra},
{"Xapianc::delete_IfB2Weight", _wrap_delete_IfB2Weight},
{"Xapianc::new_IneB2Weight", _wrap_new_IneB2Weight},
{"Xapianc::IneB2Weight_name", _wrap_IneB2Weight_name},
{"Xapianc::IneB2Weight_get_sumpart", _wrap_IneB2Weight_get_sumpart},
{"Xapianc::IneB2Weight_get_maxpart", _wrap_IneB2Weight_get_maxpart},
{"Xapianc::IneB2Weight_get_sumextra", _wrap_IneB2Weight_get_sumextra},
{"Xapianc::IneB2Weight_get_maxextra", _wrap_IneB2Weight_get_maxextra},
{"Xapianc::delete_IneB2Weight", _wrap_delete_IneB2Weight},
{"Xapianc::new_BB2Weight", _wrap_new_BB2Weight},
{"Xapianc::BB2Weight_name", _wrap_BB2Weight_name},
{"Xapianc::BB2Weight_get_sumpart", _wrap_BB2Weight_get_sumpart},
{"Xapianc::BB2Weight_get_maxpart", _wrap_BB2Weight_get_maxpart},
{"Xapianc::BB2Weight_get_sumextra", _wrap_BB2Weight_get_sumextra},
{"Xapianc::BB2Weight_get_maxextra", _wrap_BB2Weight_get_maxextra},
{"Xapianc::delete_BB2Weight", _wrap_delete_BB2Weight},
{"Xapianc::new_DLHWeight", _wrap_new_DLHWeight},
{"Xapianc::DLHWeight_name", _wrap_DLHWeight_name},
{"Xapianc::DLHWeight_get_sumpart", _wrap_DLHWeight_get_sumpart},
{"Xapianc::DLHWeight_get_maxpart", _wrap_DLHWeight_get_maxpart},
{"Xapianc::DLHWeight_get_sumextra", _wrap_DLHWeight_get_sumextra},
{"Xapianc::DLHWeight_get_maxextra", _wrap_DLHWeight_get_maxextra},
{"Xapianc::delete_DLHWeight", _wrap_delete_DLHWeight},
{"Xapianc::new_PL2Weight", _wrap_new_PL2Weight},
{"Xapianc::PL2Weight_name", _wrap_PL2Weight_name},
{"Xapianc::PL2Weight_get_sumpart", _wrap_PL2Weight_get_sumpart},
{"Xapianc::PL2Weight_get_maxpart", _wrap_PL2Weight_get_maxpart},
{"Xapianc::PL2Weight_get_sumextra", _wrap_PL2Weight_get_sumextra},
{"Xapianc::PL2Weight_get_maxextra", _wrap_PL2Weight_get_maxextra},
{"Xapianc::delete_PL2Weight", _wrap_delete_PL2Weight},
{"Xapianc::new_PL2PlusWeight", _wrap_new_PL2PlusWeight},
{"Xapianc::PL2PlusWeight_name", _wrap_PL2PlusWeight_name},
{"Xapianc::PL2PlusWeight_get_sumpart", _wrap_PL2PlusWeight_get_sumpart},
{"Xapianc::PL2PlusWeight_get_maxpart", _wrap_PL2PlusWeight_get_maxpart},
{"Xapianc::PL2PlusWeight_get_sumextra", _wrap_PL2PlusWeight_get_sumextra},
{"Xapianc::PL2PlusWeight_get_maxextra", _wrap_PL2PlusWeight_get_maxextra},
{"Xapianc::delete_PL2PlusWeight", _wrap_delete_PL2PlusWeight},
{"Xapianc::new_DPHWeight", _wrap_new_DPHWeight},
{"Xapianc::DPHWeight_name", _wrap_DPHWeight_name},
{"Xapianc::DPHWeight_get_sumpart", _wrap_DPHWeight_get_sumpart},
{"Xapianc::DPHWeight_get_maxpart", _wrap_DPHWeight_get_maxpart},
{"Xapianc::DPHWeight_get_sumextra", _wrap_DPHWeight_get_sumextra},
{"Xapianc::DPHWeight_get_maxextra", _wrap_DPHWeight_get_maxextra},
{"Xapianc::delete_DPHWeight", _wrap_delete_DPHWeight},
{"Xapianc::new_LMWeight", _wrap_new_LMWeight},
{"Xapianc::LMWeight_name", _wrap_LMWeight_name},
{"Xapianc::LMWeight_get_sumpart", _wrap_LMWeight_get_sumpart},
{"Xapianc::LMWeight_get_maxpart", _wrap_LMWeight_get_maxpart},
{"Xapianc::LMWeight_get_sumextra", _wrap_LMWeight_get_sumextra},
{"Xapianc::LMWeight_get_maxextra", _wrap_LMWeight_get_maxextra},
{"Xapianc::delete_LMWeight", _wrap_delete_LMWeight},
{"Xapianc::CoordWeight_init", _wrap_CoordWeight_init},
{"Xapianc::new_CoordWeight", _wrap_new_CoordWeight},
{"Xapianc::CoordWeight_name", _wrap_CoordWeight_name},
{"Xapianc::CoordWeight_get_sumpart", _wrap_CoordWeight_get_sumpart},
{"Xapianc::CoordWeight_get_maxpart", _wrap_CoordWeight_get_maxpart},
{"Xapianc::CoordWeight_get_sumextra", _wrap_CoordWeight_get_sumextra},
{"Xapianc::CoordWeight_get_maxextra", _wrap_CoordWeight_get_maxextra},
{"Xapianc::delete_CoordWeight", _wrap_delete_CoordWeight},
{"Xapianc::new_Compactor", _wrap_new_Compactor},
{"Xapianc::delete_Compactor", _wrap_delete_Compactor},
{"Xapianc::Compactor_set_block_size", _wrap_Compactor_set_block_size},
{"Xapianc::Compactor_set_renumber", _wrap_Compactor_set_renumber},
{"Xapianc::Compactor_set_multipass", _wrap_Compactor_set_multipass},
{"Xapianc::Compactor_set_compaction_level", _wrap_Compactor_set_compaction_level},
{"Xapianc::Compactor_set_destdir", _wrap_Compactor_set_destdir},
{"Xapianc::Compactor_add_source", _wrap_Compactor_add_source},
{"Xapianc::Compactor_compact", _wrap_Compactor_compact},
{"Xapianc::Compactor_set_status", _wrap_Compactor_set_status},
{"Xapianc::Compactor_resolve_duplicate_metadata", _wrap_Compactor_resolve_duplicate_metadata},
{"Xapianc::delete_PostingSource", _wrap_delete_PostingSource},
{"Xapianc::PostingSource_get_termfreq_min", _wrap_PostingSource_get_termfreq_min},
{"Xapianc::PostingSource_get_termfreq_est", _wrap_PostingSource_get_termfreq_est},
{"Xapianc::PostingSource_get_termfreq_max", _wrap_PostingSource_get_termfreq_max},
{"Xapianc::PostingSource_set_maxweight", _wrap_PostingSource_set_maxweight},
{"Xapianc::PostingSource_get_maxweight", _wrap_PostingSource_get_maxweight},
{"Xapianc::PostingSource_get_weight", _wrap_PostingSource_get_weight},
{"Xapianc::PostingSource_get_docid", _wrap_PostingSource_get_docid},
{"Xapianc::PostingSource_increment_weight", _wrap_PostingSource_increment_weight},
{"Xapianc::PostingSource_skip_to", _wrap_PostingSource_skip_to},
{"Xapianc::PostingSource_check", _wrap_PostingSource_check},
{"Xapianc::PostingSource_at_end", _wrap_PostingSource_at_end},
{"Xapianc::PostingSource_name", _wrap_PostingSource_name},
{"Xapianc::PostingSource_init", _wrap_PostingSource_init},
{"Xapianc::PostingSource_get_description", _wrap_PostingSource_get_description},
{"Xapianc::PostingSource_release", _wrap_PostingSource_release},
{"Xapianc::new_ValuePostingSource", _wrap_new_ValuePostingSource},
{"Xapianc::ValuePostingSource_get_termfreq_min", _wrap_ValuePostingSource_get_termfreq_min},
{"Xapianc::ValuePostingSource_get_termfreq_est", _wrap_ValuePostingSource_get_termfreq_est},
{"Xapianc::ValuePostingSource_get_termfreq_max", _wrap_ValuePostingSource_get_termfreq_max},
{"Xapianc::ValuePostingSource_increment_weight", _wrap_ValuePostingSource_increment_weight},
{"Xapianc::ValuePostingSource_skip_to", _wrap_ValuePostingSource_skip_to},
{"Xapianc::ValuePostingSource_check", _wrap_ValuePostingSource_check},
{"Xapianc::ValuePostingSource_at_end", _wrap_ValuePostingSource_at_end},
{"Xapianc::ValuePostingSource_get_docid", _wrap_ValuePostingSource_get_docid},
{"Xapianc::ValuePostingSource_init", _wrap_ValuePostingSource_init},
{"Xapianc::ValuePostingSource_get_database", _wrap_ValuePostingSource_get_database},
{"Xapianc::ValuePostingSource_get_slot", _wrap_ValuePostingSource_get_slot},
{"Xapianc::ValuePostingSource_get_value", _wrap_ValuePostingSource_get_value},
{"Xapianc::ValuePostingSource_done", _wrap_ValuePostingSource_done},
{"Xapianc::ValuePostingSource_get_started", _wrap_ValuePostingSource_get_started},
{"Xapianc::ValuePostingSource_set_termfreq_min", _wrap_ValuePostingSource_set_termfreq_min},
{"Xapianc::ValuePostingSource_set_termfreq_est", _wrap_ValuePostingSource_set_termfreq_est},
{"Xapianc::ValuePostingSource_set_termfreq_max", _wrap_ValuePostingSource_set_termfreq_max},
{"Xapianc::delete_ValuePostingSource", _wrap_delete_ValuePostingSource},
{"Xapianc::new_ValueWeightPostingSource", _wrap_new_ValueWeightPostingSource},
{"Xapianc::ValueWeightPostingSource_get_weight", _wrap_ValueWeightPostingSource_get_weight},
{"Xapianc::ValueWeightPostingSource_name", _wrap_ValueWeightPostingSource_name},
{"Xapianc::ValueWeightPostingSource_init", _wrap_ValueWeightPostingSource_init},
{"Xapianc::ValueWeightPostingSource_get_description", _wrap_ValueWeightPostingSource_get_description},
{"Xapianc::delete_ValueWeightPostingSource", _wrap_delete_ValueWeightPostingSource},
{"Xapianc::new_DecreasingValueWeightPostingSource", _wrap_new_DecreasingValueWeightPostingSource},
{"Xapianc::DecreasingValueWeightPostingSource_get_weight", _wrap_DecreasingValueWeightPostingSource_get_weight},
{"Xapianc::DecreasingValueWeightPostingSource_name", _wrap_DecreasingValueWeightPostingSource_name},
{"Xapianc::DecreasingValueWeightPostingSource_init", _wrap_DecreasingValueWeightPostingSource_init},
{"Xapianc::DecreasingValueWeightPostingSource_increment_weight", _wrap_DecreasingValueWeightPostingSource_increment_weight},
{"Xapianc::DecreasingValueWeightPostingSource_skip_to", _wrap_DecreasingValueWeightPostingSource_skip_to},
{"Xapianc::DecreasingValueWeightPostingSource_check", _wrap_DecreasingValueWeightPostingSource_check},
{"Xapianc::DecreasingValueWeightPostingSource_get_description", _wrap_DecreasingValueWeightPostingSource_get_description},
{"Xapianc::delete_DecreasingValueWeightPostingSource", _wrap_delete_DecreasingValueWeightPostingSource},
{"Xapianc::new_ValueMapPostingSource", _wrap_new_ValueMapPostingSource},
{"Xapianc::ValueMapPostingSource_add_mapping", _wrap_ValueMapPostingSource_add_mapping},
{"Xapianc::ValueMapPostingSource_clear_mappings", _wrap_ValueMapPostingSource_clear_mappings},
{"Xapianc::ValueMapPostingSource_set_default_weight", _wrap_ValueMapPostingSource_set_default_weight},
{"Xapianc::ValueMapPostingSource_get_weight", _wrap_ValueMapPostingSource_get_weight},
{"Xapianc::ValueMapPostingSource_name", _wrap_ValueMapPostingSource_name},
{"Xapianc::ValueMapPostingSource_init", _wrap_ValueMapPostingSource_init},
{"Xapianc::ValueMapPostingSource_get_description", _wrap_ValueMapPostingSource_get_description},
{"Xapianc::delete_ValueMapPostingSource", _wrap_delete_ValueMapPostingSource},
{"Xapianc::new_FixedWeightPostingSource", _wrap_new_FixedWeightPostingSource},
{"Xapianc::FixedWeightPostingSource_get_termfreq_min", _wrap_FixedWeightPostingSource_get_termfreq_min},
{"Xapianc::FixedWeightPostingSource_get_termfreq_est", _wrap_FixedWeightPostingSource_get_termfreq_est},
{"Xapianc::FixedWeightPostingSource_get_termfreq_max", _wrap_FixedWeightPostingSource_get_termfreq_max},
{"Xapianc::FixedWeightPostingSource_get_weight", _wrap_FixedWeightPostingSource_get_weight},
{"Xapianc::FixedWeightPostingSource_increment_weight", _wrap_FixedWeightPostingSource_increment_weight},
{"Xapianc::FixedWeightPostingSource_skip_to", _wrap_FixedWeightPostingSource_skip_to},
{"Xapianc::FixedWeightPostingSource_check", _wrap_FixedWeightPostingSource_check},
{"Xapianc::FixedWeightPostingSource_at_end", _wrap_FixedWeightPostingSource_at_end},
{"Xapianc::FixedWeightPostingSource_get_docid", _wrap_FixedWeightPostingSource_get_docid},
{"Xapianc::FixedWeightPostingSource_name", _wrap_FixedWeightPostingSource_name},
{"Xapianc::FixedWeightPostingSource_init", _wrap_FixedWeightPostingSource_init},
{"Xapianc::FixedWeightPostingSource_get_description", _wrap_FixedWeightPostingSource_get_description},
{"Xapianc::delete_FixedWeightPostingSource", _wrap_delete_FixedWeightPostingSource},
{"Xapianc::delete_MatchSpy", _wrap_delete_MatchSpy},
{"Xapianc::MatchSpy___call__", _wrap_MatchSpy___call__},
{"Xapianc::MatchSpy_name", _wrap_MatchSpy_name},
{"Xapianc::MatchSpy_merge_results", _wrap_MatchSpy_merge_results},
{"Xapianc::MatchSpy_get_description", _wrap_MatchSpy_get_description},
{"Xapianc::MatchSpy_release", _wrap_MatchSpy_release},
{"Xapianc::new_ValueCountMatchSpy", _wrap_new_ValueCountMatchSpy},
{"Xapianc::ValueCountMatchSpy_get_total", _wrap_ValueCountMatchSpy_get_total},
{"Xapianc::ValueCountMatchSpy_values_begin", _wrap_ValueCountMatchSpy_values_begin},
{"Xapianc::ValueCountMatchSpy_values_end", _wrap_ValueCountMatchSpy_values_end},
{"Xapianc::ValueCountMatchSpy_top_values_begin", _wrap_ValueCountMatchSpy_top_values_begin},
{"Xapianc::ValueCountMatchSpy_top_values_end", _wrap_ValueCountMatchSpy_top_values_end},
{"Xapianc::ValueCountMatchSpy___call__", _wrap_ValueCountMatchSpy___call__},
{"Xapianc::ValueCountMatchSpy_name", _wrap_ValueCountMatchSpy_name},
{"Xapianc::ValueCountMatchSpy_merge_results", _wrap_ValueCountMatchSpy_merge_results},
{"Xapianc::ValueCountMatchSpy_get_description", _wrap_ValueCountMatchSpy_get_description},
{"Xapianc::delete_ValueCountMatchSpy", _wrap_delete_ValueCountMatchSpy},
{"Xapianc::miles_to_metres", _wrap_miles_to_metres},
{"Xapianc::metres_to_miles", _wrap_metres_to_miles},
{"Xapianc::LatLongCoord_latitude_set", _wrap_LatLongCoord_latitude_set},
{"Xapianc::LatLongCoord_latitude_get", _wrap_LatLongCoord_latitude_get},
{"Xapianc::LatLongCoord_longitude_set", _wrap_LatLongCoord_longitude_set},
{"Xapianc::LatLongCoord_longitude_get", _wrap_LatLongCoord_longitude_get},
{"Xapianc::new_LatLongCoord", _wrap_new_LatLongCoord},
{"Xapianc::LatLongCoord_unserialise", _wrap_LatLongCoord_unserialise},
{"Xapianc::LatLongCoord_serialise", _wrap_LatLongCoord_serialise},
{"Xapianc::LatLongCoord_get_description", _wrap_LatLongCoord_get_description},
{"Xapianc::delete_LatLongCoord", _wrap_delete_LatLongCoord},
{"Xapianc::new_LatLongCoordsIterator", _wrap_new_LatLongCoordsIterator},
{"Xapianc::LatLongCoordsIterator___eq__", _wrap_LatLongCoordsIterator___eq__},
{"Xapianc::LatLongCoordsIterator_equal", _wrap_LatLongCoordsIterator_equal},
{"Xapianc::LatLongCoordsIterator_nequal", _wrap_LatLongCoordsIterator_nequal},
{"Xapianc::LatLongCoordsIterator_get_coord", _wrap_LatLongCoordsIterator_get_coord},
{"Xapianc::LatLongCoordsIterator_inc", _wrap_LatLongCoordsIterator_inc},
{"Xapianc::delete_LatLongCoordsIterator", _wrap_delete_LatLongCoordsIterator},
{"Xapianc::LatLongCoords_begin", _wrap_LatLongCoords_begin},
{"Xapianc::LatLongCoords_end", _wrap_LatLongCoords_end},
{"Xapianc::LatLongCoords_size", _wrap_LatLongCoords_size},
{"Xapianc::LatLongCoords_empty", _wrap_LatLongCoords_empty},
{"Xapianc::LatLongCoords_append", _wrap_LatLongCoords_append},
{"Xapianc::new_LatLongCoords", _wrap_new_LatLongCoords},
{"Xapianc::LatLongCoords_unserialise", _wrap_LatLongCoords_unserialise},
{"Xapianc::LatLongCoords_serialise", _wrap_LatLongCoords_serialise},
{"Xapianc::LatLongCoords_get_description", _wrap_LatLongCoords_get_description},
{"Xapianc::delete_LatLongCoords", _wrap_delete_LatLongCoords},
{"Xapianc::__ne__", _wrap___ne__},
{"Xapianc::delete_LatLongMetric", _wrap_delete_LatLongMetric},
{"Xapianc::LatLongMetric_pointwise_distance", _wrap_LatLongMetric_pointwise_distance},
{"Xapianc::LatLongMetric___call__", _wrap_LatLongMetric___call__},
{"Xapianc::LatLongMetric_name", _wrap_LatLongMetric_name},
{"Xapianc::new_GreatCircleMetric", _wrap_new_GreatCircleMetric},
{"Xapianc::GreatCircleMetric_pointwise_distance", _wrap_GreatCircleMetric_pointwise_distance},
{"Xapianc::GreatCircleMetric_name", _wrap_GreatCircleMetric_name},
{"Xapianc::delete_GreatCircleMetric", _wrap_delete_GreatCircleMetric},
{"Xapianc::new_LatLongDistancePostingSource", _wrap_new_LatLongDistancePostingSource},
{"Xapianc::delete_LatLongDistancePostingSource", _wrap_delete_LatLongDistancePostingSource},
{"Xapianc::LatLongDistancePostingSource_increment_weight", _wrap_LatLongDistancePostingSource_increment_weight},
{"Xapianc::LatLongDistancePostingSource_skip_to", _wrap_LatLongDistancePostingSource_skip_to},
{"Xapianc::LatLongDistancePostingSource_check", _wrap_LatLongDistancePostingSource_check},
{"Xapianc::LatLongDistancePostingSource_get_weight", _wrap_LatLongDistancePostingSource_get_weight},
{"Xapianc::LatLongDistancePostingSource_name", _wrap_LatLongDistancePostingSource_name},
{"Xapianc::LatLongDistancePostingSource_init", _wrap_LatLongDistancePostingSource_init},
{"Xapianc::LatLongDistancePostingSource_get_description", _wrap_LatLongDistancePostingSource_get_description},
{"Xapianc::new_LatLongDistanceKeyMaker", _wrap_new_LatLongDistanceKeyMaker},
{"Xapianc::delete_LatLongDistanceKeyMaker", _wrap_delete_LatLongDistanceKeyMaker},
{"Xapianc::LatLongDistanceKeyMaker___call__", _wrap_LatLongDistanceKeyMaker___call__},
{"Xapianc::Database_add_database", _wrap_Database_add_database},
{"Xapianc::Database_size", _wrap_Database_size},
{"Xapianc::new_Database", _wrap_new_Database},
{"Xapianc::delete_Database", _wrap_delete_Database},
{"Xapianc::Database_reopen", _wrap_Database_reopen},
{"Xapianc::Database_close", _wrap_Database_close},
{"Xapianc::Database_get_description", _wrap_Database_get_description},
{"Xapianc::Database_postlist_begin", _wrap_Database_postlist_begin},
{"Xapianc::Database_postlist_end", _wrap_Database_postlist_end},
{"Xapianc::Database_termlist_begin", _wrap_Database_termlist_begin},
{"Xapianc::Database_termlist_end", _wrap_Database_termlist_end},
{"Xapianc::Database_has_positions", _wrap_Database_has_positions},
{"Xapianc::Database_positionlist_begin", _wrap_Database_positionlist_begin},
{"Xapianc::Database_positionlist_end", _wrap_Database_positionlist_end},
{"Xapianc::Database_allterms_begin", _wrap_Database_allterms_begin},
{"Xapianc::Database_allterms_end", _wrap_Database_allterms_end},
{"Xapianc::Database_get_doccount", _wrap_Database_get_doccount},
{"Xapianc::Database_get_lastdocid", _wrap_Database_get_lastdocid},
{"Xapianc::Database_get_avlength", _wrap_Database_get_avlength},
{"Xapianc::Database_get_average_length", _wrap_Database_get_average_length},
{"Xapianc::Database_get_total_length", _wrap_Database_get_total_length},
{"Xapianc::Database_get_termfreq", _wrap_Database_get_termfreq},
{"Xapianc::Database_term_exists", _wrap_Database_term_exists},
{"Xapianc::Database_get_collection_freq", _wrap_Database_get_collection_freq},
{"Xapianc::Database_get_value_freq", _wrap_Database_get_value_freq},
{"Xapianc::Database_get_value_lower_bound", _wrap_Database_get_value_lower_bound},
{"Xapianc::Database_get_value_upper_bound", _wrap_Database_get_value_upper_bound},
{"Xapianc::Database_get_doclength_lower_bound", _wrap_Database_get_doclength_lower_bound},
{"Xapianc::Database_get_doclength_upper_bound", _wrap_Database_get_doclength_upper_bound},
{"Xapianc::Database_get_wdf_upper_bound", _wrap_Database_get_wdf_upper_bound},
{"Xapianc::Database_valuestream_begin", _wrap_Database_valuestream_begin},
{"Xapianc::Database_valuestream_end", _wrap_Database_valuestream_end},
{"Xapianc::Database_get_doclength", _wrap_Database_get_doclength},
{"Xapianc::Database_get_unique_terms", _wrap_Database_get_unique_terms},
{"Xapianc::Database_keep_alive", _wrap_Database_keep_alive},
{"Xapianc::Database_get_document", _wrap_Database_get_document},
{"Xapianc::Database_get_spelling_suggestion", _wrap_Database_get_spelling_suggestion},
{"Xapianc::Database_spellings_begin", _wrap_Database_spellings_begin},
{"Xapianc::Database_spellings_end", _wrap_Database_spellings_end},
{"Xapianc::Database_synonyms_begin", _wrap_Database_synonyms_begin},
{"Xapianc::Database_synonyms_end", _wrap_Database_synonyms_end},
{"Xapianc::Database_synonym_keys_begin", _wrap_Database_synonym_keys_begin},
{"Xapianc::Database_synonym_keys_end", _wrap_Database_synonym_keys_end},
{"Xapianc::Database_get_metadata", _wrap_Database_get_metadata},
{"Xapianc::Database_metadata_keys_begin", _wrap_Database_metadata_keys_begin},
{"Xapianc::Database_metadata_keys_end", _wrap_Database_metadata_keys_end},
{"Xapianc::Database_get_uuid", _wrap_Database_get_uuid},
{"Xapianc::Database_locked", _wrap_Database_locked},
{"Xapianc::Database_get_revision", _wrap_Database_get_revision},
{"Xapianc::Database_check", _wrap_Database_check},
{"Xapianc::Database_compact", _wrap_Database_compact},
{"Xapianc::delete_WritableDatabase", _wrap_delete_WritableDatabase},
{"Xapianc::new_WritableDatabase", _wrap_new_WritableDatabase},
{"Xapianc::WritableDatabase_add_database", _wrap_WritableDatabase_add_database},
{"Xapianc::WritableDatabase_commit", _wrap_WritableDatabase_commit},
{"Xapianc::WritableDatabase_flush", _wrap_WritableDatabase_flush},
{"Xapianc::WritableDatabase_begin_transaction", _wrap_WritableDatabase_begin_transaction},
{"Xapianc::WritableDatabase_commit_transaction", _wrap_WritableDatabase_commit_transaction},
{"Xapianc::WritableDatabase_cancel_transaction", _wrap_WritableDatabase_cancel_transaction},
{"Xapianc::WritableDatabase_add_document", _wrap_WritableDatabase_add_document},
{"Xapianc::WritableDatabase_delete_document", _wrap_WritableDatabase_delete_document},
{"Xapianc::WritableDatabase_delete_document_by_term", _wrap_WritableDatabase_delete_document_by_term},
{"Xapianc::WritableDatabase_replace_document", _wrap_WritableDatabase_replace_document},
{"Xapianc::WritableDatabase_replace_document_by_term", _wrap_WritableDatabase_replace_document_by_term},
{"Xapianc::WritableDatabase_add_spelling", _wrap_WritableDatabase_add_spelling},
{"Xapianc::WritableDatabase_remove_spelling", _wrap_WritableDatabase_remove_spelling},
{"Xapianc::WritableDatabase_add_synonym", _wrap_WritableDatabase_add_synonym},
{"Xapianc::WritableDatabase_remove_synonym", _wrap_WritableDatabase_remove_synonym},
{"Xapianc::WritableDatabase_clear_synonyms", _wrap_WritableDatabase_clear_synonyms},
{"Xapianc::WritableDatabase_set_metadata", _wrap_WritableDatabase_set_metadata},
{"Xapianc::WritableDatabase_get_description", _wrap_WritableDatabase_get_description},
{"Xapianc::remote_open", _wrap_remote_open},
{"Xapianc::remote_open_writable", _wrap_remote_open_writable},
{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 statically 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

#ifndef SWIG_INIT_CLIENT_DATA_TYPE
#define SWIG_INIT_CLIENT_DATA_TYPE void *
#endif

SWIGRUNTIME void
SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;
  
  /* 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);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpreters 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 %lu\n", (unsigned long)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 %lu %s\n", (unsigned long)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 %lu %s\n", (unsigned long)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



#if defined(__cplusplus) && ! defined(XSPROTO)
extern "C"
#endif

XS(SWIG_init) {
  dXSARGS;
  int i;
  (void)items;
  
  SWIG_InitializeModule(0);
  
  /* Install commands */
  for (i = 0; swig_commands[i].name; i++) {
    /* Casts only needed for Perl < 5.10. */
#ifdef __cplusplus
    newXS(const_cast<char*>(swig_commands[i].name), swig_commands[i].wrapper, const_cast<char*>(__FILE__));
#else
    newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__);
#endif
  }
  
  /* Install variables */
  for (i = 0; swig_variables[i].name; i++) {
    SV *sv;
    sv = get_sv(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, 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(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, (const 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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_MAX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_MAX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_WILDCARD", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_WILDCARD)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OP_INVALID", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_INVALID)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ENQ_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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ENQ_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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ENQ_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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_ACCUMULATE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_ACCUMULATE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_NO_POSITIONS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_NO_POSITIONS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_NGRAMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_NGRAMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "FLAG_CJK_NGRAM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_CJK_NGRAM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "STEM_SOME_FULL_POS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_SOME_FULL_POS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "WILDCARD_LIMIT_ERROR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_ERROR)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "WILDCARD_LIMIT_FIRST", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_FIRST)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "WILDCARD_LIMIT_MOST_FREQUENT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Error, (void*) "Xapian::Error");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LogicError, (void*) "Xapian::LogicError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RuntimeError, (void*) "Xapian::RuntimeError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__AssertionError, (void*) "Xapian::AssertionError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__InvalidArgumentError, (void*) "Xapian::InvalidArgumentError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__InvalidOperationError, (void*) "Xapian::InvalidOperationError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__UnimplementedError, (void*) "Xapian::UnimplementedError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseError, (void*) "Xapian::DatabaseError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseCorruptError, (void*) "Xapian::DatabaseCorruptError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseCreateError, (void*) "Xapian::DatabaseCreateError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseLockError, (void*) "Xapian::DatabaseLockError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseModifiedError, (void*) "Xapian::DatabaseModifiedError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseOpeningError, (void*) "Xapian::DatabaseOpeningError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseVersionError, (void*) "Xapian::DatabaseVersionError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DocNotFoundError, (void*) "Xapian::DocNotFoundError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__FeatureUnavailableError, (void*) "Xapian::FeatureUnavailableError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__InternalError, (void*) "Xapian::InternalError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NetworkError, (void*) "Xapian::NetworkError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NetworkTimeoutError, (void*) "Xapian::NetworkTimeoutError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__QueryParserError, (void*) "Xapian::QueryParserError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__SerialisationError, (void*) "Xapian::SerialisationError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RangeError, (void*) "Xapian::RangeError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__WildcardError, (void*) "Xapian::WildcardError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseNotFoundError, (void*) "Xapian::DatabaseNotFoundError");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DatabaseClosedError, (void*) "Xapian::DatabaseClosedError");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "BAD_VALUENO", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_unsigned_SS_int  SWIG_PERL_CALL_ARGS_1(static_cast< unsigned int >(Xapian::BAD_VALUENO)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_NO_SYNC", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_NO_SYNC)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_FULL_SYNC", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_FULL_SYNC)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_DANGEROUS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_DANGEROUS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_NO_TERMLIST", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_NO_TERMLIST)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_BACKEND_CHERT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_BACKEND_CHERT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_BACKEND_GLASS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_BACKEND_GLASS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_BACKEND_INMEMORY", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_BACKEND_INMEMORY)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_BACKEND_STUB", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_BACKEND_STUB)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DB_RETRY_LOCK", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DB_RETRY_LOCK)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DBCHECK_SHORT_TREE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DBCHECK_SHORT_TREE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DBCHECK_FULL_TREE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DBCHECK_FULL_TREE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DBCHECK_SHOW_FREELIST", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DBCHECK_SHOW_FREELIST)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DBCHECK_SHOW_STATS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DBCHECK_SHOW_STATS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DBCHECK_FIX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DBCHECK_FIX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DBCOMPACT_MULTIPASS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DBCOMPACT_MULTIPASS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DBCOMPACT_NO_RENUMBER", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DBCOMPACT_NO_RENUMBER)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DBCOMPACT_SINGLE_FILE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DBCOMPACT_SINGLE_FILE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "DOC_ASSUME_VALID", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::DOC_ASSUME_VALID)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PositionIterator, (void*) "Xapian::PositionIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingIterator, (void*) "Xapian::PostingIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermIterator, (void*) "Xapian::TermIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueIterator, (void*) "Xapian::ValueIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Document, (void*) "Xapian::Document");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Registry, (void*) "Xapian::Registry");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_MAX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_MAX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_WILDCARD", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_WILDCARD)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_OP_INVALID", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::OP_INVALID)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_WILDCARD_LIMIT_ERROR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_ERROR)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_WILDCARD_LIMIT_FIRST", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_FIRST)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Query_WILDCARD_LIMIT_MOST_FREQUENT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Query::WILDCARD_LIMIT_MOST_FREQUENT)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Query, (void*) "Xapian::Query");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stem, (void*) "Xapian::Stem");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_FLAG_NGRAMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::FLAG_NGRAMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_FLAG_CJK_NGRAM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::FLAG_CJK_NGRAM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_STEM_SOME_FULL_POS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::STEM_SOME_FULL_POS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_STOP_NONE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::STOP_NONE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_STOP_ALL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::STOP_ALL)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermGenerator_STOP_STEMMED", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::TermGenerator::STOP_STEMMED)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TermGenerator, (void*) "Xapian::TermGenerator");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MSet_SNIPPET_BACKGROUND_MODEL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::MSet::SNIPPET_BACKGROUND_MODEL)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MSet_SNIPPET_EXHAUSTIVE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::MSet::SNIPPET_EXHAUSTIVE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MSet_SNIPPET_EMPTY_WITHOUT_MATCH", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::MSet::SNIPPET_EMPTY_WITHOUT_MATCH)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MSet_SNIPPET_NGRAMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::MSet::SNIPPET_NGRAMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "MSet_SNIPPET_CJK_NGRAM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::MSet::SNIPPET_CJK_NGRAM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSet, (void*) "Xapian::MSet");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MSetIterator, (void*) "Xapian::MSetIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESet, (void*) "Xapian::ESet");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ESetIterator, (void*) "Xapian::ESetIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RSet, (void*) "Xapian::RSet");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchDecider, (void*) "Xapian::MatchDecider");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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*) "Xapian::Enquire");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDecider, (void*) "Xapian::ExpandDecider");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDeciderAnd, (void*) "Xapian::ExpandDeciderAnd");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ExpandDeciderFilterPrefix, (void*) "Xapian::ExpandDeciderFilterPrefix");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__KeyMaker, (void*) "Xapian::KeyMaker");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MultiValueKeyMaker, (void*) "Xapian::MultiValueKeyMaker");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "RP_SUFFIX", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::RP_SUFFIX)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "RP_REPEATED", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::RP_REPEATED)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "RP_DATE_PREFER_MDY", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::RP_DATE_PREFER_MDY)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Stopper, (void*) "Xapian::Stopper");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__SimpleStopper, (void*) "Xapian::SimpleStopper");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__RangeProcessor, (void*) "Xapian::RangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateRangeProcessor, (void*) "Xapian::DateRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberRangeProcessor, (void*) "Xapian::NumberRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueRangeProcessor, (void*) "Xapian::ValueRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__StringValueRangeProcessor, (void*) "Xapian::StringValueRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DateValueRangeProcessor, (void*) "Xapian::DateValueRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__NumberValueRangeProcessor, (void*) "Xapian::NumberValueRangeProcessor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__FieldProcessor, (void*) "Xapian::FieldProcessor");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_NGRAMS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_NGRAMS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_CJK_NGRAM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_CJK_NGRAM)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_ACCUMULATE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_ACCUMULATE)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_FLAG_NO_POSITIONS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::FLAG_NO_POSITIONS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "QueryParser_STEM_SOME_FULL_POS", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::QueryParser::STEM_SOME_FULL_POS)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__QueryParser, (void*) "Xapian::QueryParser");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueSetMatchDecider, (void*) "Xapian::ValueSetMatchDecider");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Weight_TWO_STAGE_SMOOTHING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Weight::TWO_STAGE_SMOOTHING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Weight_DIRICHLET_SMOOTHING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Weight::DIRICHLET_SMOOTHING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Weight_ABSOLUTE_DISCOUNT_SMOOTHING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Weight::ABSOLUTE_DISCOUNT_SMOOTHING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Weight_JELINEK_MERCER_SMOOTHING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Weight::JELINEK_MERCER_SMOOTHING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "Weight_DIRICHLET_PLUS_SMOOTHING", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(Xapian::Weight::DIRICHLET_PLUS_SMOOTHING)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Weight, (void*) "Xapian::Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BoolWeight, (void*) "Xapian::BoolWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TfIdfWeight, (void*) "Xapian::TfIdfWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25Weight, (void*) "Xapian::BM25Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BM25PlusWeight, (void*) "Xapian::BM25PlusWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__TradWeight, (void*) "Xapian::TradWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__InL2Weight, (void*) "Xapian::InL2Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__IfB2Weight, (void*) "Xapian::IfB2Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__IneB2Weight, (void*) "Xapian::IneB2Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__BB2Weight, (void*) "Xapian::BB2Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DLHWeight, (void*) "Xapian::DLHWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PL2Weight, (void*) "Xapian::PL2Weight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PL2PlusWeight, (void*) "Xapian::PL2PlusWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DPHWeight, (void*) "Xapian::DPHWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LMWeight, (void*) "Xapian::LMWeight");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__CoordWeight, (void*) "Xapian::CoordWeight");
  /*@SWIG:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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:/home/olly/git/xapian-1.4/TMP.make_dist.FqKtBKmM6x/swig/Lib/perl5/perltypemaps.swg,67,%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*) "Xapian::Compactor");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__PostingSource, (void*) "Xapian::PostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValuePostingSource, (void*) "Xapian::ValuePostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueWeightPostingSource, (void*) "Xapian::ValueWeightPostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, (void*) "Xapian::DecreasingValueWeightPostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueMapPostingSource, (void*) "Xapian::ValueMapPostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__FixedWeightPostingSource, (void*) "Xapian::FixedWeightPostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__MatchSpy, (void*) "Xapian::MatchSpy");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__ValueCountMatchSpy, (void*) "Xapian::ValueCountMatchSpy");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoord, (void*) "Xapian::LatLongCoord");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoordsIterator, (void*) "Xapian::LatLongCoordsIterator");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongCoords, (void*) "Xapian::LatLongCoords");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongMetric, (void*) "Xapian::LatLongMetric");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__GreatCircleMetric, (void*) "Xapian::GreatCircleMetric");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongDistancePostingSource, (void*) "Xapian::LatLongDistancePostingSource");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__LatLongDistanceKeyMaker, (void*) "Xapian::LatLongDistanceKeyMaker");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__Database, (void*) "Xapian::Database");
  SWIG_TypeClientData(SWIGTYPE_p_Xapian__WritableDatabase, (void*) "Xapian::WritableDatabase");
  ST(0) = &PL_sv_yes;
  XSRETURN(1);
}

