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

#define SWIGPYTHON
#define SWIG_DIRECTORS
#define SWIG_PYTHON_THREADS
#define SWIG_PYTHON_NO_BUILD_NONE
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



/* Python.h has to appear first */
#include <Python.h>

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

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

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

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

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

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

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

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


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

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

   Now you can be more explicit:

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

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

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

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

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

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

       int food(double)
       int fooi(int);

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

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

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

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

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


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

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



/* Compatibility macros for Python 3 */
#if PY_VERSION_HEX >= 0x03000000

#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
#define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyString_Check(name) PyBytes_Check(name)
#define PyString_FromString(x) PyUnicode_FromString(x)
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
#define PyString_AsString(str) PyBytes_AsString(str)
#define PyString_Size(str) PyBytes_Size(str)	
#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)

#endif

#ifndef Py_TYPE
#  define Py_TYPE(op) ((op)->ob_type)
#endif

/* SWIG APIs for compatibility of both Python 2 & 3 */

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
#else
#  define SWIG_Python_str_FromFormat PyString_FromFormat
#endif


/* Warning: This function will allocate a new string in Python 3,
 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
 */
SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject *str)
{
#if PY_VERSION_HEX >= 0x03000000
  char *cstr;
  char *newstr;
  Py_ssize_t len;
  str = PyUnicode_AsUTF8String(str);
  PyBytes_AsStringAndSize(str, &cstr, &len);
  newstr = (char *) malloc(len+1);
  memcpy(newstr, cstr, len+1);
  Py_XDECREF(str);
  return newstr;
#else
  return PyString_AsString(str);
#endif
}

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
#else
#  define SWIG_Python_str_DelForPy3(x) 
#endif


SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char *c)
{
#if PY_VERSION_HEX >= 0x03000000
  return PyUnicode_FromString(c); 
#else
  return PyString_FromString(c);
#endif
}

/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
#  define PyOS_snprintf _snprintf
# else
#  define PyOS_snprintf snprintf
# endif
#endif

/* A crude PyString_FromFormat implementation for old Pythons */
#if PY_VERSION_HEX < 0x02020000

#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif

static PyObject *
PyString_FromFormat(const char *fmt, ...) {
  va_list ap;
  char buf[SWIG_PYBUFFER_SIZE * 2];
  int res;
  va_start(ap, fmt);
  res = vsnprintf(buf, sizeof(buf), fmt, ap);
  va_end(ap);
  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
}
#endif

/* Add PyObject_Del for old Pythons */
#if PY_VERSION_HEX < 0x01060000
# define PyObject_Del(op) PyMem_DEL((op))
#endif
#ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del
#endif

/* A crude PyExc_StopIteration exception for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# ifndef PyExc_StopIteration
#  define PyExc_StopIteration PyExc_RuntimeError
# endif
# ifndef PyObject_GenericGetAttr
#  define PyObject_GenericGetAttr 0
# endif
#endif

/* Py_NotImplemented is defined in 2.1 and up. */
#if PY_VERSION_HEX < 0x02010000
# ifndef Py_NotImplemented
#  define Py_NotImplemented PyExc_RuntimeError
# endif
#endif

/* A crude PyString_AsStringAndSize implementation for old Pythons */
#if PY_VERSION_HEX < 0x02010000
# ifndef PyString_AsStringAndSize
#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
# endif
#endif

/* PySequence_Size for old Pythons */
#if PY_VERSION_HEX < 0x02000000
# ifndef PySequence_Size
#  define PySequence_Size PySequence_Length
# endif
#endif

/* PyBool_FromLong for old Pythons */
#if PY_VERSION_HEX < 0x02030000
static
PyObject *PyBool_FromLong(long ok)
{
  PyObject *result = ok ? Py_True : Py_False;
  Py_INCREF(result);
  return result;
}
#endif

/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
typedef intintargfunc ssizessizeargfunc;
typedef intobjargproc ssizeobjargproc;
typedef intintobjargproc ssizessizeobjargproc;
typedef getreadbufferproc readbufferproc;
typedef getwritebufferproc writebufferproc;
typedef getsegcountproc segcountproc;
typedef getcharbufferproc charbufferproc;
static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
{
  long result = 0;
  PyObject *i = PyNumber_Int(x);
  if (i) {
    result = PyInt_AsLong(i);
    Py_DECREF(i);
  }
  return result;
}
#endif

#if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op)				\
  do { 						\
    if (op) {					\
      int vret = visit((op), arg);		\
      if (vret)					\
        return vret;				\
    }						\
  } while (0)
#endif

#if PY_VERSION_HEX < 0x02030000
typedef struct {
  PyTypeObject type;
  PyNumberMethods as_number;
  PyMappingMethods as_mapping;
  PySequenceMethods as_sequence;
  PyBufferProcs as_buffer;
  PyObject *name, *slots;
} PyHeapTypeObject;
#endif

#if PY_VERSION_HEX < 0x02030000
typedef destructor freefunc;
#endif

#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
     (PY_MAJOR_VERSION > 3))
# define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
#endif

#if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#endif

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

SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code) {
  PyObject* type = 0;
  switch(code) {
  case SWIG_MemoryError:
    type = PyExc_MemoryError;
    break;
  case SWIG_IOError:
    type = PyExc_IOError;
    break;
  case SWIG_RuntimeError:
    type = PyExc_RuntimeError;
    break;
  case SWIG_IndexError:
    type = PyExc_IndexError;
    break;
  case SWIG_TypeError:
    type = PyExc_TypeError;
    break;
  case SWIG_DivisionByZero:
    type = PyExc_ZeroDivisionError;
    break;
  case SWIG_OverflowError:
    type = PyExc_OverflowError;
    break;
  case SWIG_SyntaxError:
    type = PyExc_SyntaxError;
    break;
  case SWIG_ValueError:
    type = PyExc_ValueError;
    break;
  case SWIG_SystemError:
    type = PyExc_SystemError;
    break;
  case SWIG_AttributeError:
    type = PyExc_AttributeError;
    break;
  default:
    type = PyExc_RuntimeError;
  }
  return type;
}


SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char* mesg)
{
  PyObject *type = 0;
  PyObject *value = 0;
  PyObject *traceback = 0;

  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
  if (value) {
    char *tmp;
    PyObject *old_str = PyObject_Str(value);
    PyErr_Clear();
    Py_XINCREF(type);

    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(old_str);
    Py_DECREF(value);
  } else {
    PyErr_SetString(PyExc_RuntimeError, mesg);
  }
}

#if defined(SWIG_PYTHON_NO_THREADS)
#  if defined(SWIG_PYTHON_THREADS)
#    undef SWIG_PYTHON_THREADS
#  endif
#endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
#      define SWIG_PYTHON_USE_GIL
#    endif
#  endif
#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
#    endif
#    ifdef __cplusplus /* C++ code */
       class SWIG_Python_Thread_Block {
         bool status;
         PyGILState_STATE state;
       public:
         void end() { if (status) { PyGILState_Release(state); status = false;} }
         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
         ~SWIG_Python_Thread_Block() { end(); }
       };
       class SWIG_Python_Thread_Allow {
         bool status;
         PyThreadState *save;
       public:
         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
         ~SWIG_Python_Thread_Allow() { end(); }
       };
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
#    else /* C code */
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
#    endif
#  else /* Old thread way, not implemented, user must provide it */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      define SWIG_PYTHON_INITIALIZE_THREADS
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
#      define SWIG_PYTHON_THREAD_END_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
#      define SWIG_PYTHON_THREAD_END_ALLOW
#    endif
#  endif
#else /* No thread support */
#  define SWIG_PYTHON_INITIALIZE_THREADS
#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#  define SWIG_PYTHON_THREAD_END_BLOCK
#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#  define SWIG_PYTHON_THREAD_END_ALLOW
#endif

/* -----------------------------------------------------------------------------
 * Python API portion that goes into the runtime
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

/* -----------------------------------------------------------------------------
 * Constant declarations
 * ----------------------------------------------------------------------------- */

/* Constant Types */
#define SWIG_PY_POINTER 4
#define SWIG_PY_BINARY  5

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


/* -----------------------------------------------------------------------------
 * Wrapper of PyInstanceMethod_New() used in Python 3
 * It is exported to the generated module, used for -fastproxy
 * ----------------------------------------------------------------------------- */
#if PY_VERSION_HEX >= 0x03000000
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
{
  return PyInstanceMethod_New(func);
}
#else
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
{
  return NULL;
}
#endif

#ifdef __cplusplus
}
#endif


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

/* Common SWIG API */

/* for raw pointers */
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)

#ifdef SWIGPYTHON_BUILTIN
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
#else
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
#endif

#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)

#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
#define swig_owntype                                    int

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, 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_Python_ConvertFunctionPtr(obj, pptr, type)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)

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


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)

#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
#define SWIG_fail                        		goto fail					   


/* Runtime API implementation */

/* Error manipulation */

SWIGINTERN void 
SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
  PyErr_SetObject(errtype, obj);
  Py_DECREF(obj);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

SWIGINTERN void 
SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  PyErr_SetString(errtype, (char *) msg);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)

/* Set a constant value */

#if defined(SWIGPYTHON_BUILTIN)

SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  PyObject *s = PyString_InternFromString(key);
  PyList_Append(seq, s);
  Py_DECREF(s);
}

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, (char *)name, obj);
  Py_DECREF(obj);
  if (public_interface)
    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
}

#else

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, (char *)name, obj);
  Py_DECREF(obj);                            
}

#endif

/* Append a value to the result obj */

SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyList_Check(result)) {
      PyObject *o2 = result;
      result = PyList_New(1);
      PyList_SetItem(result, 0, o2);
    }
    PyList_Append(result,obj);
    Py_DECREF(obj);
  }
  return result;
#else
  PyObject*   o2;
  PyObject*   o3;
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyTuple_Check(result)) {
      o2 = result;
      result = PyTuple_New(1);
      PyTuple_SET_ITEM(result, 0, o2);
    }
    o3 = PyTuple_New(1);
    PyTuple_SET_ITEM(o3, 0, obj);
    o2 = result;
    result = PySequence_Concat(o2, o3);
    Py_DECREF(o2);
    Py_DECREF(o3);
  }
  return result;
#endif
}

/* Unpack the argument tuple */

SWIGINTERN int
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
  if (!args) {
    if (!min && !max) {
      return 1;
    } else {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
		   name, (min == max ? "" : "at least "), (int)min);
      return 0;
    }
  }  
  if (!PyTuple_Check(args)) {
    if (min <= 1 && max >= 1) {
      register int i;
      objs[0] = args;
      for (i = 1; i < max; ++i) {
	objs[i] = 0;
      }
      return 2;
    }
    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    return 0;
  } else {
    register Py_ssize_t l = PyTuple_GET_SIZE(args);
    if (l < min) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at least "), (int)min, (int)l);
      return 0;
    } else if (l > max) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at most "), (int)max, (int)l);
      return 0;
    } else {
      register int i;
      for (i = 0; i < l; ++i) {
	objs[i] = PyTuple_GET_ITEM(args, i);
      }
      for (; l < max; ++l) {
	objs[l] = 0;
      }
      return i + 1;
    }    
  }
}

/* A functor is a function object with one single object argument */
#if PY_VERSION_HEX >= 0x02020000
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
#else
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
#endif

/*
  Helper for static pointer initialization for both C and C++ code, for example
  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
*/
#ifdef __cplusplus
#define SWIG_STATIC_POINTER(var)  var
#else
#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
#endif

/* -----------------------------------------------------------------------------
 * Pointer declarations
 * ----------------------------------------------------------------------------- */

/* Flags for new pointer objects */
#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)

#ifdef __cplusplus
extern "C" {
#endif

/*  How to access Py_None */
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#  ifndef SWIG_PYTHON_NO_BUILD_NONE
#    ifndef SWIG_PYTHON_BUILD_NONE
#      define SWIG_PYTHON_BUILD_NONE
#    endif
#  endif
#endif

#ifdef SWIG_PYTHON_BUILD_NONE
#  ifdef Py_None
#   undef Py_None
#   define Py_None SWIG_Py_None()
#  endif
SWIGRUNTIMEINLINE PyObject * 
_SWIG_Py_None(void)
{
  PyObject *none = Py_BuildValue((char*)"");
  Py_DECREF(none);
  return none;
}
SWIGRUNTIME PyObject * 
SWIG_Py_None(void)
{
  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
  return none;
}
#endif

/* The python void return value */

SWIGRUNTIMEINLINE PyObject * 
SWIG_Py_Void(void)
{
  PyObject *none = Py_None;
  Py_INCREF(none);
  return none;
}

/* SwigPyClientData */

typedef struct {
  PyObject *klass;
  PyObject *newraw;
  PyObject *newargs;
  PyObject *destroy;
  int delargs;
  int implicitconv;
  PyTypeObject *pytype;
} SwigPyClientData;

SWIGRUNTIMEINLINE int 
SWIG_Python_CheckImplicit(swig_type_info *ty)
{
  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  return data ? data->implicitconv : 0;
}

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  PyObject *klass = data ? data->klass : 0;
  return (klass ? klass : PyExc_RuntimeError);
}


SWIGRUNTIME SwigPyClientData * 
SwigPyClientData_New(PyObject* obj)
{
  if (!obj) {
    return 0;
  } else {
    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    /* the klass element */
    data->klass = obj;
    Py_INCREF(data->klass);
    /* the newraw method and newargs arguments used to create a new raw instance */
    if (PyClass_Check(obj)) {
      data->newraw = 0;
      data->newargs = obj;
      Py_INCREF(obj);
    } else {
#if (PY_VERSION_HEX < 0x02020000)
      data->newraw = 0;
#else
      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
#endif
      if (data->newraw) {
	Py_INCREF(data->newraw);
	data->newargs = PyTuple_New(1);
	PyTuple_SetItem(data->newargs, 0, obj);
      } else {
	data->newargs = obj;
      }
      Py_INCREF(data->newargs);
    }
    /* the destroy method, aka as the C++ delete method */
    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
    if (PyErr_Occurred()) {
      PyErr_Clear();
      data->destroy = 0;
    }
    if (data->destroy) {
      int flags;
      Py_INCREF(data->destroy);
      flags = PyCFunction_GET_FLAGS(data->destroy);
#ifdef METH_O
      data->delargs = !(flags & (METH_O));
#else
      data->delargs = 0;
#endif
    } else {
      data->delargs = 0;
    }
    data->implicitconv = 0;
    data->pytype = 0;
    return data;
  }
}

SWIGRUNTIME void 
SwigPyClientData_Del(SwigPyClientData *data) {
  Py_XDECREF(data->newraw);
  Py_XDECREF(data->newargs);
  Py_XDECREF(data->destroy);
}

/* =============== SwigPyObject =====================*/

typedef struct {
  PyObject_HEAD
  void *ptr;
  swig_type_info *ty;
  int own;
  PyObject *next;
#ifdef SWIGPYTHON_BUILTIN
  PyObject *dict;
#endif
} SwigPyObject;

SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject *v)
{
  return PyLong_FromVoidPtr(v->ptr);
}

SWIGRUNTIME PyObject *
SwigPyObject_format(const char* fmt, SwigPyObject *v)
{
  PyObject *res = NULL;
  PyObject *args = PyTuple_New(1);
  if (args) {
    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
      if (ofmt) {
#if PY_VERSION_HEX >= 0x03000000
	res = PyUnicode_Format(ofmt,args);
#else
	res = PyString_Format(ofmt,args);
#endif
	Py_DECREF(ofmt);
      }
      Py_DECREF(args);
    }
  }
  return res;
}

SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject *v)
{
  return SwigPyObject_format("%o",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject *v)
{
  return SwigPyObject_format("%x",v);
}

SWIGRUNTIME PyObject *
#ifdef METH_NOARGS
SwigPyObject_repr(SwigPyObject *v)
#else
SwigPyObject_repr(SwigPyObject *v, PyObject *args)
#endif
{
  const char *name = SWIG_TypePrettyName(v->ty);
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, (void *)v);
  if (v->next) {
# ifdef METH_NOARGS
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# else
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
# endif
# if PY_VERSION_HEX >= 0x03000000
    PyObject *joined = PyUnicode_Concat(repr, nrep);
    Py_DecRef(repr);
    Py_DecRef(nrep);
    repr = joined;
# else
    PyString_ConcatAndDel(&repr,nrep);
# endif
  }
  return repr;  
}

SWIGRUNTIME int
SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
  char *str;
#ifdef METH_NOARGS
  PyObject *repr = SwigPyObject_repr(v);
#else
  PyObject *repr = SwigPyObject_repr(v, NULL);
#endif
  if (repr) {
    str = SWIG_Python_str_AsChar(repr); 
    fputs(str, fp);
    SWIG_Python_str_DelForPy3(str);
    Py_DECREF(repr);
    return 0; 
  } else {
    return 1; 
  }
}

SWIGRUNTIME PyObject *
SwigPyObject_str(SwigPyObject *v)
{
  char result[SWIG_BUFFER_SIZE];
  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
    SWIG_Python_str_FromChar(result) : 0;
}

SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{
  void *i = v->ptr;
  void *j = w->ptr;
  return (i < j) ? -1 : ((i > j) ? 1 : 0);
}

/* Added for Python 3.x, would it also be useful for Python 2.x? */
SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
{
  PyObject* res;
  if( op != Py_EQ && op != Py_NE ) {
    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
  }
  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  return res;  
}


SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

#ifdef SWIGPYTHON_BUILTIN
static swig_type_info *SwigPyObject_stype = 0;
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
    SwigPyClientData *cd;
    assert(SwigPyObject_stype);
    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
    assert(cd);
    assert(cd->pytype);
    return cd->pytype;
}
#else
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  return type;
}
#endif

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
#ifdef SWIGPYTHON_BUILTIN
  PyTypeObject *target_tp = SwigPyObject_type();
  if (PyType_IsSubtype(op->ob_type, target_tp))
    return 1;
  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
#else
  return (Py_TYPE(op) == SwigPyObject_type())
    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
#endif
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own);

SWIGRUNTIME void
SwigPyObject_dealloc(PyObject *v)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  PyObject *next = sobj->next;
  if (sobj->own == SWIG_POINTER_OWN) {
    swig_type_info *ty = sobj->ty;
    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    PyObject *destroy = data ? data->destroy : 0;
    if (destroy) {
      /* destroy is always a VARARGS method */
      PyObject *res;
      if (data->delargs) {
	/* we need to create a temporary object to carry the destroy operation */
	PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
	res = SWIG_Python_CallFunctor(destroy, tmp);
	Py_DECREF(tmp);
      } else {
	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
	PyObject *mself = PyCFunction_GET_SELF(destroy);
	res = ((*meth)(mself, v));
      }
      Py_XDECREF(res);
    } 
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    else {
      const char *name = SWIG_TypePrettyName(ty);
      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    }
#endif
  } 
  Py_XDECREF(next);
  PyObject_DEL(v);
}

SWIGRUNTIME PyObject* 
SwigPyObject_append(PyObject* v, PyObject* next)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
#ifndef METH_O
  PyObject *tmp = 0;
  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
  next = tmp;
#endif
  if (!SwigPyObject_Check(next)) {
    return NULL;
  }
  sobj->next = next;
  Py_INCREF(next);
  return SWIG_Py_Void();
}

SWIGRUNTIME PyObject* 
#ifdef METH_NOARGS
SwigPyObject_next(PyObject* v)
#else
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (sobj->next) {    
    Py_INCREF(sobj->next);
    return sobj->next;
  } else {
    return SWIG_Py_Void();
  }
}

SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_disown(PyObject *v)
#else
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = 0;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_acquire(PyObject *v)
#else
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = SWIG_POINTER_OWN;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args)
{
  PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000)
  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
#else
  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
#endif
    {
      return NULL;
    } 
  else
    {
      SwigPyObject *sobj = (SwigPyObject *)v;
      PyObject *obj = PyBool_FromLong(sobj->own);
      if (val) {
#ifdef METH_NOARGS
	if (PyObject_IsTrue(val)) {
	  SwigPyObject_acquire(v);
	} else {
	  SwigPyObject_disown(v);
	}
#else
	if (PyObject_IsTrue(val)) {
	  SwigPyObject_acquire(v,args);
	} else {
	  SwigPyObject_disown(v,args);
	}
#endif
      } 
      return obj;
    }
}

#ifdef METH_O
static PyMethodDef
swigobject_methods[] = {
  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"aquires ownership of the pointer"},
  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
  {0, 0, 0, 0}  
};
#else
static PyMethodDef
swigobject_methods[] = {
  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
  {0, 0, 0, 0}  
};
#endif

#if PY_VERSION_HEX < 0x02020000
SWIGINTERN PyObject *
SwigPyObject_getattr(SwigPyObject *sobj,char *name)
{
  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
}
#endif

SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) {
  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";

  static PyNumberMethods SwigPyObject_as_number = {
    (binaryfunc)0, /*nb_add*/
    (binaryfunc)0, /*nb_subtract*/
    (binaryfunc)0, /*nb_multiply*/
    /* nb_divide removed in Python 3 */
#if PY_VERSION_HEX < 0x03000000
    (binaryfunc)0, /*nb_divide*/
#endif
    (binaryfunc)0, /*nb_remainder*/
    (binaryfunc)0, /*nb_divmod*/
    (ternaryfunc)0,/*nb_power*/
    (unaryfunc)0,  /*nb_negative*/
    (unaryfunc)0,  /*nb_positive*/
    (unaryfunc)0,  /*nb_absolute*/
    (inquiry)0,    /*nb_nonzero*/
    0,		   /*nb_invert*/
    0,		   /*nb_lshift*/
    0,		   /*nb_rshift*/
    0,		   /*nb_and*/
    0,		   /*nb_xor*/
    0,		   /*nb_or*/
#if PY_VERSION_HEX < 0x03000000
    0,   /*nb_coerce*/
#endif
    (unaryfunc)SwigPyObject_long, /*nb_int*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_long, /*nb_long*/
#else
    0, /*nb_reserved*/
#endif
    (unaryfunc)0,                 /*nb_float*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif
  };

  static PyTypeObject swigpyobject_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
      /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      (char *)"SwigPyObject",               /* tp_name */
      sizeof(SwigPyObject),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
      (printfunc)SwigPyObject_print,        /* tp_print */
#if PY_VERSION_HEX < 0x02020000
      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
#else
      (getattrfunc)0,                       /* tp_getattr */
#endif
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000
    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
#else
      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyObject_repr,          /* tp_repr */
      &SwigPyObject_as_number,              /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      (reprfunc)SwigPyObject_str,           /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigobject_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      swigobject_methods,                   /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
      0,                                    /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
      0,                                    /* tp_version */
#endif
#ifdef COUNT_ALLOCS
      0,0,0,0                               /* tp_alloc -> tp_next */
#endif
    };
    swigpyobject_type = tmp;
    type_init = 1;
#if PY_VERSION_HEX < 0x02020000
    swigpyobject_type.ob_type = &PyType_Type;
#else
    if (PyType_Ready(&swigpyobject_type) < 0)
      return NULL;
#endif
  }
  return &swigpyobject_type;
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
{
  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  if (sobj) {
    sobj->ptr  = ptr;
    sobj->ty   = ty;
    sobj->own  = own;
    sobj->next = 0;
  }
  return (PyObject *)sobj;
}

/* -----------------------------------------------------------------------------
 * Implements a simple Swig Packed type, and use it instead of string
 * ----------------------------------------------------------------------------- */

typedef struct {
  PyObject_HEAD
  void *pack;
  swig_type_info *ty;
  size_t size;
} SwigPyPacked;

SWIGRUNTIME int
SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
  char result[SWIG_BUFFER_SIZE];
  fputs("<Swig Packed ", fp); 
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    fputs("at ", fp); 
    fputs(result, fp); 
  }
  fputs(v->ty->name,fp); 
  fputs(">", fp);
  return 0; 
}
  
SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  }  
}

SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromChar(v->ty->name);
  }  
}

SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
{
  size_t i = v->size;
  size_t j = w->size;
  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
}

SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);

SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  return type;
}

SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject *op) {
  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
}

SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject *v)
{
  if (SwigPyPacked_Check(v)) {
    SwigPyPacked *sobj = (SwigPyPacked *) v;
    free(sobj->pack);
  }
  PyObject_DEL(v);
}

SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void) {
  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  static PyTypeObject swigpypacked_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
      /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX>=0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      (char *)"SwigPyPacked",               /* tp_name */
      sizeof(SwigPyPacked),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
      (printfunc)SwigPyPacked_print,        /* tp_print */
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX>=0x03000000
      0, /* tp_reserved in 3.0.1 */
#else
      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
      0,                                    /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      (reprfunc)SwigPyPacked_str,           /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigpacked_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      0,                                    /* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      0,                                    /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
      0,                                    /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
      0,                                    /* tp_version */
#endif
#ifdef COUNT_ALLOCS
      0,0,0,0                               /* tp_alloc -> tp_next */
#endif
    };
    swigpypacked_type = tmp;
    type_init = 1;
#if PY_VERSION_HEX < 0x02020000
    swigpypacked_type.ob_type = &PyType_Type;
#else
    if (PyType_Ready(&swigpypacked_type) < 0)
      return NULL;
#endif
  }
  return &swigpypacked_type;
}

SWIGRUNTIME PyObject *
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
{
  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  if (sobj) {
    void *pack = malloc(size);
    if (pack) {
      memcpy(pack, ptr, size);
      sobj->pack = pack;
      sobj->ty   = ty;
      sobj->size = size;
    } else {
      PyObject_DEL((PyObject *) sobj);
      sobj = 0;
    }
  }
  return (PyObject *) sobj;
}

SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
{
  if (SwigPyPacked_Check(obj)) {
    SwigPyPacked *sobj = (SwigPyPacked *)obj;
    if (sobj->size != size) return 0;
    memcpy(ptr, sobj->pack, size);
    return sobj->ty;
  } else {
    return 0;
  }
}

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

SWIGRUNTIMEINLINE PyObject *
_SWIG_This(void)
{
    return SWIG_Python_str_FromChar("this");
}

static PyObject *swig_this = NULL;

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  if (swig_this == NULL)
    swig_this = _SWIG_This();
  return swig_this;
}

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

/* TODO: I don't know how to implement the fast getset in Python 3 right now */
#if PY_VERSION_HEX>=0x03000000
#define SWIG_PYTHON_SLOW_GETSET_THIS 
#endif

SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject *pyobj) 
{
  PyObject *obj;

  if (SwigPyObject_Check(pyobj))
    return (SwigPyObject *) pyobj;

#ifdef SWIGPYTHON_BUILTIN
  (void)obj;
# ifdef PyWeakref_CheckProxy
  if (PyWeakref_CheckProxy(pyobj)) {
    pyobj = PyWeakref_GET_OBJECT(pyobj);
    if (pyobj && SwigPyObject_Check(pyobj))
      return (SwigPyObject*) pyobj;
  }
# endif
  return NULL;
#else

  obj = 0;

#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
  if (PyInstance_Check(pyobj)) {
    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
  } else {
    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    if (dictptr != NULL) {
      PyObject *dict = *dictptr;
      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    } else {
#ifdef PyWeakref_CheckProxy
      if (PyWeakref_CheckProxy(pyobj)) {
	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
      }
#endif
      obj = PyObject_GetAttr(pyobj,SWIG_This());
      if (obj) {
	Py_DECREF(obj);
      } else {
	if (PyErr_Occurred()) PyErr_Clear();
	return 0;
      }
    }
  }
#else
  obj = PyObject_GetAttr(pyobj,SWIG_This());
  if (obj) {
    Py_DECREF(obj);
  } else {
    if (PyErr_Occurred()) PyErr_Clear();
    return 0;
  }
#endif
  if (obj && !SwigPyObject_Check(obj)) {
    /* a PyObject is called 'this', try to get the 'real this'
       SwigPyObject from it */ 
    return SWIG_Python_GetSwigThis(obj);
  }
  return (SwigPyObject *)obj;
#endif
}

/* Acquire a pointer value */

SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  if (own == SWIG_POINTER_OWN) {
    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    if (sobj) {
      int oldown = sobj->own;
      sobj->own = own;
      return oldown;
    }
  }
  return 0;
}

/* Convert a pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  int res;
  SwigPyObject *sobj;

  if (!obj)
    return SWIG_ERROR;
  if (obj == Py_None) {
    if (ptr)
      *ptr = 0;
    return SWIG_OK;
  }

  res = SWIG_ERROR;

  sobj = SWIG_Python_GetSwigThis(obj);
  if (own)
    *own = 0;
  while (sobj) {
    void *vptr = sobj->ptr;
    if (ty) {
      swig_type_info *to = sobj->ty;
      if (to == ty) {
        /* no type cast needed */
        if (ptr) *ptr = vptr;
        break;
      } else {
        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
        if (!tc) {
          sobj = (SwigPyObject *)sobj->next;
        } else {
          if (ptr) {
            int newmemory = 0;
            *ptr = SWIG_TypeCast(tc,vptr,&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;
            }
          }
          break;
        }
      }
    } else {
      if (ptr) *ptr = vptr;
      break;
    }
  }
  if (sobj) {
    if (own)
      *own = *own | sobj->own;
    if (flags & SWIG_POINTER_DISOWN) {
      sobj->own = 0;
    }
    res = SWIG_OK;
  } else {
    if (flags & SWIG_POINTER_IMPLICIT_CONV) {
      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
      if (data && !data->implicitconv) {
        PyObject *klass = data->klass;
        if (klass) {
          PyObject *impconv;
          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
          impconv = SWIG_Python_CallFunctor(klass, obj);
          data->implicitconv = 0;
          if (PyErr_Occurred()) {
            PyErr_Clear();
            impconv = 0;
          }
          if (impconv) {
            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
            if (iobj) {
              void *vptr;
              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
              if (SWIG_IsOK(res)) {
                if (ptr) {
                  *ptr = vptr;
                  /* transfer the ownership to 'ptr' */
                  iobj->own = 0;
                  res = SWIG_AddCast(res);
                  res = SWIG_AddNewMask(res);
                } else {
                  res = SWIG_AddCast(res);		    
                }
              }
            }
            Py_DECREF(impconv);
          }
        }
      }
    }
  }
  return res;
}

/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  if (!PyCFunction_Check(obj)) {
    return SWIG_ConvertPtr(obj, ptr, ty, 0);
  } else {
    void *vptr = 0;
    
    /* here we get the method pointer for callbacks */
    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    if (desc)
      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    if (!desc) 
      return SWIG_ERROR;
    if (ty) {
      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
      if (tc) {
        int newmemory = 0;
        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
        assert(!newmemory); /* newmemory handling not yet implemented */
      } else {
        return SWIG_ERROR;
      }
    } else {
      *ptr = vptr;
    }
    return SWIG_OK;
  }
}

/* Convert a packed value value */

SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  if (!to) return SWIG_ERROR;
  if (ty) {
    if (to != ty) {
      /* check type cast? */
      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
      if (!tc) return SWIG_ERROR;
    }
  }
  return SWIG_OK;
}  

/* -----------------------------------------------------------------------------
 * Create a new pointer object
 * ----------------------------------------------------------------------------- */

/*
  Create a new instance object, without calling __init__, and set the
  'this' attribute.
*/

SWIGRUNTIME PyObject* 
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{
#if (PY_VERSION_HEX >= 0x02020000)
  PyObject *inst = 0;
  PyObject *newraw = data->newraw;
  if (newraw) {
    inst = PyObject_Call(newraw, data->newargs, NULL);
    if (inst) {
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
      PyObject **dictptr = _PyObject_GetDictPtr(inst);
      if (dictptr != NULL) {
	PyObject *dict = *dictptr;
	if (dict == NULL) {
	  dict = PyDict_New();
	  *dictptr = dict;
	  PyDict_SetItem(dict, SWIG_This(), swig_this);
	}
      }
#else
      PyObject *key = SWIG_This();
      PyObject_SetAttr(inst, key, swig_this);
#endif
    }
  } else {
#if PY_VERSION_HEX >= 0x03000000
    inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
    PyObject_SetAttr(inst, SWIG_This(), swig_this);
    Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
#else
    PyObject *dict = PyDict_New();
    PyDict_SetItem(dict, SWIG_This(), swig_this);
    inst = PyInstance_NewRaw(data->newargs, dict);
    Py_DECREF(dict);
#endif
  }
  return inst;
#else
#if (PY_VERSION_HEX >= 0x02010000)
  PyObject *inst;
  PyObject *dict = PyDict_New();
  PyDict_SetItem(dict, SWIG_This(), swig_this);
  inst = PyInstance_NewRaw(data->newargs, dict);
  Py_DECREF(dict);
  return (PyObject *) inst;
#else
  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
  if (inst == NULL) {
    return NULL;
  }
  inst->in_class = (PyClassObject *)data->newargs;
  Py_INCREF(inst->in_class);
  inst->in_dict = PyDict_New();
  if (inst->in_dict == NULL) {
    Py_DECREF(inst);
    return NULL;
  }
#ifdef Py_TPFLAGS_HAVE_WEAKREFS
  inst->in_weakreflist = NULL;
#endif
#ifdef Py_TPFLAGS_GC
  PyObject_GC_Init(inst);
#endif
  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
  return (PyObject *) inst;
#endif
#endif
}

SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{
 PyObject *dict;
#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
 PyObject **dictptr = _PyObject_GetDictPtr(inst);
 if (dictptr != NULL) {
   dict = *dictptr;
   if (dict == NULL) {
     dict = PyDict_New();
     *dictptr = dict;
   }
   PyDict_SetItem(dict, SWIG_This(), swig_this);
   return;
 }
#endif
 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
 PyDict_SetItem(dict, SWIG_This(), swig_this);
 Py_DECREF(dict);
} 


SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject *args) {
  PyObject *obj[2];
  if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
    return NULL;
  } else {
    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    if (sthis) {
      SwigPyObject_append((PyObject*) sthis, obj[1]);
    } else {
      SWIG_Python_SetSwigThis(obj[0], obj[1]);
    }
    return SWIG_Py_Void();
  }
}

/* Create a new pointer object */

SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  SwigPyClientData *clientdata;
  PyObject * robj;
  int own;

  if (!ptr)
    return SWIG_Py_Void();

  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  if (clientdata && clientdata->pytype) {
    SwigPyObject *newobj;
    if (flags & SWIG_BUILTIN_TP_INIT) {
      newobj = (SwigPyObject*) self;
      if (newobj->ptr) {
        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
        while (newobj->next)
	  newobj = (SwigPyObject *) newobj->next;
        newobj->next = next_self;
        newobj = (SwigPyObject *)next_self;
      }
    } else {
      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
    }
    if (newobj) {
      newobj->ptr = ptr;
      newobj->ty = type;
      newobj->own = own;
      newobj->next = 0;
#ifdef SWIGPYTHON_BUILTIN
      newobj->dict = 0;
#endif
      return (PyObject*) newobj;
    }
    return SWIG_Py_Void();
  }

  assert(!(flags & SWIG_BUILTIN_TP_INIT));

  robj = SwigPyObject_New(ptr, type, own);
  if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    if (inst) {
      Py_DECREF(robj);
      robj = inst;
    }
  }
  return robj;
}

/* Create a new packed object */

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
}

/* -----------------------------------------------------------------------------*
 *  Get type list 
 * -----------------------------------------------------------------------------*/

#ifdef SWIG_LINK_RUNTIME
void *SWIG_ReturnGlobalTypeList(void *);
#endif

SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void) {
  static void *type_pointer = (void *)0;
  /* first check if module already created */
  if (!type_pointer) {
#ifdef SWIG_LINK_RUNTIME
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
#else
# ifdef SWIGPY_USE_CAPSULE
    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
# else
    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
# endif
    if (PyErr_Occurred()) {
      PyErr_Clear();
      type_pointer = (void *)0;
    }
#endif
  }
  return (swig_module_info *) type_pointer;
}

#if PY_MAJOR_VERSION < 2
/* PyModule_AddObject function was introduced in Python 2.0.  The following function
   is copied out of Python/modsupport.c in python version 2.3.4 */
SWIGINTERN int
PyModule_AddObject(PyObject *m, char *name, PyObject *o)
{
  PyObject *dict;
  if (!PyModule_Check(m)) {
    PyErr_SetString(PyExc_TypeError,
		    "PyModule_AddObject() needs module as first arg");
    return SWIG_ERROR;
  }
  if (!o) {
    PyErr_SetString(PyExc_TypeError,
		    "PyModule_AddObject() needs non-NULL value");
    return SWIG_ERROR;
  }
  
  dict = PyModule_GetDict(m);
  if (dict == NULL) {
    /* Internal error -- modules must have a dict! */
    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
		 PyModule_GetName(m));
    return SWIG_ERROR;
  }
  if (PyDict_SetItemString(dict, name, o))
    return SWIG_ERROR;
  Py_DECREF(o);
  return SWIG_OK;
}
#endif

SWIGRUNTIME void
#ifdef SWIGPY_USE_CAPSULE
SWIG_Python_DestroyModule(PyObject *obj)
#else
SWIG_Python_DestroyModule(void *vptr)
#endif
{
#ifdef SWIGPY_USE_CAPSULE
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
#else
  swig_module_info *swig_module = (swig_module_info *) vptr;
#endif
  swig_type_info **types = swig_module->types;
  size_t i;
  for (i =0; i < swig_module->size; ++i) {
    swig_type_info *ty = types[i];
    if (ty->owndata) {
      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
      if (data) SwigPyClientData_Del(data);
    }
  }
  Py_DECREF(SWIG_This());
  swig_this = NULL;
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000
 /* Add a dummy module object into sys.modules */
  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
#else
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif
#ifdef SWIGPY_USE_CAPSULE
  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
#else
  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
#endif
}

/* The python cached type query */
SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void) {
  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  return cache;
}

SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char *type)
{
  PyObject *cache = SWIG_Python_TypeCache();
  PyObject *key = SWIG_Python_str_FromChar(type); 
  PyObject *obj = PyDict_GetItem(cache, key);
  swig_type_info *descriptor;
  if (obj) {
#ifdef SWIGPY_USE_CAPSULE
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
#else
    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif
  } else {
    swig_module_info *swig_module = SWIG_Python_GetModule();
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE
      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
#else
      obj = PyCObject_FromVoidPtr(descriptor, NULL);
#endif
      PyDict_SetItem(cache, key, obj);
      Py_DECREF(obj);
    }
  }
  Py_DECREF(key);
  return descriptor;
}

/* 
   For backward compatibility only
*/
#define SWIG_POINTER_EXCEPTION  0
#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)

SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char* mesg, int infront)
{  
  if (PyErr_Occurred()) {
    PyObject *type = 0;
    PyObject *value = 0;
    PyObject *traceback = 0;
    PyErr_Fetch(&type, &value, &traceback);
    if (value) {
      char *tmp;
      PyObject *old_str = PyObject_Str(value);
      Py_XINCREF(type);
      PyErr_Clear();
      if (infront) {
	PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
      } else {
	PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
      }
      SWIG_Python_str_DelForPy3(tmp);
      Py_DECREF(old_str);
    }
    return 1;
  } else {
    return 0;
  }
}
  
SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)
{
  if (PyErr_Occurred()) {
    /* add information about failing argument */
    char mesg[256];
    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
    return SWIG_Python_AddErrMesg(mesg, 1);
  } else {
    return 0;
  }
}

SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject *self)
{
  SwigPyObject *v = (SwigPyObject *)self;
  swig_type_info *ty = v ? v->ty : 0;
  return ty ? ty->str : (char*)"";
}

SWIGRUNTIME void
SWIG_Python_TypeError(const char *type, PyObject *obj)
{
  if (type) {
#if defined(SWIG_COBJECT_TYPES)
    if (obj && SwigPyObject_Check(obj)) {
      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
      if (otype) {
	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
		     type, otype);
	return;
      }
    } else 
#endif      
    {
      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
      if (otype) {
	PyObject *str = PyObject_Str(obj);
	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
	if (cstr) {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
		       type, otype, cstr);
          SWIG_Python_str_DelForPy3(cstr);
	} else {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
		       type, otype);
	}
	Py_XDECREF(str);
	return;
      }
    }   
    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  } else {
    PyErr_Format(PyExc_TypeError, "unexpected type is received");
  }
}


/* Convert a pointer value, signal an exception on a type mismatch */
SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  void *result;
  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    PyErr_Clear();
#if SWIG_POINTER_EXCEPTION
    if (flags) {
      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
      SWIG_Python_ArgFail(argnum);
    }
#endif
  }
  return result;
}

SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  PyTypeObject *tp = obj->ob_type;
  PyObject *descr;
  PyObject *encoded_name;
  descrsetfunc f;
  int res;

#ifdef Py_USING_UNICODE
  if (PyString_Check(name)) {
    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
    if (!name)
      return -1;
  } else if (!PyUnicode_Check(name))
#else
  if (!PyString_Check(name))
#endif
  {
    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
    return -1;
  } else {
    Py_INCREF(name);
  }

  if (!tp->tp_dict) {
    if (PyType_Ready(tp) < 0)
      goto done;
  }

  res = -1;
  descr = _PyType_Lookup(tp, name);
  f = NULL;
  if (descr != NULL)
    f = descr->ob_type->tp_descr_set;
  if (!f) {
    if (PyString_Check(name)) {
      encoded_name = name;
      Py_INCREF(name);
    } else {
      encoded_name = PyUnicode_AsUTF8String(name);
    }
    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
    Py_DECREF(encoded_name);
  } else {
    res = f(descr, obj, value);
  }
  
  done:
  Py_DECREF(name);
  return res;
}


#ifdef __cplusplus
}
#endif



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

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



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

/* -----------------------------------------------------------------------------
 * director.swg
 *
 * This file contains support for director classes that proxy
 * method calls from C++ to Python extensions.
 * ----------------------------------------------------------------------------- */

#ifndef SWIG_DIRECTOR_PYTHON_HEADER_
#define SWIG_DIRECTOR_PYTHON_HEADER_

#ifdef __cplusplus

#include <string>
#include <iostream>
#include <exception>
#include <vector>
#include <map>


/*
  Use -DSWIG_PYTHON_DIRECTOR_NO_VTABLE if you don't want to generate a 'virtual
  table', and avoid multiple GetAttr calls to retrieve the python
  methods.
*/

#ifndef SWIG_PYTHON_DIRECTOR_NO_VTABLE
#ifndef SWIG_PYTHON_DIRECTOR_VTABLE
#define SWIG_PYTHON_DIRECTOR_VTABLE
#endif
#endif



/*
  Use -DSWIG_DIRECTOR_NO_UEH if you prefer to avoid the use of the
  Undefined Exception Handler provided by swift
*/
#ifndef SWIG_DIRECTOR_NO_UEH
#ifndef SWIG_DIRECTOR_UEH
#define SWIG_DIRECTOR_UEH
#endif
#endif


/*
  Use -DSWIG_DIRECTOR_STATIC if you prefer to avoid the use of the
  'Swig' namespace. This could be useful for multi-modules projects.
*/
#ifdef SWIG_DIRECTOR_STATIC
/* Force anonymous (static) namespace */
#define Swig
#endif


/*
  Use -DSWIG_DIRECTOR_NORTTI if you prefer to avoid the use of the
  native C++ RTTI and dynamic_cast<>. But be aware that directors
  could stop working when using this option.
*/
#ifdef SWIG_DIRECTOR_NORTTI
/* 
   When we don't use the native C++ RTTI, we implement a minimal one
   only for Directors.
*/
# ifndef SWIG_DIRECTOR_RTDIR
# define SWIG_DIRECTOR_RTDIR
#include <map>

namespace Swig {
  class Director;
  SWIGINTERN std::map<void*,Director*>& get_rtdir_map() {
    static std::map<void*,Director*> rtdir_map;
    return rtdir_map;
  }

  SWIGINTERNINLINE void set_rtdir(void *vptr, Director *rtdir) {
    get_rtdir_map()[vptr] = rtdir;
  }

  SWIGINTERNINLINE Director *get_rtdir(void *vptr) {
    std::map<void*,Director*>::const_iterator pos = get_rtdir_map().find(vptr);
    Director *rtdir = (pos != get_rtdir_map().end()) ? pos->second : 0;
    return rtdir;
  }
}
# endif /* SWIG_DIRECTOR_RTDIR */

# define SWIG_DIRECTOR_CAST(ARG) Swig::get_rtdir(static_cast<void*>(ARG))
# define SWIG_DIRECTOR_RGTR(ARG1, ARG2) Swig::set_rtdir(static_cast<void*>(ARG1), ARG2)

#else

# define SWIG_DIRECTOR_CAST(ARG) dynamic_cast<Swig::Director *>(ARG)
# define SWIG_DIRECTOR_RGTR(ARG1, ARG2)

#endif /* SWIG_DIRECTOR_NORTTI */

extern "C" {
  struct swig_type_info;
}

namespace Swig {  

  /* memory handler */
  struct GCItem 
  {
    virtual ~GCItem() {}

    virtual int get_own() const
    {
      return 0;
    }
  };

  struct GCItem_var
  {
    GCItem_var(GCItem *item = 0) : _item(item)
    {
    }

    GCItem_var& operator=(GCItem *item)
    {
      GCItem *tmp = _item;
      _item = item;
      delete tmp;
      return *this;
    }

    ~GCItem_var() 
    {
      delete _item;
    }
    
    GCItem * operator->() const
    {
      return _item;
    }
    
  private:
    GCItem *_item;
  };
  
  struct GCItem_Object : GCItem
  {
    GCItem_Object(int own) : _own(own)
    {
    }
    
    virtual ~GCItem_Object() 
    {
    }

    int get_own() const
    {
      return _own;
    }
    
  private:
    int _own;
  };

  template <typename Type>
  struct GCItem_T : GCItem
  {
    GCItem_T(Type *ptr) : _ptr(ptr)
    {
    }
    
    virtual ~GCItem_T() 
    {
      delete _ptr;
    }
    
  private:
    Type *_ptr;
  };

  template <typename Type>
  struct GCArray_T : GCItem
  {
    GCArray_T(Type *ptr) : _ptr(ptr)
    {
    }
    
    virtual ~GCArray_T() 
    {
      delete[] _ptr;
    }
    
  private:
    Type *_ptr;
  };

  /* base class for director exceptions */
  class DirectorException {
  protected:
    std::string swig_msg;
  public:
    DirectorException(PyObject *error, const char* hdr ="", const char* msg ="") 
      : swig_msg(hdr)
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
      if (strlen(msg)) {
        swig_msg += " ";
        swig_msg += msg;
      }
      if (!PyErr_Occurred()) {
        PyErr_SetString(error, getMessage());
      }
      SWIG_PYTHON_THREAD_END_BLOCK; 
    }

    const char *getMessage() const
    { 
      return swig_msg.c_str(); 
    }

    static void raise(PyObject *error, const char *msg) 
    {
      throw DirectorException(error, msg);
    }

    static void raise(const char *msg) 
    {
      raise(PyExc_RuntimeError, msg);
    }
  };

  /* unknown exception handler  */
  class UnknownExceptionHandler 
  {
#ifdef SWIG_DIRECTOR_UEH
    static void handler()  {
      try {
        throw;
      } catch (DirectorException& e) {
        std::cerr << "SWIG Director exception caught:" << std::endl
                  << e.getMessage() << std::endl;
      } catch (std::exception& e) {
        std::cerr << "std::exception caught: "<< e.what() << std::endl;
      } catch (...) {
        std::cerr << "Unknown exception caught." << std::endl;
      }
      
      std::cerr << std::endl
                << "Python interpreter traceback:" << std::endl;
      PyErr_Print();
      std::cerr << std::endl;
      
      std::cerr << "This exception was caught by the SWIG unexpected exception handler." << std::endl
                << "Try using %feature(\"director:except\") to avoid reaching this point." << std::endl
                << std::endl
                << "Exception is being re-thrown, program will likely abort/terminate." << std::endl;
      throw;
    }

  public:
    
    std::unexpected_handler old;
    UnknownExceptionHandler(std::unexpected_handler nh = handler)
    {
      old = std::set_unexpected(nh);
    }

    ~UnknownExceptionHandler()
    {
      std::set_unexpected(old);
    }
#endif
  };

  /* type mismatch in the return value from a python method call */
  class DirectorTypeMismatchException : public Swig::DirectorException {
  public:
    DirectorTypeMismatchException(PyObject *error, const char* msg="") 
      : Swig::DirectorException(error, "SWIG director type mismatch", msg)
    {
    }

    DirectorTypeMismatchException(const char* msg="") 
      : Swig::DirectorException(PyExc_TypeError, "SWIG director type mismatch", msg)
    {
    }

    static void raise(PyObject *error, const char *msg)
    {
      throw DirectorTypeMismatchException(error, msg);
    }

    static void raise(const char *msg)
    {
      throw DirectorTypeMismatchException(msg);
    }
  };

  /* any python exception that occurs during a director method call */
  class DirectorMethodException : public Swig::DirectorException {
  public:
    DirectorMethodException(const char* msg = "") 
      : DirectorException(PyExc_RuntimeError, "SWIG director method error.", msg)
    {
    }    

    static void raise(const char *msg)
    {
      throw DirectorMethodException(msg);
    }
  };

  /* attempt to call a pure virtual method via a director method */
  class DirectorPureVirtualException : public Swig::DirectorException
  {
  public:
    DirectorPureVirtualException(const char* msg = "") 
      : DirectorException(PyExc_RuntimeError, "SWIG director pure virtual method called", msg)
    { 
    }

    static void raise(const char *msg) 
    {
      throw DirectorPureVirtualException(msg);
    }
  };


#if defined(SWIG_PYTHON_THREADS)
/*  __THREAD__ is the old macro to activate some thread support */
# if !defined(__THREAD__)
#   define __THREAD__ 1
# endif
#endif

#ifdef __THREAD__
# include "pythread.h"
  class Guard
  {
    PyThread_type_lock & mutex_;
    
  public:
    Guard(PyThread_type_lock & mutex) : mutex_(mutex)
    {
      PyThread_acquire_lock(mutex_, WAIT_LOCK);
    }
    
    ~Guard()
    {
      PyThread_release_lock(mutex_);
    }
  };
# define SWIG_GUARD(mutex) Guard _guard(mutex)
#else
# define SWIG_GUARD(mutex) 
#endif

  /* director base class */
  class Director {
  private:
    /* pointer to the wrapped python object */
    PyObject* swig_self;
    /* flag indicating whether the object is owned by python or c++ */
    mutable bool swig_disown_flag;

    /* decrement the reference count of the wrapped python object */
    void swig_decref() const { 
      if (swig_disown_flag) {
        SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
        Py_DECREF(swig_self); 
        SWIG_PYTHON_THREAD_END_BLOCK; 
      }
    }

  public:
    /* wrap a python object, optionally taking ownership */
    Director(PyObject* self) : swig_self(self), swig_disown_flag(false) {
      swig_incref();
    }


    /* discard our reference at destruction */
    virtual ~Director() {
      swig_decref(); 
    }


    /* return a pointer to the wrapped python object */
    PyObject *swig_get_self() const { 
      return swig_self; 
    }

    /* acquire ownership of the wrapped python object (the sense of "disown"
     * is from python) */
    void swig_disown() const { 
      if (!swig_disown_flag) { 
        swig_disown_flag=true;
        swig_incref(); 
      } 
    }

    /* increase the reference count of the wrapped python object */
    void swig_incref() const { 
      if (swig_disown_flag) {
        Py_INCREF(swig_self); 
      }
    }

    /* methods to implement pseudo protected director members */
    virtual bool swig_get_inner(const char* /* swig_protected_method_name */) const {
      return true;
    }
    
    virtual void swig_set_inner(const char* /* swig_protected_method_name */, bool /* swig_val */) const {
    }

  /* ownership management */
  private:
    typedef std::map<void*, GCItem_var> swig_ownership_map;
    mutable swig_ownership_map swig_owner;
#ifdef __THREAD__
    static PyThread_type_lock swig_mutex_own;
#endif

  public:
    template <typename Type>
    void swig_acquire_ownership_array(Type *vptr)  const
    {
      if (vptr) {
        SWIG_GUARD(swig_mutex_own);
        swig_owner[vptr] = new GCArray_T<Type>(vptr);
      }
    }
    
    template <typename Type>
    void swig_acquire_ownership(Type *vptr)  const
    {
      if (vptr) {
        SWIG_GUARD(swig_mutex_own);
        swig_owner[vptr] = new GCItem_T<Type>(vptr);
      }
    }

    void swig_acquire_ownership_obj(void *vptr, int own) const
    {
      if (vptr && own) {
        SWIG_GUARD(swig_mutex_own);
        swig_owner[vptr] = new GCItem_Object(own);
      }
    }
    
    int swig_release_ownership(void *vptr) const
    {
      int own = 0;
      if (vptr) {
        SWIG_GUARD(swig_mutex_own);
        swig_ownership_map::iterator iter = swig_owner.find(vptr);
        if (iter != swig_owner.end()) {
          own = iter->second->get_own();
          swig_owner.erase(iter);
        }
      }
      return own;
    }

    template <typename Type>
    static PyObject* swig_pyobj_disown(PyObject *pyobj, PyObject *SWIGUNUSEDPARM(args))
    {
      SwigPyObject *sobj = (SwigPyObject *)pyobj;
      sobj->own = 0;
      Director *d = SWIG_DIRECTOR_CAST(reinterpret_cast<Type *>(sobj->ptr));
      if (d)
        d->swig_disown();
      return PyWeakref_NewProxy(pyobj, NULL);
    }

  };

#ifdef __THREAD__
  PyThread_type_lock Director::swig_mutex_own = PyThread_allocate_lock();
#endif
}

#endif /* __cplusplus */


#endif

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

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

#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
#  error "This python version requires swig to be run with the '-classic' option"
# endif
#endif
#if (PY_VERSION_HEX <= 0x02020000)
# error "This python version requires swig to be run with the '-nomodern' option"
#endif
#if (PY_VERSION_HEX <= 0x02020000)
# error "This python version requires swig to be run with the '-nomodernargs' option"
#endif
#ifndef METH_O
# error "This python version requires swig to be run with the '-nofastunpack' option"
#endif
#ifdef SWIG_TypeQuery
# undef SWIG_TypeQuery
#endif
#define SWIG_TypeQuery SWIG_Python_TypeQuery

/*-----------------------------------------------
              @(target):= _xapian.so
  ------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_init    PyInit__xapian

#else
#  define SWIG_init    init_xapian

#endif
#define SWIG_name    "_xapian"

#define SWIGVERSION 0x020005 
#define SWIG_VERSION SWIGVERSION


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


#include <stdexcept>


namespace swig {
  class SwigPtr_PyObject {
  protected:
    PyObject *_obj;

  public:
    SwigPtr_PyObject() :_obj(0)
    {
    }

    SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    {
      Py_XINCREF(_obj);      
    }
    
    SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    {
      if (initial_ref) {
        Py_XINCREF(_obj);
      }
    }
    
    SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    {
      Py_XINCREF(item._obj);
      Py_XDECREF(_obj);
      _obj = item._obj;
      return *this;      
    }
    
    ~SwigPtr_PyObject() 
    {
      Py_XDECREF(_obj);
    }
    
    operator PyObject *() const
    {
      return _obj;
    }

    PyObject *operator->() const
    {
      return _obj;
    }
  };
}


namespace swig {
  struct SwigVar_PyObject : SwigPtr_PyObject {
    SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    
    SwigVar_PyObject & operator = (PyObject* obj)
    {
      Py_XDECREF(_obj);
      _obj = obj;
      return *this;      
    }
  };
}


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


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

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

#include <xapian.h>

#include <string>
#include <vector>

using namespace std;

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

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

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

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

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

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

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

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


#include <stdexcept>


#if defined(__GNUC__)
#  if __GNUC__ == 2 && __GNUC_MINOR <= 96
#     define SWIG_STD_NOMODERN_STL
#  endif
#endif


#include <string>
#include <stdexcept>
#include <stddef.h>


#include <string>


#include <iostream>

#if PY_VERSION_HEX >= 0x03020000
# define SWIGPY_SLICE_ARG(obj) ((PyObject*) (obj))
#else
# define SWIGPY_SLICE_ARG(obj) ((PySliceObject*) (obj))
#endif

  
namespace swig {
  struct stop_iteration {
  };

  struct SwigPyIterator {
  private:
    SwigPtr_PyObject _seq;

  protected:
    SwigPyIterator(PyObject *seq) : _seq(seq)
    {
    }
      
  public:
    virtual ~SwigPyIterator() {}

    // Access iterator method, required by Python
    virtual PyObject *value() const = 0;

    // Forward iterator method, required by Python
    virtual SwigPyIterator *incr(size_t n = 1) = 0;
    
    // Backward iterator method, very common in C++, but not required in Python
    virtual SwigPyIterator *decr(size_t /*n*/ = 1)
    {
      throw stop_iteration();
    }

    // Random access iterator methods, but not required in Python
    virtual ptrdiff_t distance(const SwigPyIterator &/*x*/) const
    {
      throw std::invalid_argument("operation not supported");
    }

    virtual bool equal (const SwigPyIterator &/*x*/) const
    {
      throw std::invalid_argument("operation not supported");
    }
    
    // C++ common/needed methods
    virtual SwigPyIterator *copy() const = 0;

    PyObject *next()     
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads       
      PyObject *obj = value();
      incr();       
      SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads
      return obj;     
    }

    /* Make an alias for Python 3.x */
    PyObject *__next__()
    {
      return next();
    }

    PyObject *previous()
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK; // disable threads       
      decr();
      PyObject *obj = value();
      SWIG_PYTHON_THREAD_END_BLOCK; // re-enable threads       
      return obj;
    }

    SwigPyIterator *advance(ptrdiff_t n)
    {
      return  (n > 0) ?  incr(n) : decr(-n);
    }
      
    bool operator == (const SwigPyIterator& x)  const
    {
      return equal(x);
    }
      
    bool operator != (const SwigPyIterator& x) const
    {
      return ! operator==(x);
    }
      
    SwigPyIterator& operator += (ptrdiff_t n)
    {
      return *advance(n);
    }

    SwigPyIterator& operator -= (ptrdiff_t n)
    {
      return *advance(-n);
    }
      
    SwigPyIterator* operator + (ptrdiff_t n) const
    {
      return copy()->advance(n);
    }

    SwigPyIterator* operator - (ptrdiff_t n) const
    {
      return copy()->advance(-n);
    }
      
    ptrdiff_t operator - (const SwigPyIterator& x) const
    {
      return x.distance(*this);
    }
      
    static swig_type_info* descriptor() {
      static int init = 0;
      static swig_type_info* desc = 0;
      if (!init) {
	desc = SWIG_TypeQuery("swig::SwigPyIterator *");
	init = 1;
      }	
      return desc;
    }    
  };

#if defined(SWIGPYTHON_BUILTIN)
  inline PyObject* make_output_iterator_builtin (PyObject *pyself)
  {
    Py_INCREF(pyself);
    return pyself;
  }
#endif
}


SWIGINTERN int
SWIG_AsVal_double (PyObject *obj, double *val)
{
  int res = SWIG_TypeError;
  if (PyFloat_Check(obj)) {
    if (val) *val = PyFloat_AsDouble(obj);
    return SWIG_OK;
  } else if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else if (PyLong_Check(obj)) {
    double v = PyLong_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    double d = PyFloat_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = d;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      long v = PyLong_AsLong(obj);
      if (!PyErr_Occurred()) {
	if (val) *val = v;
	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
      } else {
	PyErr_Clear();
      }
    }
  }
#endif
  return res;
}


#include <float.h>


#include <math.h>


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


SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
{
  if (PyInt_Check(obj)) {
    long v = PyInt_AsLong(obj);
    if (v >= 0) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else if (PyLong_Check(obj)) {
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


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


  #define SWIG_From_long   PyLong_FromLong 


SWIGINTERNINLINE PyObject *
SWIG_From_ptrdiff_t  (ptrdiff_t value)
{    
  return SWIG_From_long  (static_cast< long >(value));
}


SWIGINTERNINLINE PyObject*
  SWIG_From_bool  (bool value)
{
  return PyBool_FromLong(value ? 1 : 0);
}


SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    long v = PyInt_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


SWIGINTERNINLINE int
SWIG_AsVal_ptrdiff_t (PyObject * obj, ptrdiff_t *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, val ? &v : 0);
  if (SWIG_IsOK(res) && val) *val = static_cast< ptrdiff_t >(v);
  return res;
}


#include <stdexcept>


#include <algorithm>


#include <vector>


#include <utility>


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


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


/* python/extracomments.i: Custom written documentation comments.
 *
 * Copyright (C) 2007 Lemur Consulting Ltd
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */


SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long  (unsigned long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLong(value) : PyLong_FromLong(static_cast< long >(value)); 
}


SWIGINTERNINLINE PyObject *
SWIG_From_unsigned_SS_int  (unsigned int value)
{    
  return SWIG_From_unsigned_SS_long  (value);
}


namespace Xapian {
    Query *get_py_query(PyObject *obj) {
#if PY_VERSION_HEX < 0x02050000
	// In Python 2.4 (and presumably earlier), PyObject_GetAttrString()
	// takes a char* parameter which causes a warning with GCC >= 4.2.
	// This is fixed in Python 2.5.
	PyObject * mythis = PyObject_GetAttrString(obj, (char *)"this");
#else
	PyObject * mythis = PyObject_GetAttrString(obj, "this");
#endif
	if (!mythis)
	    return 0;

	Query * retval = 0;
	int res = SWIG_ConvertPtr(mythis, (void **)&retval,
				  SWIGTYPE_p_Xapian__Query, 0);
	if (!SWIG_IsOK(res)) {
	    retval = 0;
	}
	Py_DECREF(mythis);
	return retval;
    }
}


#define MSET_DID 0
#define MSET_WT 1
#define MSET_RANK 2
#define MSET_PERCENT 3
#define MSET_DOCUMENT 4

#define ESET_TNAME 0
#define ESET_WT 1


SWIGINTERNINLINE PyObject*
  SWIG_From_int  (int value)
{
  return PyInt_FromLong((long) value);
}


/* The GIL must be held when this is called. */
PyObject *Xapian_MSet_items_get(Xapian::MSet *mset)
{
    PyObject *retval = PyList_New(mset->size());
    if (retval == 0) {
	return NULL;
    }

    Py_ssize_t idx = 0;
    for (Xapian::MSetIterator i = mset->begin(); i != mset->end(); ++i) {
	PyObject *t = PyTuple_New(4);
	if (!t) {
	    Py_DECREF(retval);
	    return NULL;
	}

	PyList_SET_ITEM(retval, idx++, t);

	PyTuple_SET_ITEM(t, MSET_DID, PyInt_FromLong(*i));
	PyTuple_SET_ITEM(t, MSET_WT, PyFloat_FromDouble(i.get_weight()));
	PyTuple_SET_ITEM(t, MSET_RANK, PyInt_FromLong(i.get_rank()));
	PyTuple_SET_ITEM(t, MSET_PERCENT, PyInt_FromLong(i.get_percent()));
    }
    return retval;
}


/* The GIL must be held when this is called. */
PyObject *Xapian_ESet_items_get(Xapian::ESet *eset)
{
    PyObject *retval = PyList_New(eset->size());
    if (retval == 0) {
	return NULL;
    }

    Py_ssize_t idx = 0;
    for (Xapian::ESetIterator i = eset->begin(); i != eset->end(); ++i) {
	PyObject *t = PyTuple_New(2);
	if (!t) {
	    Py_DECREF(retval);
	    return NULL;
	}

	PyList_SET_ITEM(retval, idx++, t);

#if PY_VERSION_HEX >= 0x03000000
	PyObject * str = PyBytes_FromStringAndSize((*i).data(), (*i).size());
#else
	PyObject * str = PyString_FromStringAndSize((*i).data(), (*i).size());
#endif
	if (str == 0) {
	    Py_DECREF(retval);
	    return NULL;
	}

	PyTuple_SET_ITEM(t, ESET_TNAME, str);
	PyTuple_SET_ITEM(t, ESET_WT, PyFloat_FromDouble(i.get_weight()));
    }
    return retval;
}


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


SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  if (carray) {
    if (size > INT_MAX) {
      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
      return pchar_descriptor ? 
	SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    } else {
#if PY_VERSION_HEX >= 0x03000000
      return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
#else
      return PyString_FromStringAndSize(carray, static_cast< int >(size));
#endif
    }
  } else {
    return SWIG_Py_Void();
  }
}


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


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

SWIGINTERN std::string Xapian_Error___str__(Xapian::Error const *self){
	std::string desc(self->get_msg());
	if (!self->get_context().empty()) {
	    desc += " (context: ";
	    desc += self->get_context();
	    desc += ')';
	}
	if (self->get_error_string()) {
	    desc += " (";
	    desc += self->get_error_string();
	    desc += ')';
	}
	return desc;
    }

SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
#if PY_VERSION_HEX>=0x03000000
  if (PyUnicode_Check(obj))
#else  
  if (PyString_Check(obj))
#endif
  {
    char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000
    if (!alloc && cptr) {
        /* We can't allow converting without allocation, since the internal
           representation of string in Python 3 is UCS-2/UCS-4 but we require
           a UTF-8 representation.
           TODO(bhy) More detailed explanation */
        return SWIG_RuntimeError;
    }
    obj = PyUnicode_AsUTF8String(obj);
    PyBytes_AsStringAndSize(obj, &cstr, &len);
    if(alloc) *alloc = SWIG_NEWOBJ;
#else
    PyString_AsStringAndSize(obj, &cstr, &len);
#endif
    if (cptr) {
      if (alloc) {
	/* 
	   In python the user should not be able to modify the inner
	   string representation. To warranty that, if you define
	   SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
	   buffer is always returned.

	   The default behavior is just to return the pointer value,
	   so, be careful.
	*/ 
#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
	if (*alloc != SWIG_OLDOBJ) 
#else
	if (*alloc == SWIG_NEWOBJ) 
#endif
	  {
	    *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
	    *alloc = SWIG_NEWOBJ;
	  }
	else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      } else {
        #if PY_VERSION_HEX>=0x03000000
        assert(0); /* Should never reach here in Python 3 */
        #endif
	*cptr = SWIG_Python_str_AsChar(obj);
      }
    }
    if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000
    Py_XDECREF(obj);
#endif
    return SWIG_OK;
  } else {
    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      void* vptr = 0;
      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = (char *) vptr;
	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsPtr_std_string (PyObject * 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;
}


/* Utility function which works like SWIG_AsPtr_std_string, but
 * converts unicode strings to UTF-8 simple strings first. */
static int
XapianSWIG_anystring_as_ptr(PyObject ** obj, std::string **val)
{
    if (PyUnicode_Check(*obj)) {
	PyObject * strobj = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(*obj), PyUnicode_GET_SIZE(*obj), "ignore");
	if (strobj == NULL) return SWIG_ERROR;
	int res = SWIG_AsPtr_std_string(strobj, val);
	Py_DECREF(strobj);
	return res;
    } else {
	return SWIG_AsPtr_std_string(*obj, val);
    }
}





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


SWIGINTERN int
SWIG_AsVal_int (PyObject * obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long (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;
}


namespace Xapian {
SWIGEXPORT void SetPythonException() {
    try {
	throw;
    } catch (Swig::DirectorException &e) {
	/* This happens if a director raised an exception.  The standard SWIG
	 * director exception handling code sets the Python error state if
	 * necessary, so we don't need to do anything. */
    } catch (const Xapian::RangeError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::RangeError(e)),
					     SWIGTYPE_p_Xapian__RangeError,
					     SWIG_POINTER_OWN),
			  "Xapian::RangeError",
			  SWIGTYPE_p_Xapian__RangeError);
    } catch (const Xapian::SerialisationError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::SerialisationError(e)),
					     SWIGTYPE_p_Xapian__SerialisationError,
					     SWIG_POINTER_OWN),
			  "Xapian::SerialisationError",
			  SWIGTYPE_p_Xapian__SerialisationError);
    } catch (const Xapian::QueryParserError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::QueryParserError(e)),
					     SWIGTYPE_p_Xapian__QueryParserError,
					     SWIG_POINTER_OWN),
			  "Xapian::QueryParserError",
			  SWIGTYPE_p_Xapian__QueryParserError);
    } catch (const Xapian::NetworkTimeoutError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::NetworkTimeoutError(e)),
					     SWIGTYPE_p_Xapian__NetworkTimeoutError,
					     SWIG_POINTER_OWN),
			  "Xapian::NetworkTimeoutError",
			  SWIGTYPE_p_Xapian__NetworkTimeoutError);
    } catch (const Xapian::NetworkError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::NetworkError(e)),
					     SWIGTYPE_p_Xapian__NetworkError,
					     SWIG_POINTER_OWN),
			  "Xapian::NetworkError",
			  SWIGTYPE_p_Xapian__NetworkError);
    } catch (const Xapian::InternalError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::InternalError(e)),
					     SWIGTYPE_p_Xapian__InternalError,
					     SWIG_POINTER_OWN),
			  "Xapian::InternalError",
			  SWIGTYPE_p_Xapian__InternalError);
    } catch (const Xapian::FeatureUnavailableError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::FeatureUnavailableError(e)),
					     SWIGTYPE_p_Xapian__FeatureUnavailableError,
					     SWIG_POINTER_OWN),
			  "Xapian::FeatureUnavailableError",
			  SWIGTYPE_p_Xapian__FeatureUnavailableError);
    } catch (const Xapian::DocNotFoundError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::DocNotFoundError(e)),
					     SWIGTYPE_p_Xapian__DocNotFoundError,
					     SWIG_POINTER_OWN),
			  "Xapian::DocNotFoundError",
			  SWIGTYPE_p_Xapian__DocNotFoundError);
    } catch (const Xapian::DatabaseVersionError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::DatabaseVersionError(e)),
					     SWIGTYPE_p_Xapian__DatabaseVersionError,
					     SWIG_POINTER_OWN),
			  "Xapian::DatabaseVersionError",
			  SWIGTYPE_p_Xapian__DatabaseVersionError);
    } catch (const Xapian::DatabaseOpeningError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::DatabaseOpeningError(e)),
					     SWIGTYPE_p_Xapian__DatabaseOpeningError,
					     SWIG_POINTER_OWN),
			  "Xapian::DatabaseOpeningError",
			  SWIGTYPE_p_Xapian__DatabaseOpeningError);
    } catch (const Xapian::DatabaseModifiedError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::DatabaseModifiedError(e)),
					     SWIGTYPE_p_Xapian__DatabaseModifiedError,
					     SWIG_POINTER_OWN),
			  "Xapian::DatabaseModifiedError",
			  SWIGTYPE_p_Xapian__DatabaseModifiedError);
    } catch (const Xapian::DatabaseLockError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::DatabaseLockError(e)),
					     SWIGTYPE_p_Xapian__DatabaseLockError,
					     SWIG_POINTER_OWN),
			  "Xapian::DatabaseLockError",
			  SWIGTYPE_p_Xapian__DatabaseLockError);
    } catch (const Xapian::DatabaseCreateError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::DatabaseCreateError(e)),
					     SWIGTYPE_p_Xapian__DatabaseCreateError,
					     SWIG_POINTER_OWN),
			  "Xapian::DatabaseCreateError",
			  SWIGTYPE_p_Xapian__DatabaseCreateError);
    } catch (const Xapian::DatabaseCorruptError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::DatabaseCorruptError(e)),
					     SWIGTYPE_p_Xapian__DatabaseCorruptError,
					     SWIG_POINTER_OWN),
			  "Xapian::DatabaseCorruptError",
			  SWIGTYPE_p_Xapian__DatabaseCorruptError);
    } catch (const Xapian::DatabaseError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::DatabaseError(e)),
					     SWIGTYPE_p_Xapian__DatabaseError,
					     SWIG_POINTER_OWN),
			  "Xapian::DatabaseError",
			  SWIGTYPE_p_Xapian__DatabaseError);
    } catch (const Xapian::UnimplementedError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::UnimplementedError(e)),
					     SWIGTYPE_p_Xapian__UnimplementedError,
					     SWIG_POINTER_OWN),
			  "Xapian::UnimplementedError",
			  SWIGTYPE_p_Xapian__UnimplementedError);
    } catch (const Xapian::InvalidOperationError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::InvalidOperationError(e)),
					     SWIGTYPE_p_Xapian__InvalidOperationError,
					     SWIG_POINTER_OWN),
			  "Xapian::InvalidOperationError",
			  SWIGTYPE_p_Xapian__InvalidOperationError);
    } catch (const Xapian::InvalidArgumentError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::InvalidArgumentError(e)),
					     SWIGTYPE_p_Xapian__InvalidArgumentError,
					     SWIG_POINTER_OWN),
			  "Xapian::InvalidArgumentError",
			  SWIGTYPE_p_Xapian__InvalidArgumentError);
    } catch (const Xapian::AssertionError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::AssertionError(e)),
					     SWIGTYPE_p_Xapian__AssertionError,
					     SWIG_POINTER_OWN),
			  "Xapian::AssertionError",
			  SWIGTYPE_p_Xapian__AssertionError);
    } catch (const Xapian::RuntimeError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::RuntimeError(e)),
					     SWIGTYPE_p_Xapian__RuntimeError,
					     SWIG_POINTER_OWN),
			  "Xapian::RuntimeError",
			  SWIGTYPE_p_Xapian__RuntimeError);
    } catch (const Xapian::LogicError &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::LogicError(e)),
					     SWIGTYPE_p_Xapian__LogicError,
					     SWIG_POINTER_OWN),
			  "Xapian::LogicError",
			  SWIGTYPE_p_Xapian__LogicError);
    } catch (const Xapian::Error &e) {
	SWIG_Python_Raise(SWIG_NewPointerObj((new Xapian::Error(e)),
					     SWIGTYPE_p_Xapian__Error,
					     SWIG_POINTER_OWN),
			  "Xapian::Error",
			  SWIGTYPE_p_Xapian__Error);
    } catch (const std::exception& e) {
        SWIG_Error(SWIG_RuntimeError, e.what());
    } catch (...) {
	SWIG_Error(SWIG_UnknownError, "unknown error in Xapian");
    }
}
}

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

SWIGINTERN int
SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long (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___eq__(Xapian::PositionIterator *self,Xapian::PositionIterator const &other){
	    return (*self)==other;
	}
SWIGINTERN bool Xapian_PositionIterator___ne__(Xapian::PositionIterator *self,Xapian::PositionIterator const &other){
	    return (*self)!=other;
	}
SWIGINTERN bool Xapian_PostingIterator___eq__(Xapian::PostingIterator *self,Xapian::PostingIterator const &other){
	    return (*self)==other;
	}
SWIGINTERN bool Xapian_PostingIterator___ne__(Xapian::PostingIterator *self,Xapian::PostingIterator const &other){
	    return (*self)!=other;
	}
SWIGINTERN Xapian::docid Xapian_PostingIterator_get_docid(Xapian::PostingIterator const *self){
	return *(*self);
    }
SWIGINTERN void Xapian_PostingIterator_next(Xapian::PostingIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_PostingIterator_equals(Xapian::PostingIterator const *self,Xapian::PostingIterator const &other){
	return (*self) == other;
    }
SWIGINTERN std::string Xapian_TermIterator_get_term(Xapian::TermIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_TermIterator_next(Xapian::TermIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_TermIterator_equals(Xapian::TermIterator const *self,Xapian::TermIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN bool Xapian_TermIterator___eq__(Xapian::TermIterator *self,Xapian::TermIterator const &other){
	    return (*self)==other;
	}
SWIGINTERN bool Xapian_TermIterator___ne__(Xapian::TermIterator *self,Xapian::TermIterator const &other){
	    return (*self)!=other;
	}
SWIGINTERN std::string Xapian_ValueIterator_get_value(Xapian::ValueIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_ValueIterator_next(Xapian::ValueIterator *self){ ++(*self); }
SWIGINTERN bool Xapian_ValueIterator_equals(Xapian::ValueIterator const *self,Xapian::ValueIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN bool Xapian_ValueIterator___eq__(Xapian::ValueIterator *self,Xapian::ValueIterator const &other){
	    return (*self)==other;
	}
SWIGINTERN bool Xapian_ValueIterator___ne__(Xapian::ValueIterator *self,Xapian::ValueIterator const &other){
	    return (*self)!=other;
	}

  #define SWIG_From_double   PyFloat_FromDouble 


SWIGINTERN int
SWIG_AsVal_bool (PyObject *obj, bool *val)
{
  int r = PyObject_IsTrue(obj);
  if (r == -1)
    return SWIG_ERROR;
  if (val) *val = r ? true : false;
  return SWIG_OK;
}

SWIGINTERN Xapian::MSetIterator Xapian_MSet_get_hit(Xapian::MSet const *self,Xapian::doccount i){
	    return ((*self)[i]);
	}
SWIGINTERN int Xapian_MSet_get_document_percentage(Xapian::MSet const *self,Xapian::doccount i){
	    return (*self).convert_to_percent( ((*self)[i]) );
	}
SWIGINTERN Xapian::Document const Xapian_MSet_get_document(Xapian::MSet const *self,Xapian::doccount i){
	    return ((*self)[i]).get_document();
	}
SWIGINTERN Xapian::docid Xapian_MSet_get_docid(Xapian::MSet const *self,Xapian::doccount i){
	    return *((*self)[i]);
	}
SWIGINTERN int Xapian_MSet___cmp__(Xapian::MSet *self,Xapian::MSet const &other){
	    if (self->get_max_possible() != other.get_max_possible()) {
		return (self->get_max_possible() < other.get_max_possible())? -1 : 1;
	    }
	    if (self->size() != other.size()) {
		return (self->size() < other.size())? -1 : 1;
	    }

	    for (size_t i=0; i<self->size(); ++i) {
		if (*(*self)[i] != *other[i]) {
		    return (*(*self)[i] < *other[i])? -1 : 1;
		}
		if ((*self)[i].get_weight() != other[i].get_weight()) {
		    return ((*self)[i].get_weight() < other[i].get_weight())? -1 : 1;
		}
	    }
	    return 0;
	}
SWIGINTERN Xapian::docid Xapian_MSetIterator_get_docid(Xapian::MSetIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_MSetIterator_next(Xapian::MSetIterator *self){ ++(*self); }
SWIGINTERN void Xapian_MSetIterator_prev(Xapian::MSetIterator *self){ --(*self); }
SWIGINTERN bool Xapian_MSetIterator_equals(Xapian::MSetIterator const *self,Xapian::MSetIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN bool Xapian_MSetIterator___eq__(Xapian::MSetIterator *self,Xapian::MSetIterator const &other){
	    return (*self)==other;
	}
SWIGINTERN bool Xapian_MSetIterator___ne__(Xapian::MSetIterator *self,Xapian::MSetIterator const &other){
	    return (*self)!=other;
	}
SWIGINTERN std::string Xapian_ESetIterator_get_term(Xapian::ESetIterator const *self){
	    return *(*self);
	}
SWIGINTERN void Xapian_ESetIterator_next(Xapian::ESetIterator *self){ ++(*self); }
SWIGINTERN void Xapian_ESetIterator_prev(Xapian::ESetIterator *self){ --(*self); }
SWIGINTERN bool Xapian_ESetIterator_equals(Xapian::ESetIterator const *self,Xapian::ESetIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN bool Xapian_ESetIterator___eq__(Xapian::ESetIterator *self,Xapian::ESetIterator const &other){
	    return (*self)==other;
	}
SWIGINTERN bool Xapian_ESetIterator___ne__(Xapian::ESetIterator *self,Xapian::ESetIterator const &other){
	    return (*self)!=other;
	}

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

SWIGINTERN Xapian::Query *new_Xapian_Query__SWIG_13(Xapian::Query::op op,std::vector< Xapian::Query > const &subqs,Xapian::termcount param=0){
		return new Xapian::Query(op, subqs.begin(), subqs.end(), param);
	    }

/* python/extra.i: Xapian scripting python interface additional python code.
 *
 * Copyright (C) 2003,2004,2005 James Aylett
 * Copyright (C) 2005,2006,2007,2008,2009,2010 Olly Betts
 * Copyright (C) 2007 Lemur Consulting Ltd
 * Copyright (C) 2010 Richard Boulton
 *
 * 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
 */



/* ---------------------------------------------------
 * C++ director class methods
 * --------------------------------------------------- */

#include "xapian_wrap.h"

SwigDirector_PostingSource::SwigDirector_PostingSource(PyObject *self): Xapian::PostingSource(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::PostingSource *)this, this); 
}




SwigDirector_PostingSource::~SwigDirector_PostingSource() {
}

Xapian::doccount SwigDirector_PostingSource::get_termfreq_min() const {
  Xapian::doccount c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "get_termfreq_min";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"get_termfreq_min");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    unsigned int swig_val;
    int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
    }
    c_result = static_cast< Xapian::doccount >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (Xapian::doccount) c_result;
}


Xapian::doccount SwigDirector_PostingSource::get_termfreq_est() const {
  Xapian::doccount c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 1;
    const char * const swig_method_name = "get_termfreq_est";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"get_termfreq_est");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    unsigned int swig_val;
    int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
    }
    c_result = static_cast< Xapian::doccount >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (Xapian::doccount) c_result;
}


Xapian::doccount SwigDirector_PostingSource::get_termfreq_max() const {
  Xapian::doccount c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 2;
    const char * const swig_method_name = "get_termfreq_max";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"get_termfreq_max");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    unsigned int swig_val;
    int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::doccount""'");
    }
    c_result = static_cast< Xapian::doccount >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (Xapian::doccount) c_result;
}


Xapian::weight SwigDirector_PostingSource::get_weight() const {
  Xapian::weight c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 3;
    const char * const swig_method_name = "get_weight";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"get_weight");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    double swig_val;
    int swig_res = SWIG_AsVal_double(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::weight""'");
    }
    c_result = static_cast< Xapian::weight >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (Xapian::weight) c_result;
}


Xapian::docid SwigDirector_PostingSource::get_docid() const {
  Xapian::docid c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 4;
    const char * const swig_method_name = "get_docid";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"get_docid");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    unsigned int swig_val;
    int swig_res = SWIG_AsVal_unsigned_SS_int(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""Xapian::docid""'");
    }
    c_result = static_cast< Xapian::docid >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (Xapian::docid) c_result;
}


void SwigDirector_PostingSource::next(Xapian::weight min_wt) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_double(static_cast< double >(min_wt));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 5;
    const char * const swig_method_name = "next";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"next");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
}


void SwigDirector_PostingSource::skip_to(Xapian::docid did, Xapian::weight min_wt) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(did));
    swig::SwigVar_PyObject obj1;
    obj1 = SWIG_From_double(static_cast< double >(min_wt));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 6;
    const char * const swig_method_name = "skip_to";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"skip_to");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
}


bool SwigDirector_PostingSource::check(Xapian::docid did, Xapian::weight min_wt) {
  bool c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(did));
    swig::SwigVar_PyObject obj1;
    obj1 = SWIG_From_double(static_cast< double >(min_wt));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 7;
    const char * const swig_method_name = "check";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"check");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    bool swig_val;
    int swig_res = SWIG_AsVal_bool(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
    }
    c_result = static_cast< bool >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (bool) c_result;
}


bool SwigDirector_PostingSource::at_end() const {
  bool c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 8;
    const char * const swig_method_name = "at_end";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"at_end");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    bool swig_val;
    int swig_res = SWIG_AsVal_bool(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
    }
    c_result = static_cast< bool >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (bool) c_result;
}


Xapian::PostingSource *SwigDirector_PostingSource::clone() const {
  return Xapian::PostingSource::clone();
}


std::string SwigDirector_PostingSource::name() const {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 9;
    const char * const swig_method_name = "name";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"name");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


std::string SwigDirector_PostingSource::serialise() const {
  return Xapian::PostingSource::serialise();
}


Xapian::PostingSource *SwigDirector_PostingSource::unserialise(std::string const &s) const {
  return Xapian::PostingSource::unserialise(s);
}


void SwigDirector_PostingSource::init(Xapian::Database const &db) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&db), SWIGTYPE_p_Xapian__Database,  0 );
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 10;
    const char * const swig_method_name = "init";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"init");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
}


std::string SwigDirector_PostingSource::get_description() const {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call PostingSource.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 11;
    const char * const swig_method_name = "__str__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__str__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


SwigDirector_MatchDecider::SwigDirector_MatchDecider(PyObject *self): Xapian::MatchDecider(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::MatchDecider *)this, this); 
}




bool SwigDirector_MatchDecider::operator ()(Xapian::Document const &doc) const {
  bool c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&doc), SWIGTYPE_p_Xapian__Document,  0 );
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchDecider.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "__call__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__call__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    bool swig_val;
    int swig_res = SWIG_AsVal_bool(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
    }
    c_result = static_cast< bool >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (bool) c_result;
}


SwigDirector_MatchDecider::~SwigDirector_MatchDecider() {
}

SwigDirector_ExpandDecider::SwigDirector_ExpandDecider(PyObject *self): Xapian::ExpandDecider(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::ExpandDecider *)this, this); 
}




bool SwigDirector_ExpandDecider::operator ()(std::string const &term) const {
  bool c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_std_string(static_cast< std::string >(term));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ExpandDecider.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "__call__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__call__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    bool swig_val;
    int swig_res = SWIG_AsVal_bool(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
    }
    c_result = static_cast< bool >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (bool) c_result;
}


SwigDirector_ExpandDecider::~SwigDirector_ExpandDecider() {
}

SwigDirector_MatchSpy::SwigDirector_MatchSpy(PyObject *self): Xapian::MatchSpy(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::MatchSpy *)this, this); 
}




SwigDirector_MatchSpy::~SwigDirector_MatchSpy() {
}

void SwigDirector_MatchSpy::operator ()(Xapian::Document const &doc, Xapian::weight wt) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&doc), SWIGTYPE_p_Xapian__Document,  0 );
    swig::SwigVar_PyObject obj1;
    obj1 = SWIG_From_double(static_cast< double >(wt));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchSpy.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "__call__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__call__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
}


Xapian::MatchSpy *SwigDirector_MatchSpy::clone() const {
  return Xapian::MatchSpy::clone();
}


std::string SwigDirector_MatchSpy::name() const {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchSpy.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 1;
    const char * const swig_method_name = "name";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"name");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


std::string SwigDirector_MatchSpy::serialise() const {
  return Xapian::MatchSpy::serialise();
}


Xapian::MatchSpy *SwigDirector_MatchSpy::unserialise(std::string const &s, Xapian::Registry const &context) const {
  return Xapian::MatchSpy::unserialise(s,context);
}


std::string SwigDirector_MatchSpy::serialise_results() const {
  return Xapian::MatchSpy::serialise_results();
}


void SwigDirector_MatchSpy::merge_results(std::string const &s) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_std_string(static_cast< std::string >(s));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchSpy.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 2;
    const char * const swig_method_name = "merge_results";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"merge_results");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
}


std::string SwigDirector_MatchSpy::get_description() const {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call MatchSpy.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 3;
    const char * const swig_method_name = "__str__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__str__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


SwigDirector_Stopper::SwigDirector_Stopper(PyObject *self): Xapian::Stopper(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::Stopper *)this, this); 
}




bool SwigDirector_Stopper::operator ()(std::string const &term) const {
  bool c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_std_string(static_cast< std::string >(term));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call Stopper.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "__call__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__call__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    bool swig_val;
    int swig_res = SWIG_AsVal_bool(result, &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""bool""'");
    }
    c_result = static_cast< bool >(swig_val);
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (bool) c_result;
}


SwigDirector_Stopper::~SwigDirector_Stopper() {
}

std::string SwigDirector_Stopper::get_description() const {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call Stopper.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 1;
    const char * const swig_method_name = "__str__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__str__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


SwigDirector_ValueRangeProcessor::SwigDirector_ValueRangeProcessor(PyObject *self): Xapian::ValueRangeProcessor(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::ValueRangeProcessor *)this, this); 
}




SwigDirector_ValueRangeProcessor::~SwigDirector_ValueRangeProcessor() {
}

Xapian::valueno SwigDirector_ValueRangeProcessor::operator ()(std::string &begin, std::string &end) {
  Xapian::valueno c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_std_string(static_cast< std::string >(begin));
    swig::SwigVar_PyObject obj1;
    obj1 = SWIG_From_std_string(static_cast< std::string >(end));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call ValueRangeProcessor.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "__call__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__call__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    if (!PyTuple_Check(result)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(SWIG_TypeError)), "in output value of type '""(Xapian::valueno, std::string, std::string)""'");
    }
    if (PyTuple_Size(result) != 3) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(SWIG_IndexError)), "in output value of type '""(Xapian::valueno, std::string, std::string)""'");
    }
    
    // Set the return value from the first item of the tuple.
    unsigned int swig_val;
    int swig_res = SWIG_AsVal_unsigned_SS_int(PyTuple_GET_ITEM((PyObject *)result, 0), &swig_val);
    if (!SWIG_IsOK(swig_res)) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError(swig_res)), "in output value of type '""(Xapian::valueno, std::string, std::string)""'");
    }
    c_result = static_cast< Xapian::valueno >(swig_val);
    
    // Set "begin" from the second item of the tuple.
    std::string *ptr = (std::string *)0;
    swig_res = SWIG_AsPtr_std_string(PyTuple_GET_ITEM((PyObject *)result, 1), &ptr);
    if (!SWIG_IsOK(swig_res) || !ptr) {
      delete ptr;
      ptr = (std::string *)0;
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((ptr ? swig_res : SWIG_TypeError))), "in output value of type '""(Xapian::valueno, std::string, std::string)""'");
    }
    begin = *ptr;
    delete ptr;
    ptr = (std::string *)0;
    
    // Set "end" from the third item of the tuple.
    swig_res = SWIG_AsPtr_std_string(PyTuple_GET_ITEM((PyObject *)result, 2), &ptr);
    if (!SWIG_IsOK(swig_res) || !ptr) {
      delete ptr;
      ptr = (std::string *)0;
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((ptr ? swig_res : SWIG_TypeError))), "in output value of type '""(Xapian::valueno, std::string, std::string)""'");
    }
    end = *ptr;
    delete ptr;
    ptr = (std::string *)0;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (Xapian::valueno) c_result;
}


SwigDirector_StemImplementation::SwigDirector_StemImplementation(PyObject *self): Xapian::StemImplementation(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::StemImplementation *)this, this); 
}




SwigDirector_StemImplementation::~SwigDirector_StemImplementation() {
}

std::string SwigDirector_StemImplementation::operator ()(std::string const &word) {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_std_string(static_cast< std::string >(word));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call StemImplementation.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "__call__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__call__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


std::string SwigDirector_StemImplementation::get_description() const {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call StemImplementation.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 1;
    const char * const swig_method_name = "__str__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject args = PyTuple_New(0);
    swig::SwigVar_PyObject result = PyObject_Call(method, (PyObject*) args, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__str__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


SwigDirector_KeyMaker::SwigDirector_KeyMaker(PyObject *self): Xapian::KeyMaker(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::KeyMaker *)this, this); 
}




std::string SwigDirector_KeyMaker::operator ()(Xapian::Document const &doc) const {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_NewPointerObj(SWIG_as_voidptr(&doc), SWIGTYPE_p_Xapian__Document,  0 );
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call KeyMaker.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "__call__";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"__call__");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


SwigDirector_KeyMaker::~SwigDirector_KeyMaker() {
}

SwigDirector_Compactor::SwigDirector_Compactor(PyObject *self): Xapian::Compactor(), Swig::Director(self) {
  SWIG_DIRECTOR_RGTR((Xapian::Compactor *)this, this); 
}




SwigDirector_Compactor::~SwigDirector_Compactor() {
}

void SwigDirector_Compactor::set_status(std::string const &table, std::string const &status) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_std_string(static_cast< std::string >(table));
    swig::SwigVar_PyObject obj1;
    obj1 = SWIG_From_std_string(static_cast< std::string >(status));
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call Compactor.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 0;
    const char * const swig_method_name = "set_status";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"set_status");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
}


std::string SwigDirector_Compactor::resolve_duplicate_metadata(std::string const &key, size_t num_tags, std::string const tags[]) {
  std::string c_result;
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  {
    swig::SwigVar_PyObject obj0;
    obj0 = SWIG_From_std_string(static_cast< std::string >(key));
    swig::SwigVar_PyObject obj1;
    {
      PyObject * result = PyList_New(num_tags);
      if (result == 0) {
        return NULL;
      }
      
      for (size_t i = 0; i != num_tags; ++i) {
#if PY_VERSION_HEX >= 0x03000000
        PyObject * str = PyBytes_FromStringAndSize(tags[i].data(), tags[i].size());
#else
        PyObject * str = PyString_FromStringAndSize(tags[i].data(), tags[i].size());
#endif
        if (str == 0) {
          Py_DECREF(result);
          return NULL;
        }
        
        PyList_SET_ITEM(result, i, str);
      }
      obj1 = result;
    }
    if (!swig_get_self()) {
      Swig::DirectorException::raise("'self' uninitialized, maybe you forgot to call Compactor.__init__.");
    }
#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
    const size_t swig_method_index = 1;
    const char * const swig_method_name = "resolve_duplicate_metadata";
    PyObject* method = swig_get_method(swig_method_index, swig_method_name);
    swig::SwigVar_PyObject result = PyObject_CallFunctionObjArgs(method ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#else
    swig::SwigVar_PyObject swig_method_name = SWIG_Python_str_FromChar((char *)"resolve_duplicate_metadata");
    swig::SwigVar_PyObject result = PyObject_CallMethodObjArgs(swig_get_self(), (PyObject *) swig_method_name ,(PyObject *)obj0,(PyObject *)obj1, NULL);
#endif
    if (!result) {
      PyObject *error = PyErr_Occurred();
      {
        if (error != NULL) {
          throw Swig::DirectorMethodException();
        }
      }
    }
    std::string *swig_optr = 0;
    int swig_ores;
    {
      PyObject * tmp = result;
      Py_INCREF(tmp);
      swig_ores = XapianSWIG_anystring_as_ptr(&tmp, &swig_optr);
      Py_DECREF(tmp);
    }
    if (!SWIG_IsOK(swig_ores) || !swig_optr) {
      Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(SWIG_ArgError((swig_optr ? swig_ores : SWIG_TypeError))), "in output value of type '""std::string""'");
    }
    c_result = *swig_optr;
    if (SWIG_IsNewObj(swig_ores)) delete swig_optr;
  }
  SWIG_PYTHON_THREAD_END_BLOCK;
  return (std::string) c_result;
}


#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *_wrap_delete_SwigPyIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SwigPyIterator" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    delete arg1;
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  PyObject *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_value" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (PyObject *)((swig::SwigPyIterator const *)arg1)->value();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_incr" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *)(arg1)->incr(arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_incr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *)(arg1)->incr();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_incr(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"SwigPyIterator_incr",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_SwigPyIterator_incr__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_SwigPyIterator_incr__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_incr'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    swig::SwigPyIterator::incr(size_t)\n"
    "    swig::SwigPyIterator::incr()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_size_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_decr" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *)(arg1)->decr(arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_decr" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *)(arg1)->decr();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_decr(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"SwigPyIterator_decr",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_SwigPyIterator_decr__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_SwigPyIterator_decr__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'SwigPyIterator_decr'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    swig::SwigPyIterator::decr(size_t)\n"
    "    swig::SwigPyIterator::decr()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  ptrdiff_t result;
  
  if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator_distance",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_distance" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_distance" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = ((swig::SwigPyIterator const *)arg1)->distance((swig::SwigPyIterator const &)*arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(std::invalid_argument &_e) {
    SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
  }
  
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator_equal",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_equal" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator_equal" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)((swig::SwigPyIterator const *)arg1)->equal((swig::SwigPyIterator const &)*arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(std::invalid_argument &_e) {
    SWIG_Python_Raise(SWIG_NewPointerObj((new std::invalid_argument(static_cast< const std::invalid_argument& >(_e))),SWIGTYPE_p_std__invalid_argument,SWIG_POINTER_OWN), "std::invalid_argument", SWIGTYPE_p_std__invalid_argument); SWIG_fail;
  }
  
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_copy" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->copy();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  PyObject *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_next" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (PyObject *)(arg1)->next();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___next__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  PyObject *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___next__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (PyObject *)(arg1)->__next__();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_previous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  PyObject *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_previous" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (PyObject *)(arg1)->previous();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator_advance",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator_advance" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator_advance" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *)(arg1)->advance(arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___eq__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___eq__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___eq__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)((swig::SwigPyIterator const *)arg1)->operator ==((swig::SwigPyIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___ne__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___ne__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___ne__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)((swig::SwigPyIterator const *)arg1)->operator !=((swig::SwigPyIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___iadd__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___iadd__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___iadd__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___iadd__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *) &(arg1)->operator +=(arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___isub__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___isub__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___isub__" "', argument " "1"" of type '" "swig::SwigPyIterator *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___isub__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *) &(arg1)->operator -=(arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  swig::SwigPyIterator *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"SwigPyIterator___add__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___add__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___add__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator +(arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  ptrdiff_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  ptrdiff_t val2 ;
  int ecode2 = 0 ;
  swig::SwigPyIterator *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  ecode2 = SWIG_AsVal_ptrdiff_t(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "ptrdiff_t""'");
  } 
  arg2 = static_cast< ptrdiff_t >(val2);
  try {
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (swig::SwigPyIterator *)((swig::SwigPyIterator const *)arg1)->operator -(arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
  }
  catch(swig::stop_iteration &_e) {
    {
      (void)_e;
      SWIG_SetErrorObj(PyExc_StopIteration, SWIG_Py_Void());
      SWIG_fail;
    }
  }
  
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_swig__SwigPyIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub____SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  swig::SwigPyIterator *arg1 = (swig::SwigPyIterator *) 0 ;
  swig::SwigPyIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  ptrdiff_t result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_swig__SwigPyIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SwigPyIterator___sub__" "', argument " "1"" of type '" "swig::SwigPyIterator const *""'"); 
  }
  arg1 = reinterpret_cast< swig::SwigPyIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_swig__SwigPyIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SwigPyIterator___sub__" "', argument " "2"" of type '" "swig::SwigPyIterator const &""'"); 
  }
  arg2 = reinterpret_cast< swig::SwigPyIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = ((swig::SwigPyIterator const *)arg1)->operator -((swig::SwigPyIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_ptrdiff_t(static_cast< ptrdiff_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SwigPyIterator___sub__(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"SwigPyIterator___sub__",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_swig__SwigPyIterator, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_1;
    return _wrap_SwigPyIterator___sub____SWIG_1(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_SwigPyIterator___sub____SWIG_0(self, argc, argv);
  }
  
fail:
  Py_INCREF(Py_NotImplemented);
  return Py_NotImplemented;
}


SWIGINTERN PyObject *SwigPyIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_swig__SwigPyIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_Error_get_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Error *arg1 = (Xapian::Error *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (char *)((Xapian::Error const *)arg1)->get_type();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Error_get_msg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Error *arg1 = (Xapian::Error *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (std::string *) &((Xapian::Error const *)arg1)->get_msg();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Error_get_context(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Error *arg1 = (Xapian::Error *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (std::string *) &((Xapian::Error const *)arg1)->get_context();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Error_get_error_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Error *arg1 = (Xapian::Error *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (char *)((Xapian::Error const *)arg1)->get_error_string();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Error___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Error *arg1 = (Xapian::Error *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Error, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Error___str__" "', argument " "1"" of type '" "Xapian::Error const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Error * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = Xapian_Error___str__((Xapian::Error const *)arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Error(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Error *arg1 = (Xapian::Error *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Error, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Error" "', argument " "1"" of type '" "Xapian::Error *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Error * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Error_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Error, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_LogicError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::LogicError *arg1 = (Xapian::LogicError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__LogicError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LogicError" "', argument " "1"" of type '" "Xapian::LogicError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::LogicError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *LogicError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__LogicError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_RuntimeError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::RuntimeError *arg1 = (Xapian::RuntimeError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__RuntimeError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RuntimeError" "', argument " "1"" of type '" "Xapian::RuntimeError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RuntimeError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *RuntimeError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__RuntimeError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_AssertionError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::AssertionError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_AssertionError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::AssertionError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_AssertionError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::AssertionError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_AssertionError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::AssertionError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_AssertionError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::AssertionError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::AssertionError *)new Xapian::AssertionError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__AssertionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_AssertionError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_AssertionError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_AssertionError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_AssertionError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_AssertionError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_AssertionError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_AssertionError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_AssertionError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::AssertionError::AssertionError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::AssertionError::AssertionError(std::string const &,std::string const &,int)\n"
    "    Xapian::AssertionError::AssertionError(std::string const &,std::string const &)\n"
    "    Xapian::AssertionError::AssertionError(std::string const &)\n"
    "    Xapian::AssertionError::AssertionError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_AssertionError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::AssertionError *arg1 = (Xapian::AssertionError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__AssertionError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AssertionError" "', argument " "1"" of type '" "Xapian::AssertionError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::AssertionError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *AssertionError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__AssertionError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *AssertionError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_InvalidArgumentError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::InvalidArgumentError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidArgumentError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::InvalidArgumentError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidArgumentError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::InvalidArgumentError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidArgumentError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::InvalidArgumentError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidArgumentError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::InvalidArgumentError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidArgumentError *)new Xapian::InvalidArgumentError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidArgumentError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_InvalidArgumentError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_InvalidArgumentError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_InvalidArgumentError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_InvalidArgumentError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_InvalidArgumentError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_InvalidArgumentError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_InvalidArgumentError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::InvalidArgumentError::InvalidArgumentError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::InvalidArgumentError::InvalidArgumentError(std::string const &,std::string const &,int)\n"
    "    Xapian::InvalidArgumentError::InvalidArgumentError(std::string const &,std::string const &)\n"
    "    Xapian::InvalidArgumentError::InvalidArgumentError(std::string const &)\n"
    "    Xapian::InvalidArgumentError::InvalidArgumentError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_InvalidArgumentError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::InvalidArgumentError *arg1 = (Xapian::InvalidArgumentError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvalidArgumentError" "', argument " "1"" of type '" "Xapian::InvalidArgumentError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::InvalidArgumentError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *InvalidArgumentError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__InvalidArgumentError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *InvalidArgumentError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_InvalidOperationError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::InvalidOperationError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidOperationError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::InvalidOperationError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidOperationError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::InvalidOperationError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidOperationError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::InvalidOperationError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidOperationError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::InvalidOperationError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InvalidOperationError *)new Xapian::InvalidOperationError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InvalidOperationError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_InvalidOperationError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_InvalidOperationError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_InvalidOperationError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_InvalidOperationError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_InvalidOperationError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_InvalidOperationError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_InvalidOperationError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::InvalidOperationError::InvalidOperationError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::InvalidOperationError::InvalidOperationError(std::string const &,std::string const &,int)\n"
    "    Xapian::InvalidOperationError::InvalidOperationError(std::string const &,std::string const &)\n"
    "    Xapian::InvalidOperationError::InvalidOperationError(std::string const &)\n"
    "    Xapian::InvalidOperationError::InvalidOperationError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_InvalidOperationError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::InvalidOperationError *arg1 = (Xapian::InvalidOperationError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvalidOperationError" "', argument " "1"" of type '" "Xapian::InvalidOperationError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::InvalidOperationError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *InvalidOperationError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__InvalidOperationError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *InvalidOperationError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_UnimplementedError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::UnimplementedError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_UnimplementedError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::UnimplementedError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_UnimplementedError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::UnimplementedError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_UnimplementedError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::UnimplementedError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_UnimplementedError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::UnimplementedError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::UnimplementedError *)new Xapian::UnimplementedError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__UnimplementedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_UnimplementedError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_UnimplementedError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_UnimplementedError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_UnimplementedError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_UnimplementedError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_UnimplementedError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_UnimplementedError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_UnimplementedError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::UnimplementedError::UnimplementedError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::UnimplementedError::UnimplementedError(std::string const &,std::string const &,int)\n"
    "    Xapian::UnimplementedError::UnimplementedError(std::string const &,std::string const &)\n"
    "    Xapian::UnimplementedError::UnimplementedError(std::string const &)\n"
    "    Xapian::UnimplementedError::UnimplementedError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_UnimplementedError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::UnimplementedError *arg1 = (Xapian::UnimplementedError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__UnimplementedError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_UnimplementedError" "', argument " "1"" of type '" "Xapian::UnimplementedError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::UnimplementedError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *UnimplementedError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__UnimplementedError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *UnimplementedError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DatabaseError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DatabaseError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DatabaseError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DatabaseError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::DatabaseError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::DatabaseError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseError *)new Xapian::DatabaseError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DatabaseError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_DatabaseError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DatabaseError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DatabaseError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DatabaseError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DatabaseError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DatabaseError::DatabaseError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::DatabaseError::DatabaseError(std::string const &,std::string const &,int)\n"
    "    Xapian::DatabaseError::DatabaseError(std::string const &,std::string const &)\n"
    "    Xapian::DatabaseError::DatabaseError(std::string const &)\n"
    "    Xapian::DatabaseError::DatabaseError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DatabaseError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DatabaseError *arg1 = (Xapian::DatabaseError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DatabaseError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseError" "', argument " "1"" of type '" "Xapian::DatabaseError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DatabaseError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DatabaseError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DatabaseError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DatabaseError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DatabaseCorruptError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DatabaseCorruptError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCorruptError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DatabaseCorruptError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCorruptError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DatabaseCorruptError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCorruptError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::DatabaseCorruptError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCorruptError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::DatabaseCorruptError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCorruptError *)new Xapian::DatabaseCorruptError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCorruptError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseCorruptError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DatabaseCorruptError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_DatabaseCorruptError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DatabaseCorruptError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DatabaseCorruptError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DatabaseCorruptError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DatabaseCorruptError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DatabaseCorruptError::DatabaseCorruptError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::DatabaseCorruptError::DatabaseCorruptError(std::string const &,std::string const &,int)\n"
    "    Xapian::DatabaseCorruptError::DatabaseCorruptError(std::string const &,std::string const &)\n"
    "    Xapian::DatabaseCorruptError::DatabaseCorruptError(std::string const &)\n"
    "    Xapian::DatabaseCorruptError::DatabaseCorruptError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DatabaseCorruptError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DatabaseCorruptError *arg1 = (Xapian::DatabaseCorruptError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseCorruptError" "', argument " "1"" of type '" "Xapian::DatabaseCorruptError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DatabaseCorruptError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DatabaseCorruptError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DatabaseCorruptError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DatabaseCorruptError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DatabaseCreateError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DatabaseCreateError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCreateError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DatabaseCreateError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCreateError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DatabaseCreateError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCreateError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::DatabaseCreateError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCreateError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::DatabaseCreateError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseCreateError *)new Xapian::DatabaseCreateError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseCreateError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseCreateError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DatabaseCreateError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_DatabaseCreateError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DatabaseCreateError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DatabaseCreateError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DatabaseCreateError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DatabaseCreateError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DatabaseCreateError::DatabaseCreateError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::DatabaseCreateError::DatabaseCreateError(std::string const &,std::string const &,int)\n"
    "    Xapian::DatabaseCreateError::DatabaseCreateError(std::string const &,std::string const &)\n"
    "    Xapian::DatabaseCreateError::DatabaseCreateError(std::string const &)\n"
    "    Xapian::DatabaseCreateError::DatabaseCreateError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DatabaseCreateError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DatabaseCreateError *arg1 = (Xapian::DatabaseCreateError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseCreateError" "', argument " "1"" of type '" "Xapian::DatabaseCreateError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DatabaseCreateError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DatabaseCreateError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DatabaseCreateError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DatabaseCreateError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DatabaseLockError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DatabaseLockError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseLockError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DatabaseLockError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseLockError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DatabaseLockError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseLockError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::DatabaseLockError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseLockError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::DatabaseLockError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseLockError *)new Xapian::DatabaseLockError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseLockError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseLockError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DatabaseLockError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_DatabaseLockError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DatabaseLockError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DatabaseLockError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DatabaseLockError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DatabaseLockError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DatabaseLockError::DatabaseLockError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::DatabaseLockError::DatabaseLockError(std::string const &,std::string const &,int)\n"
    "    Xapian::DatabaseLockError::DatabaseLockError(std::string const &,std::string const &)\n"
    "    Xapian::DatabaseLockError::DatabaseLockError(std::string const &)\n"
    "    Xapian::DatabaseLockError::DatabaseLockError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DatabaseLockError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DatabaseLockError *arg1 = (Xapian::DatabaseLockError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseLockError" "', argument " "1"" of type '" "Xapian::DatabaseLockError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DatabaseLockError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DatabaseLockError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DatabaseLockError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DatabaseLockError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DatabaseModifiedError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DatabaseModifiedError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseModifiedError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DatabaseModifiedError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseModifiedError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DatabaseModifiedError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseModifiedError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::DatabaseModifiedError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseModifiedError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::DatabaseModifiedError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseModifiedError *)new Xapian::DatabaseModifiedError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseModifiedError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseModifiedError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DatabaseModifiedError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_DatabaseModifiedError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DatabaseModifiedError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DatabaseModifiedError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DatabaseModifiedError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DatabaseModifiedError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DatabaseModifiedError::DatabaseModifiedError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::DatabaseModifiedError::DatabaseModifiedError(std::string const &,std::string const &,int)\n"
    "    Xapian::DatabaseModifiedError::DatabaseModifiedError(std::string const &,std::string const &)\n"
    "    Xapian::DatabaseModifiedError::DatabaseModifiedError(std::string const &)\n"
    "    Xapian::DatabaseModifiedError::DatabaseModifiedError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DatabaseModifiedError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DatabaseModifiedError *arg1 = (Xapian::DatabaseModifiedError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseModifiedError" "', argument " "1"" of type '" "Xapian::DatabaseModifiedError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DatabaseModifiedError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DatabaseModifiedError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DatabaseModifiedError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DatabaseModifiedError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DatabaseOpeningError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DatabaseOpeningError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseOpeningError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DatabaseOpeningError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseOpeningError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DatabaseOpeningError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseOpeningError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::DatabaseOpeningError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseOpeningError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::DatabaseOpeningError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseOpeningError *)new Xapian::DatabaseOpeningError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseOpeningError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseOpeningError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DatabaseOpeningError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_DatabaseOpeningError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DatabaseOpeningError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DatabaseOpeningError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DatabaseOpeningError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DatabaseOpeningError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DatabaseOpeningError::DatabaseOpeningError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::DatabaseOpeningError::DatabaseOpeningError(std::string const &,std::string const &,int)\n"
    "    Xapian::DatabaseOpeningError::DatabaseOpeningError(std::string const &,std::string const &)\n"
    "    Xapian::DatabaseOpeningError::DatabaseOpeningError(std::string const &)\n"
    "    Xapian::DatabaseOpeningError::DatabaseOpeningError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DatabaseOpeningError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DatabaseOpeningError *arg1 = (Xapian::DatabaseOpeningError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseOpeningError" "', argument " "1"" of type '" "Xapian::DatabaseOpeningError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DatabaseOpeningError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DatabaseOpeningError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DatabaseOpeningError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DatabaseOpeningError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DatabaseVersionError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DatabaseVersionError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseVersionError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DatabaseVersionError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseVersionError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DatabaseVersionError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseVersionError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::DatabaseVersionError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseVersionError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::DatabaseVersionError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DatabaseVersionError *)new Xapian::DatabaseVersionError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DatabaseVersionError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DatabaseVersionError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DatabaseVersionError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_DatabaseVersionError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DatabaseVersionError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DatabaseVersionError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DatabaseVersionError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DatabaseVersionError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DatabaseVersionError::DatabaseVersionError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::DatabaseVersionError::DatabaseVersionError(std::string const &,std::string const &,int)\n"
    "    Xapian::DatabaseVersionError::DatabaseVersionError(std::string const &,std::string const &)\n"
    "    Xapian::DatabaseVersionError::DatabaseVersionError(std::string const &)\n"
    "    Xapian::DatabaseVersionError::DatabaseVersionError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DatabaseVersionError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DatabaseVersionError *arg1 = (Xapian::DatabaseVersionError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DatabaseVersionError" "', argument " "1"" of type '" "Xapian::DatabaseVersionError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DatabaseVersionError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DatabaseVersionError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DatabaseVersionError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DatabaseVersionError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DocNotFoundError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DocNotFoundError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DocNotFoundError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DocNotFoundError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DocNotFoundError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DocNotFoundError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DocNotFoundError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::DocNotFoundError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DocNotFoundError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::DocNotFoundError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::DocNotFoundError *)new Xapian::DocNotFoundError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DocNotFoundError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DocNotFoundError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DocNotFoundError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_DocNotFoundError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DocNotFoundError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DocNotFoundError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DocNotFoundError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DocNotFoundError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DocNotFoundError::DocNotFoundError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::DocNotFoundError::DocNotFoundError(std::string const &,std::string const &,int)\n"
    "    Xapian::DocNotFoundError::DocNotFoundError(std::string const &,std::string const &)\n"
    "    Xapian::DocNotFoundError::DocNotFoundError(std::string const &)\n"
    "    Xapian::DocNotFoundError::DocNotFoundError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DocNotFoundError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DocNotFoundError *arg1 = (Xapian::DocNotFoundError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DocNotFoundError" "', argument " "1"" of type '" "Xapian::DocNotFoundError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DocNotFoundError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DocNotFoundError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DocNotFoundError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DocNotFoundError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_FeatureUnavailableError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::FeatureUnavailableError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FeatureUnavailableError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::FeatureUnavailableError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FeatureUnavailableError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::FeatureUnavailableError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FeatureUnavailableError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::FeatureUnavailableError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FeatureUnavailableError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::FeatureUnavailableError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::FeatureUnavailableError *)new Xapian::FeatureUnavailableError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FeatureUnavailableError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_FeatureUnavailableError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_FeatureUnavailableError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_FeatureUnavailableError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_FeatureUnavailableError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_FeatureUnavailableError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_FeatureUnavailableError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_FeatureUnavailableError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::FeatureUnavailableError::FeatureUnavailableError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::FeatureUnavailableError::FeatureUnavailableError(std::string const &,std::string const &,int)\n"
    "    Xapian::FeatureUnavailableError::FeatureUnavailableError(std::string const &,std::string const &)\n"
    "    Xapian::FeatureUnavailableError::FeatureUnavailableError(std::string const &)\n"
    "    Xapian::FeatureUnavailableError::FeatureUnavailableError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_FeatureUnavailableError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::FeatureUnavailableError *arg1 = (Xapian::FeatureUnavailableError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FeatureUnavailableError" "', argument " "1"" of type '" "Xapian::FeatureUnavailableError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FeatureUnavailableError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *FeatureUnavailableError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__FeatureUnavailableError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *FeatureUnavailableError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_InternalError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::InternalError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InternalError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::InternalError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InternalError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::InternalError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InternalError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::InternalError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InternalError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::InternalError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::InternalError *)new Xapian::InternalError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__InternalError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_InternalError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_InternalError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_InternalError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_InternalError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_InternalError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_InternalError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_InternalError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_InternalError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::InternalError::InternalError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::InternalError::InternalError(std::string const &,std::string const &,int)\n"
    "    Xapian::InternalError::InternalError(std::string const &,std::string const &)\n"
    "    Xapian::InternalError::InternalError(std::string const &)\n"
    "    Xapian::InternalError::InternalError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_InternalError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::InternalError *arg1 = (Xapian::InternalError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__InternalError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InternalError" "', argument " "1"" of type '" "Xapian::InternalError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::InternalError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *InternalError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__InternalError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *InternalError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_NetworkError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::NetworkError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::NetworkError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::NetworkError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::NetworkError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::NetworkError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkError *)new Xapian::NetworkError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_NetworkError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_NetworkError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_NetworkError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_NetworkError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_NetworkError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_NetworkError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NetworkError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::NetworkError::NetworkError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::NetworkError::NetworkError(std::string const &,std::string const &,int)\n"
    "    Xapian::NetworkError::NetworkError(std::string const &,std::string const &)\n"
    "    Xapian::NetworkError::NetworkError(std::string const &)\n"
    "    Xapian::NetworkError::NetworkError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_NetworkError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::NetworkError *arg1 = (Xapian::NetworkError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__NetworkError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NetworkError" "', argument " "1"" of type '" "Xapian::NetworkError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::NetworkError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *NetworkError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__NetworkError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *NetworkError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_NetworkTimeoutError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::NetworkTimeoutError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkTimeoutError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::NetworkTimeoutError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkTimeoutError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::NetworkTimeoutError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkTimeoutError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::NetworkTimeoutError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkTimeoutError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::NetworkTimeoutError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::NetworkTimeoutError *)new Xapian::NetworkTimeoutError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NetworkTimeoutError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_NetworkTimeoutError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_NetworkTimeoutError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_NetworkTimeoutError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_NetworkTimeoutError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_NetworkTimeoutError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_NetworkTimeoutError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NetworkTimeoutError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::NetworkTimeoutError::NetworkTimeoutError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::NetworkTimeoutError::NetworkTimeoutError(std::string const &,std::string const &,int)\n"
    "    Xapian::NetworkTimeoutError::NetworkTimeoutError(std::string const &,std::string const &)\n"
    "    Xapian::NetworkTimeoutError::NetworkTimeoutError(std::string const &)\n"
    "    Xapian::NetworkTimeoutError::NetworkTimeoutError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_NetworkTimeoutError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::NetworkTimeoutError *arg1 = (Xapian::NetworkTimeoutError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NetworkTimeoutError" "', argument " "1"" of type '" "Xapian::NetworkTimeoutError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::NetworkTimeoutError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *NetworkTimeoutError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__NetworkTimeoutError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *NetworkTimeoutError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_QueryParserError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::QueryParserError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_QueryParserError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::QueryParserError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_QueryParserError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::QueryParserError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_QueryParserError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::QueryParserError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_QueryParserError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::QueryParserError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::QueryParserError *)new Xapian::QueryParserError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParserError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_QueryParserError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_QueryParserError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_QueryParserError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_QueryParserError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_QueryParserError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_QueryParserError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_QueryParserError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_QueryParserError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::QueryParserError::QueryParserError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::QueryParserError::QueryParserError(std::string const &,std::string const &,int)\n"
    "    Xapian::QueryParserError::QueryParserError(std::string const &,std::string const &)\n"
    "    Xapian::QueryParserError::QueryParserError(std::string const &)\n"
    "    Xapian::QueryParserError::QueryParserError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_QueryParserError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParserError *arg1 = (Xapian::QueryParserError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__QueryParserError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QueryParserError" "', argument " "1"" of type '" "Xapian::QueryParserError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParserError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *QueryParserError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__QueryParserError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *QueryParserError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_SerialisationError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::SerialisationError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_SerialisationError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::SerialisationError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_SerialisationError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::SerialisationError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_SerialisationError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::SerialisationError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_SerialisationError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::SerialisationError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::SerialisationError *)new Xapian::SerialisationError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SerialisationError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_SerialisationError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_SerialisationError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_SerialisationError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_SerialisationError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_SerialisationError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_SerialisationError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_SerialisationError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_SerialisationError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::SerialisationError::SerialisationError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::SerialisationError::SerialisationError(std::string const &,std::string const &,int)\n"
    "    Xapian::SerialisationError::SerialisationError(std::string const &,std::string const &)\n"
    "    Xapian::SerialisationError::SerialisationError(std::string const &)\n"
    "    Xapian::SerialisationError::SerialisationError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_SerialisationError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::SerialisationError *arg1 = (Xapian::SerialisationError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__SerialisationError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SerialisationError" "', argument " "1"" of type '" "Xapian::SerialisationError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::SerialisationError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *SerialisationError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__SerialisationError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *SerialisationError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_RangeError__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::RangeError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2,(char const *)arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RangeError__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::RangeError *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RangeError__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::RangeError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,(std::string const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RangeError__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::RangeError *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RangeError__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::RangeError *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (Xapian::RangeError *)new Xapian::RangeError((std::string const &)*arg1,arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RangeError, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RangeError(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_RangeError",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_RangeError__SWIG_3(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_2;
    return _wrap_new_RangeError__SWIG_4(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_RangeError__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_RangeError__SWIG_1(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_RangeError__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RangeError'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::RangeError::RangeError(std::string const &,std::string const &,char const *)\n"
    "    Xapian::RangeError::RangeError(std::string const &,std::string const &,int)\n"
    "    Xapian::RangeError::RangeError(std::string const &,std::string const &)\n"
    "    Xapian::RangeError::RangeError(std::string const &)\n"
    "    Xapian::RangeError::RangeError(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_RangeError(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::RangeError *arg1 = (Xapian::RangeError *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__RangeError, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RangeError" "', argument " "1"" of type '" "Xapian::RangeError *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RangeError * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *RangeError_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__RangeError, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *RangeError_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_version_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"version_string",0,0,0)) SWIG_fail;
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (char *)Xapian::version_string();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_major_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args,"major_version",0,0,0)) SWIG_fail;
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int)Xapian::major_version();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_minor_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args,"minor_version",0,0,0)) SWIG_fail;
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int)Xapian::minor_version();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_revision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args,"revision",0,0,0)) SWIG_fail;
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int)Xapian::revision();
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_PositionIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::PositionIterator *)new Xapian::PositionIterator();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_PositionIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::PositionIterator *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__PositionIterator,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::PositionIterator *)new Xapian::PositionIterator((Xapian::PositionIterator const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_PositionIterator(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_PositionIterator",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_PositionIterator__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_PositionIterator__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_PositionIterator'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::PositionIterator::PositionIterator()\n"
    "    Xapian::PositionIterator::PositionIterator(Xapian::PositionIterator const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_PositionIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PositionIterator_get_termpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termpos result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termpos)Xapian_PositionIterator_get_termpos((Xapian::PositionIterator const *)arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PositionIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_next" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        Xapian_PositionIterator_next(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PositionIterator_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"PositionIterator_equals",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_equals" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PositionIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PositionIterator_equals" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PositionIterator_equals" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1,(Xapian::PositionIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PositionIterator_skip_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::termpos arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"PositionIterator_skip_to",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->skip_to(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PositionIterator___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator___str__" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::PositionIterator const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PositionIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"PositionIterator___eq__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator___eq__" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PositionIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PositionIterator___eq__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PositionIterator___eq__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_PositionIterator___eq__(arg1,(Xapian::PositionIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PositionIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"PositionIterator___ne__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator___ne__" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PositionIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PositionIterator___ne__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PositionIterator___ne__" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_PositionIterator___ne__(arg1,(Xapian::PositionIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *PositionIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__PositionIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *PositionIterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_PostingIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::PostingIterator *)new Xapian::PostingIterator();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_PostingIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_PostingIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::PostingIterator *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__PostingIterator,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::PostingIterator *)new Xapian::PostingIterator((Xapian::PostingIterator const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_PostingIterator(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_PostingIterator",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_PostingIterator__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_PostingIterator__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_PostingIterator'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::PostingIterator::PostingIterator()\n"
    "    Xapian::PostingIterator::PostingIterator(Xapian::PostingIterator const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_PostingIterator_skip_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"PostingIterator_skip_to",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->skip_to(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator_get_doclength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_doclength();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator_get_wdf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_wdf();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator_positionlist_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::PositionIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::PostingIterator const *)arg1)->positionlist_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator_positionlist_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::PositionIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_positionlist_end" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::PostingIterator const *)arg1)->positionlist_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator___str__" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::PostingIterator const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"PostingIterator___eq__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator___eq__" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostingIterator___eq__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingIterator___eq__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_PostingIterator___eq__(arg1,(Xapian::PostingIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"PostingIterator___ne__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator___ne__" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostingIterator___ne__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingIterator___ne__" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_PostingIterator___ne__(arg1,(Xapian::PostingIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator_get_docid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::docid result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::docid)Xapian_PostingIterator_get_docid((Xapian::PostingIterator const *)arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_next" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        Xapian_PostingIterator_next(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingIterator_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"PostingIterator_equals",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_equals" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostingIterator_equals" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingIterator_equals" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)Xapian_PostingIterator_equals((Xapian::PostingIterator const *)arg1,(Xapian::PostingIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *PostingIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__PostingIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *PostingIterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"__eq__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__PostingIterator,  0  | 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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)Xapian::operator ==((Xapian::PostingIterator const &)*arg1,(Xapian::PostingIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingIterator *arg1 = 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"__ne__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__PostingIterator,  0  | 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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)Xapian::operator !=((Xapian::PostingIterator const &)*arg1,(Xapian::PostingIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_TermIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::TermIterator *)new Xapian::TermIterator();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_TermIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__TermIterator,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::TermIterator *)new Xapian::TermIterator((Xapian::TermIterator const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_TermIterator(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_TermIterator",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_TermIterator__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_TermIterator__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_TermIterator'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::TermIterator::TermIterator()\n"
    "    Xapian::TermIterator::TermIterator(Xapian::TermIterator const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_TermIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_get_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_get_term" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian_TermIterator_get_term((Xapian::TermIterator const *)arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_next" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        Xapian_TermIterator_next(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"TermIterator_equals",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_equals" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__TermIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator_equals" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator_equals" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)Xapian_TermIterator_equals((Xapian::TermIterator const *)arg1,(Xapian::TermIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_skip_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"TermIterator_skip_to",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->skip_to((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_get_wdf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->get_wdf();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_get_termfreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::TermIterator const *)arg1)->get_termfreq();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_positionlist_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->positionlist_count();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_positionlist_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::PositionIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_positionlist_begin" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (arg1)->positionlist_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator_positionlist_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::PositionIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_positionlist_end" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (arg1)->positionlist_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator___str__" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::TermIterator const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"TermIterator___eq__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator___eq__" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__TermIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator___eq__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator___eq__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_TermIterator___eq__(arg1,(Xapian::TermIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"TermIterator___ne__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator___ne__" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__TermIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator___ne__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator___ne__" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_TermIterator___ne__(arg1,(Xapian::TermIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *TermIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__TermIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *TermIterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_ValueIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ValueIterator *)new Xapian::ValueIterator();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ValueIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::ValueIterator *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__ValueIterator,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ValueIterator *)new Xapian::ValueIterator((Xapian::ValueIterator const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ValueIterator(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_ValueIterator",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_ValueIterator__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_ValueIterator__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ValueIterator'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::ValueIterator::ValueIterator()\n"
    "    Xapian::ValueIterator::ValueIterator(Xapian::ValueIterator const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_ValueIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian_ValueIterator_get_value((Xapian::ValueIterator const *)arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_next" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        Xapian_ValueIterator_next(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueIterator_equals",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_equals" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__ValueIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueIterator_equals" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueIterator_equals" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)Xapian_ValueIterator_equals((Xapian::ValueIterator const *)arg1,(Xapian::ValueIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator_get_docid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::docid result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::docid)((Xapian::ValueIterator const *)arg1)->get_docid();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator_get_valueno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::valueno result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::valueno)((Xapian::ValueIterator const *)arg1)->get_valueno();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator_skip_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueIterator_skip_to",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->skip_to(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator_check(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueIterator_check",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)(arg1)->check(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator___str__" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ValueIterator const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueIterator___eq__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator___eq__" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__ValueIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueIterator___eq__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueIterator___eq__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_ValueIterator___eq__(arg1,(Xapian::ValueIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueIterator___ne__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator___ne__" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__ValueIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueIterator___ne__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueIterator___ne__" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_ValueIterator___ne__(arg1,(Xapian::ValueIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ValueIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ValueIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ValueIterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_Document__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Document *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__Document,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Document" "', argument " "1"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Document" "', argument " "1"" of type '" "Xapian::Document const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Document *)new Xapian::Document((Xapian::Document const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Document__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::Document *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Document *)new Xapian::Document();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Document(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_Document",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_Document__SWIG_1(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_Document__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Document'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Document::Document(Xapian::Document const &)\n"
    "    Xapian::Document::Document()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_Document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Document, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Document" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_get_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"Document_get_value",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Document const *)arg1)->get_value(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_add_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Document_add_value",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_value(arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_remove_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Document_remove_value",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->remove_value(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_clear_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->clear_values();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_get_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Document const *)arg1)->get_data();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_set_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Document_set_data",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_data((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_add_posting__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_posting((std::string const &)*arg2,arg3,arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_add_posting__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_posting((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_add_posting(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Document_add_posting",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 3) {
    return _wrap_Document_add_posting__SWIG_1(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_Document_add_posting__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Document_add_posting'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Document::add_posting(std::string const &,Xapian::termpos,Xapian::termcount)\n"
    "    Xapian::Document::add_posting(std::string const &,Xapian::termpos)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Document_add_term__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_term((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_add_term__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_term((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_add_term(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Document_add_term",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Document_add_term__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Document_add_term__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Document_add_term'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Document::add_term(std::string const &,Xapian::termcount)\n"
    "    Xapian::Document::add_term(std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Document_add_boolean_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Document_add_boolean_term",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_boolean_term((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_remove_posting__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->remove_posting((std::string const &)*arg2,arg3,arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_remove_posting__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->remove_posting((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_remove_posting(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Document_remove_posting",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 3) {
    return _wrap_Document_remove_posting__SWIG_1(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_Document_remove_posting__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Document_remove_posting'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Document::remove_posting(std::string const &,Xapian::termpos,Xapian::termcount)\n"
    "    Xapian::Document::remove_posting(std::string const &,Xapian::termpos)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Document_remove_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Document_remove_term",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->remove_term((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_clear_terms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->clear_terms();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_termlist_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::Document const *)arg1)->termlist_count();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_termlist_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Document const *)arg1)->termlist_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_termlist_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_termlist_end" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Document const *)arg1)->termlist_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_values_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::Document const *)arg1)->values_count();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_values_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ValueIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Document const *)arg1)->values_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_values_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ValueIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_values_end" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Document const *)arg1)->values_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_get_docid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::docid result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::docid)((Xapian::Document const *)arg1)->get_docid();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_serialise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Document const *)arg1)->serialise();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document_unserialise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject *swig_obj[1] ;
  Xapian::Document result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Document::unserialise((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Document___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document___str__" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Document const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Document_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Document, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Document_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_PostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::PostingSource *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::PostingSource *)new SwigDirector_PostingSource(arg1); 
        } else {
          SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); 
          SWIG_fail;
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingSource, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_PostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PostingSource" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_get_termfreq_min(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_min");
        } else {
          result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_min();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_get_termfreq_est(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_est");
        } else {
          result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_est();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_get_termfreq_max(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_termfreq_max");
        } else {
          result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_max();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_get_maxweight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::weight result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_maxweight" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_maxweight();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_get_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::weight result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_weight();
        } else {
          result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_weight();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_get_docid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::docid result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::get_docid");
        } else {
          result = (Xapian::docid)((Xapian::PostingSource const *)arg1)->get_docid();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::weight arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  if (!SWIG_Python_UnpackTuple(args,"PostingSource_next",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_next" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PostingSource_next" "', argument " "2"" of type '" "Xapian::weight""'");
  } 
  arg2 = static_cast< Xapian::weight >(val2);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::next");
        } else {
          (arg1)->next(arg2);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_skip_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  if (!SWIG_Python_UnpackTuple(args,"PostingSource_skip_to",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          (arg1)->Xapian::PostingSource::skip_to(arg2,arg3);
        } else {
          (arg1)->skip_to(arg2,arg3);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_check(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"PostingSource_check",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          result = (bool)(arg1)->Xapian::PostingSource::check(arg2,arg3);
        } else {
          result = (bool)(arg1)->check(arg2,arg3);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_at_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::at_end");
        } else {
          result = (bool)((Xapian::PostingSource const *)arg1)->at_end();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::name();
        } else {
          result = ((Xapian::PostingSource const *)arg1)->name();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  if (!SWIG_Python_UnpackTuple(args,"PostingSource_init",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Database,  0  | 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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::PostingSource::init");
        } else {
          (arg1)->init((Xapian::Database const &)*arg2);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PostingSource___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource___str__" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_description();
        } else {
          result = ((Xapian::PostingSource const *)arg1)->get_description();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_PostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_PostingSource" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *PostingSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__PostingSource, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *PostingSource_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_ValuePostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ValuePostingSource *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ValuePostingSource *)new Xapian::ValuePostingSource(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValuePostingSource, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ValuePostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValuePostingSource" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ValuePostingSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ValuePostingSource, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ValuePostingSource_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_ValueWeightPostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ValueWeightPostingSource *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ValueWeightPostingSource *)new Xapian::ValueWeightPostingSource(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueWeightPostingSource, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ValueWeightPostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ValueWeightPostingSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ValueWeightPostingSource, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ValueWeightPostingSource_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DecreasingValueWeightPostingSource__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DecreasingValueWeightPostingSource__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  Xapian::docid arg2 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DecreasingValueWeightPostingSource__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DecreasingValueWeightPostingSource(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DecreasingValueWeightPostingSource",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DecreasingValueWeightPostingSource__SWIG_2(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_new_DecreasingValueWeightPostingSource__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_new_DecreasingValueWeightPostingSource__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DecreasingValueWeightPostingSource'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DecreasingValueWeightPostingSource::DecreasingValueWeightPostingSource(Xapian::valueno,Xapian::docid,Xapian::docid)\n"
    "    Xapian::DecreasingValueWeightPostingSource::DecreasingValueWeightPostingSource(Xapian::valueno,Xapian::docid)\n"
    "    Xapian::DecreasingValueWeightPostingSource::DecreasingValueWeightPostingSource(Xapian::valueno)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DecreasingValueWeightPostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DecreasingValueWeightPostingSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DecreasingValueWeightPostingSource_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_ValueMapPostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ValueMapPostingSource *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ValueMapPostingSource *)new Xapian::ValueMapPostingSource(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueMapPostingSource, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueMapPostingSource_add_mapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueMapPostingSource_add_mapping",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_mapping((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueMapPostingSource_clear_mappings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->clear_mappings();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueMapPostingSource_set_default_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueMapPostingSource_set_default_weight",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_default_weight(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ValueMapPostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueMapPostingSource" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ValueMapPostingSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ValueMapPostingSource, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ValueMapPostingSource_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_FixedWeightPostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::weight arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::FixedWeightPostingSource *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedWeightPostingSource" "', argument " "1"" of type '" "Xapian::weight""'");
  } 
  arg1 = static_cast< Xapian::weight >(val1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::FixedWeightPostingSource *)new Xapian::FixedWeightPostingSource(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FixedWeightPostingSource, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_FixedWeightPostingSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FixedWeightPostingSource" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *FixedWeightPostingSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__FixedWeightPostingSource, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *FixedWeightPostingSource_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_MSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::MSet *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::MSet *)new Xapian::MSet();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::MSet *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__MSet,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MSet" "', argument " "1"" of type '" "Xapian::MSet const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MSet" "', argument " "1"" of type '" "Xapian::MSet const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::MSet *)new Xapian::MSet((Xapian::MSet const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MSet(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_MSet",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_MSet__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_MSet__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MSet'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::MSet::MSet()\n"
    "    Xapian::MSet::MSet(Xapian::MSet const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_MSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MSet" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_fetch__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg3 = reinterpret_cast< Xapian::MSetIterator * >(argp3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::MSet const *)arg1)->fetch(*arg2,*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_fetch__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::MSet const *)arg1)->fetch(*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_fetch__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::MSet const *)arg1)->fetch();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_fetch(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"MSet_fetch",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_MSet_fetch__SWIG_2(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_MSet_fetch__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_MSet_fetch__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MSet_fetch'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::MSet::fetch(Xapian::MSetIterator &,Xapian::MSetIterator &) const\n"
    "    Xapian::MSet::fetch(Xapian::MSetIterator &) const\n"
    "    Xapian::MSet::fetch() const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MSet_convert_to_percent__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::weight arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  Xapian::percent result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::weight""'");
  } 
  arg2 = static_cast< Xapian::weight >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_convert_to_percent__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  Xapian::percent result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent((Xapian::MSetIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_convert_to_percent(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"MSet_convert_to_percent",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_1;
    return _wrap_MSet_convert_to_percent__SWIG_1(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_MSet_convert_to_percent__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MSet_convert_to_percent'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::MSet::convert_to_percent(Xapian::weight) const\n"
    "    Xapian::MSet::convert_to_percent(Xapian::MSetIterator const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MSet_get_termfreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::doccount result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSet_get_termfreq",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_termfreq" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    int res = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MSet_get_termfreq" "', argument " "2"" of type '" "std::string""'");
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_termfreq(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_termweight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::weight result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSet_get_termweight",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_termweight" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    int res = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MSet_get_termweight" "', argument " "2"" of type '" "std::string""'");
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)((Xapian::MSet const *)arg1)->get_termweight(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_firstitem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_firstitem();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_matches_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_lower_bound();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_matches_estimated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_estimated();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_matches_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_upper_bound();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_uncollapsed_matches_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_lower_bound();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_uncollapsed_matches_estimated(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_estimated();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_uncollapsed_matches_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_upper_bound();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_max_possible(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::weight result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_max_possible" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)(arg1)->get_max_possible();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_max_attained(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::weight result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_max_attained" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)(arg1)->get_max_attained();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSet const *)arg1)->size();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)((Xapian::MSet const *)arg1)->empty();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::MSetIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::MSet const *)arg1)->begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::MSetIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::MSet const *)arg1)->end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::MSetIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::MSet const *)arg1)->back();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet__get_hit_internal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::MSetIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSet__get_hit_internal",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet__get_hit_internal" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet__get_hit_internal" "', argument " "2"" of type '" "Xapian::doccount""'");
  } 
  arg2 = static_cast< Xapian::doccount >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian_MSet_get_hit((Xapian::MSet const *)arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_document_percentage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSet_get_document_percentage",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (int)Xapian_MSet_get_document_percentage((Xapian::MSet const *)arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::Document result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSet_get_document",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian_MSet_get_document((Xapian::MSet const *)arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_get_docid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::docid result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSet_get_docid",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::docid)Xapian_MSet_get_docid((Xapian::MSet const *)arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet___str__" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::MSet const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet_items_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  PyObject *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_items_get" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  result = (PyObject *)Xapian_MSet_items_get(arg1);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSet___cmp__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSet *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSet___cmp__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet___cmp__" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSet,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSet___cmp__" "', argument " "2"" of type '" "Xapian::MSet const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet___cmp__" "', argument " "2"" of type '" "Xapian::MSet const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSet * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (int)Xapian_MSet___cmp__(arg1,(Xapian::MSet const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *MSet_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__MSet, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *MSet_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_MSetIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::MSetIterator *)new Xapian::MSetIterator();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MSetIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::MSetIterator *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::MSetIterator *)new Xapian::MSetIterator((Xapian::MSetIterator const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MSetIterator(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_MSetIterator",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_MSetIterator__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_MSetIterator__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MSetIterator'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::MSetIterator::MSetIterator()\n"
    "    Xapian::MSetIterator::MSetIterator(Xapian::MSetIterator const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_MSetIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_get_docid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::docid result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::docid)Xapian_MSetIterator_get_docid((Xapian::MSetIterator const *)arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_next" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        Xapian_MSetIterator_next(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_prev(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_prev" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        Xapian_MSetIterator_prev(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSetIterator_equals",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_equals" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSetIterator_equals" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSetIterator_equals" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)Xapian_MSetIterator_equals((Xapian::MSetIterator const *)arg1,(Xapian::MSetIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_get_document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::Document result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::MSetIterator const *)arg1)->get_document();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_get_rank(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_rank();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_get_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::weight result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)((Xapian::MSetIterator const *)arg1)->get_weight();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_get_collapse_key(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::MSetIterator const *)arg1)->get_collapse_key();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_get_collapse_count(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_collapse_count();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator_get_percent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::percent result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::percent)((Xapian::MSetIterator const *)arg1)->get_percent();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator___str__" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::MSetIterator const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSetIterator___eq__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator___eq__" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSetIterator___eq__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSetIterator___eq__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_MSetIterator___eq__(arg1,(Xapian::MSetIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MSetIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"MSetIterator___ne__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator___ne__" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSetIterator___ne__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSetIterator___ne__" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_MSetIterator___ne__(arg1,(Xapian::MSetIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *MSetIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__MSetIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *MSetIterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_ESet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::ESet *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ESet *)new Xapian::ESet();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ESet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::ESet *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__ESet,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESet" "', argument " "1"" of type '" "Xapian::ESet const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ESet" "', argument " "1"" of type '" "Xapian::ESet const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ESet *)new Xapian::ESet((Xapian::ESet const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ESet(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_ESet",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_ESet__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_ESet__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ESet'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::ESet::ESet()\n"
    "    Xapian::ESet::ESet(Xapian::ESet const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_ESet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESet" "', argument " "1"" of type '" "Xapian::ESet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESet_get_ebound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::ESet const *)arg1)->get_ebound();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESet_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::ESet const *)arg1)->size();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESet_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)((Xapian::ESet const *)arg1)->empty();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESet_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ESetIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ESet const *)arg1)->begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESet_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ESetIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ESet const *)arg1)->end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESet_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ESetIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ESet const *)arg1)->back();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESet___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet___str__" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ESet const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESet_items_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  PyObject *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_items_get" "', argument " "1"" of type '" "Xapian::ESet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  result = (PyObject *)Xapian_ESet_items_get(arg1);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ESet_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ESet, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ESet_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_ESetIterator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ESetIterator *)new Xapian::ESetIterator();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ESetIterator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::ESetIterator *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ESetIterator *)new Xapian::ESetIterator((Xapian::ESetIterator const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ESetIterator(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_ESetIterator",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_ESetIterator__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_ESetIterator__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ESetIterator'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::ESetIterator::ESetIterator()\n"
    "    Xapian::ESetIterator::ESetIterator(Xapian::ESetIterator const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_ESetIterator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESetIterator_get_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian_ESetIterator_get_term((Xapian::ESetIterator const *)arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESetIterator_next(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_next" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        Xapian_ESetIterator_next(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESetIterator_prev(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_prev" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        Xapian_ESetIterator_prev(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESetIterator_equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"ESetIterator_equals",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_equals" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESetIterator_equals" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESetIterator_equals" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)Xapian_ESetIterator_equals((Xapian::ESetIterator const *)arg1,(Xapian::ESetIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESetIterator_get_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::weight result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)((Xapian::ESetIterator const *)arg1)->get_weight();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESetIterator___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator___str__" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ESetIterator const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESetIterator___eq__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"ESetIterator___eq__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator___eq__" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESetIterator___eq__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESetIterator___eq__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_ESetIterator___eq__(arg1,(Xapian::ESetIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ESetIterator___ne__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"ESetIterator___ne__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator___ne__" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESetIterator___ne__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESetIterator___ne__" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    result = (bool)Xapian_ESetIterator___ne__(arg1,(Xapian::ESetIterator const &)*arg2);
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ESetIterator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ESetIterator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ESetIterator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_RSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::RSet *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__RSet,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RSet" "', argument " "1"" of type '" "Xapian::RSet const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RSet" "', argument " "1"" of type '" "Xapian::RSet const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::RSet *)new Xapian::RSet((Xapian::RSet const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::RSet *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::RSet *)new Xapian::RSet();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_RSet(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_RSet",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_RSet__SWIG_1(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_RSet__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RSet'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::RSet::RSet(Xapian::RSet const &)\n"
    "    Xapian::RSet::RSet()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_RSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RSet" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::RSet const *)arg1)->size();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)((Xapian::RSet const *)arg1)->empty();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_add_document__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_document(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_add_document__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_document(*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_add_document(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"RSet_add_document",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_1;
    return _wrap_RSet_add_document__SWIG_1(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_RSet_add_document__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RSet_add_document'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::RSet::add_document(Xapian::docid)\n"
    "    Xapian::RSet::add_document(Xapian::MSetIterator &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_RSet_remove_document__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->remove_document(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_remove_document__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->remove_document(*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_remove_document(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"RSet_remove_document",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_1;
    return _wrap_RSet_remove_document__SWIG_1(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_RSet_remove_document__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RSet_remove_document'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::RSet::remove_document(Xapian::docid)\n"
    "    Xapian::RSet::remove_document(Xapian::MSetIterator &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_RSet_contains__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_contains" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)(arg1)->contains(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_contains__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_contains" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)(arg1)->contains(*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RSet_contains(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"RSet_contains",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_1;
    return _wrap_RSet_contains__SWIG_1(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_RSet_contains__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RSet_contains'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::RSet::contains(Xapian::docid)\n"
    "    Xapian::RSet::contains(Xapian::MSetIterator &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_RSet___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet___str__" "', argument " "1"" of type '" "Xapian::RSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::RSet const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *RSet_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__RSet, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *RSet_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_MatchDecider___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"MatchDecider___call__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchDecider___call__" "', argument " "1"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Document,  0  | 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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::MatchDecider::operator ()");
        } else {
          result = (bool)((Xapian::MatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_MatchDecider(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchDecider, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatchDecider" "', argument " "1"" of type '" "Xapian::MatchDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_MatchDecider(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::MatchDecider *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::MatchDecider *)new SwigDirector_MatchDecider(arg1); 
        } else {
          SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); 
          SWIG_fail;
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MatchDecider, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_MatchDecider(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_MatchDecider" "', argument " "1"" of type '" "Xapian::MatchDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *MatchDecider_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__MatchDecider, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *MatchDecider_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_ExpandDecider___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"ExpandDecider___call__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ExpandDecider___call__" "', argument " "1"" of type '" "Xapian::ExpandDecider const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::ExpandDecider::operator ()");
        } else {
          result = (bool)((Xapian::ExpandDecider const *)arg1)->operator ()((std::string const &)*arg2);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ExpandDecider(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ExpandDecider, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ExpandDecider" "', argument " "1"" of type '" "Xapian::ExpandDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ExpandDecider(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ExpandDecider *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::ExpandDecider *)new SwigDirector_ExpandDecider(arg1); 
        } else {
          SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); 
          SWIG_fail;
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ExpandDecider, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_ExpandDecider(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ExpandDecider" "', argument " "1"" of type '" "Xapian::ExpandDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ExpandDecider * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ExpandDecider_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ExpandDecider, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ExpandDecider_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_Enquire(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::Enquire *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__Database,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Enquire *)new Xapian::Enquire((Xapian::Database const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Enquire, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Enquire(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Enquire" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_query__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Query,  0  | 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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_query((Xapian::Query const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_query__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Query,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_query((Xapian::Query const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_query(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_query",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_query__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_query__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_query'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_query(Xapian::Query const &,Xapian::termcount)\n"
    "    Xapian::Enquire::set_query(Xapian::Query const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_get_query(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::Query *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_query" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *) &(arg1)->get_query();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_add_matchspy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MatchSpy *arg2 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Enquire_add_matchspy",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_add_matchspy" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_add_matchspy" "', argument " "2"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_matchspy(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_clear_matchspies(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->clear_matchspies();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_weighting_scheme(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Enquire_set_weighting_scheme",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Weight,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_weighting_scheme((Xapian::Weight const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_collapse_key__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_collapse_key(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_collapse_key__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_collapse_key(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_collapse_key(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_collapse_key",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_collapse_key__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_collapse_key__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_collapse_key'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_collapse_key(Xapian::valueno,Xapian::doccount)\n"
    "    Xapian::Enquire::set_collapse_key(Xapian::valueno)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_set_docid_order(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Enquire::docid_order arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Enquire_set_docid_order",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_docid_order(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_cutoff__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_cutoff" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_cutoff(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_cutoff__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_cutoff(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_cutoff(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_cutoff",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_cutoff__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_cutoff__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_cutoff'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_cutoff(int,Xapian::weight)\n"
    "    Xapian::Enquire::set_cutoff(int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_relevance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_relevance();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_value__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_value(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_value__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_value" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_value(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_value(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_value",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_sort_by_value__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_sort_by_value__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_sort_by_value'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_sort_by_value(Xapian::valueno,bool)\n"
    "    Xapian::Enquire::set_sort_by_value(Xapian::valueno)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_value_then_relevance(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_value_then_relevance(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_value_then_relevance(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_value_then_relevance",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_sort_by_value_then_relevance__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_sort_by_value_then_relevance__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_sort_by_value_then_relevance'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_sort_by_value_then_relevance(Xapian::valueno,bool)\n"
    "    Xapian::Enquire::set_sort_by_value_then_relevance(Xapian::valueno)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_relevance_then_value(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_relevance_then_value(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_relevance_then_value(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_relevance_then_value",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_sort_by_relevance_then_value__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_sort_by_relevance_then_value__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_sort_by_relevance_then_value'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_sort_by_relevance_then_value(Xapian::valueno,bool)\n"
    "    Xapian::Enquire::set_sort_by_relevance_then_value(Xapian::valueno)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_key__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
  ecode3 = SWIG_AsVal_bool(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_key(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_key__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_key(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_key(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_key",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_sort_by_key__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_sort_by_key__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_sort_by_key'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_sort_by_key(Xapian::KeyMaker *,bool)\n"
    "    Xapian::Enquire::set_sort_by_key(Xapian::Sorter *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
  ecode3 = SWIG_AsVal_bool(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_key_then_relevance(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_key_then_relevance(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_key_then_relevance(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_key_then_relevance",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_sort_by_key_then_relevance__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_sort_by_key_then_relevance__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_sort_by_key_then_relevance'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_sort_by_key_then_relevance(Xapian::KeyMaker *,bool)\n"
    "    Xapian::Enquire::set_sort_by_key_then_relevance(Xapian::Sorter *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "2"" of type '" "Xapian::KeyMaker *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::KeyMaker * >(argp2);
  ecode3 = SWIG_AsVal_bool(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_relevance_then_key(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_sort_by_relevance_then_key(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_set_sort_by_relevance_then_key(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_set_sort_by_relevance_then_key",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Enquire_set_sort_by_relevance_then_key__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Enquire_set_sort_by_relevance_then_key__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_set_sort_by_relevance_then_key'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::set_sort_by_relevance_then_key(Xapian::KeyMaker *,bool)\n"
    "    Xapian::Enquire::set_sort_by_relevance_then_key(Xapian::Sorter *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_get_mset__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::doccount arg4 ;
  Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
  Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ;
  Xapian::MatchDecider *arg7 = (Xapian::MatchDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  unsigned int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  Xapian::MSet result;
  
  if ((nobjs < 7) || (nobjs > 7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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_obj[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(swig_obj[4], &argp5,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); 
  }
  arg5 = reinterpret_cast< Xapian::RSet * >(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Enquire_get_mset" "', argument " "6"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg6 = reinterpret_cast< Xapian::MatchDecider * >(argp6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Enquire_get_mset" "', argument " "7"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg7 = reinterpret_cast< Xapian::MatchDecider * >(argp7);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6,(Xapian::MatchDecider const *)arg7);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_mset__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  Xapian::MSet result;
  
  if ((nobjs < 6) || (nobjs > 6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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_obj[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(swig_obj[4], &argp5,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); 
  }
  arg5 = reinterpret_cast< Xapian::RSet * >(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Enquire_get_mset" "', argument " "6"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg6 = reinterpret_cast< Xapian::MatchDecider * >(argp6);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_mset__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::MSet result;
  
  if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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_obj[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(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_mset__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::MSet result;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_mset__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::MSet result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_mset__SWIG_5(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
  Xapian::MatchDecider *arg5 = (Xapian::MatchDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  Xapian::MSet result;
  
  if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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(swig_obj[3], &argp4,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::RSet const *""'"); 
  }
  arg4 = reinterpret_cast< Xapian::RSet * >(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg5 = reinterpret_cast< Xapian::MatchDecider * >(argp5);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4,(Xapian::MatchDecider const *)arg5);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_mset__SWIG_6(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::MSet result;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_mset(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[8];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_get_mset",0,7,argv))) SWIG_fail;
  --argc;
  if (argc == 3) {
    return _wrap_Enquire_get_mset__SWIG_4(self, argc, argv);
  }
  if (argc == 4) {
    int _v = 0;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_2;
    return _wrap_Enquire_get_mset__SWIG_6(self, argc, argv);
  }
check_2:
  
  if (argc == 4) {
    return _wrap_Enquire_get_mset__SWIG_3(self, argc, argv);
  }
  if (argc == 5) {
    int _v = 0;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_4;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_4;
    return _wrap_Enquire_get_mset__SWIG_5(self, argc, argv);
  }
check_4:
  
  if (argc == 5) {
    return _wrap_Enquire_get_mset__SWIG_2(self, argc, argv);
  }
  if (argc == 6) {
    return _wrap_Enquire_get_mset__SWIG_1(self, argc, argv);
  }
  if (argc == 7) {
    return _wrap_Enquire_get_mset__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_get_mset'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::get_mset(Xapian::doccount,Xapian::doccount,Xapian::doccount,Xapian::RSet const *,Xapian::MatchDecider const *,Xapian::MatchDecider const *) const\n"
    "    Xapian::Enquire::get_mset(Xapian::doccount,Xapian::doccount,Xapian::doccount,Xapian::RSet const *,Xapian::MatchDecider const *) const\n"
    "    Xapian::Enquire::get_mset(Xapian::doccount,Xapian::doccount,Xapian::doccount,Xapian::RSet const *) const\n"
    "    Xapian::Enquire::get_mset(Xapian::doccount,Xapian::doccount,Xapian::doccount) const\n"
    "    Xapian::Enquire::get_mset(Xapian::doccount,Xapian::doccount) const\n"
    "    Xapian::Enquire::get_mset(Xapian::doccount,Xapian::doccount,Xapian::RSet const *,Xapian::MatchDecider const *) const\n"
    "    Xapian::Enquire::get_mset(Xapian::doccount,Xapian::doccount,Xapian::RSet const *) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_get_eset__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  Xapian::ESet result;
  
  if ((nobjs < 6) || (nobjs > 6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__RSet,  0  | 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_obj[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_obj[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);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Enquire_get_eset" "', argument " "6"" of type '" "Xapian::ExpandDecider const *""'"); 
  }
  arg6 = reinterpret_cast< Xapian::ExpandDecider * >(argp6);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_eset__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  Xapian::ESet result;
  
  if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__RSet,  0  | 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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_eset__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::ESet result;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__RSet,  0  | 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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_eset__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::ESet result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__RSet,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_eset__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
  Xapian::weight 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 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  Xapian::ESet result;
  
  if ((nobjs < 7) || (nobjs > 7)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__RSet,  0  | 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_obj[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_obj[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);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Enquire_get_eset" "', argument " "6"" of type '" "Xapian::ExpandDecider const *""'"); 
  }
  arg6 = reinterpret_cast< Xapian::ExpandDecider * >(argp6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Enquire_get_eset" "', argument " "7"" of type '" "Xapian::weight""'");
  } 
  arg7 = static_cast< Xapian::weight >(val7);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6,arg7);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_eset__SWIG_5(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  Xapian::ESet result;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__RSet,  0  | 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);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_Xapian__ExpandDecider, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Enquire_get_eset" "', argument " "4"" of type '" "Xapian::ExpandDecider const *""'"); 
  }
  arg4 = reinterpret_cast< Xapian::ExpandDecider * >(argp4);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,(Xapian::ExpandDecider const *)arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_eset(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[8];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_get_eset",0,7,argv))) SWIG_fail;
  --argc;
  if (argc == 3) {
    return _wrap_Enquire_get_eset__SWIG_3(self, argc, argv);
  }
  if (argc == 4) {
    int _v = 0;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__ExpandDecider, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_2;
    return _wrap_Enquire_get_eset__SWIG_5(self, argc, argv);
  }
check_2:
  
  if (argc == 4) {
    return _wrap_Enquire_get_eset__SWIG_2(self, argc, argv);
  }
  if (argc == 5) {
    return _wrap_Enquire_get_eset__SWIG_1(self, argc, argv);
  }
  if (argc == 6) {
    return _wrap_Enquire_get_eset__SWIG_0(self, argc, argv);
  }
  if (argc == 7) {
    return _wrap_Enquire_get_eset__SWIG_4(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_get_eset'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::get_eset(Xapian::termcount,Xapian::RSet const &,int,double,Xapian::ExpandDecider const *) const\n"
    "    Xapian::Enquire::get_eset(Xapian::termcount,Xapian::RSet const &,int,double) const\n"
    "    Xapian::Enquire::get_eset(Xapian::termcount,Xapian::RSet const &,int) const\n"
    "    Xapian::Enquire::get_eset(Xapian::termcount,Xapian::RSet const &) const\n"
    "    Xapian::Enquire::get_eset(Xapian::termcount,Xapian::RSet const &,int,double,Xapian::ExpandDecider const *,Xapian::weight) const\n"
    "    Xapian::Enquire::get_eset(Xapian::termcount,Xapian::RSet const &,Xapian::ExpandDecider const *) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_get_matching_terms_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_matching_terms_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_matching_terms_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin((Xapian::MSetIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_matching_terms_begin(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_get_matching_terms_begin",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_1;
    return _wrap_Enquire_get_matching_terms_begin__SWIG_1(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_Enquire_get_matching_terms_begin__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_get_matching_terms_begin'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::get_matching_terms_begin(Xapian::docid) const\n"
    "    Xapian::Enquire::get_matching_terms_begin(Xapian::MSetIterator const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire_get_matching_terms_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0  | 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Enquire_get_matching_terms_end(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Enquire_get_matching_terms_end",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_1;
    return _wrap_Enquire_get_matching_terms_end__SWIG_1(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_Enquire_get_matching_terms_end__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Enquire_get_matching_terms_end'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Enquire::get_matching_terms_end(Xapian::docid) const\n"
    "    Xapian::Enquire::get_matching_terms_end(Xapian::MSetIterator const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Enquire___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire___str__" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Enquire const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Enquire_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Enquire, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Enquire_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_Registry__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Registry *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Registry *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__Registry,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Registry" "', argument " "1"" of type '" "Xapian::Registry const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Registry" "', argument " "1"" of type '" "Xapian::Registry const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Registry *)new Xapian::Registry((Xapian::Registry const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Registry, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Registry__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::Registry *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Registry *)new Xapian::Registry();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Registry, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Registry(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_Registry",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_Registry__SWIG_1(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_Registry__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Registry'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Registry::Registry(Xapian::Registry const &)\n"
    "    Xapian::Registry::Registry()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_Registry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Registry, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Registry" "', argument " "1"" of type '" "Xapian::Registry *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Registry_register_weighting_scheme(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Registry_register_weighting_scheme",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Weight,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->register_weighting_scheme((Xapian::Weight const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Registry_get_weighting_scheme(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::Weight *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"Registry_get_weighting_scheme",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Weight *)((Xapian::Registry const *)arg1)->get_weighting_scheme((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Weight, 0 |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Registry_register_posting_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::PostingSource *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Registry_register_posting_source",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__PostingSource,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->register_posting_source((Xapian::PostingSource const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Registry_get_posting_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  Xapian::PostingSource *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"Registry_get_posting_source",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::PostingSource *)((Xapian::Registry const *)arg1)->get_posting_source((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  director = SWIG_DIRECTOR_CAST(result);
  if (director) {
    resultobj = director->swig_get_self();
    Py_INCREF(resultobj);
  } else {
    resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  }
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Registry_register_match_spy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::MatchSpy *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Registry_register_match_spy",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__MatchSpy,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->register_match_spy((Xapian::MatchSpy const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Registry_get_match_spy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::MatchSpy *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"Registry_get_match_spy",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::MatchSpy *)((Xapian::Registry const *)arg1)->get_match_spy((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *Registry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Registry, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Registry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_Weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Weight, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Weight" "', argument " "1"" of type '" "Xapian::Weight *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Weight_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Weight const *)arg1)->name();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Weight_get_sumpart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  Xapian::weight result;
  
  if (!SWIG_Python_UnpackTuple(args,"Weight_get_sumpart",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Weight_get_maxpart(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::weight result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxpart();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Weight_get_sumextra(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::weight result;
  
  if (!SWIG_Python_UnpackTuple(args,"Weight_get_sumextra",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumextra(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Weight_get_maxextra(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::weight result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxextra();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Weight_get_sumpart_needs_doclength_(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_sumpart_needs_doclength_" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_doclength_();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Weight_get_sumpart_needs_wdf_(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_sumpart_needs_wdf_" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_wdf_();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Weight_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Weight, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_BoolWeight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::BoolWeight *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"new_BoolWeight",0,0,0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::BoolWeight *)new Xapian::BoolWeight();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BoolWeight, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_BoolWeight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__BoolWeight, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoolWeight" "', argument " "1"" of type '" "Xapian::BoolWeight *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *BoolWeight_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__BoolWeight, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *BoolWeight_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_BM25Weight__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::BM25Weight *result = 0 ;
  
  if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[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_obj[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_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::BM25Weight *)new Xapian::BM25Weight(arg1,arg2,arg3,arg4,arg5);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BM25Weight, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_BM25Weight__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::BM25Weight *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::BM25Weight *)new Xapian::BM25Weight();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BM25Weight, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_BM25Weight(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[6];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_BM25Weight",0,5,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_BM25Weight__SWIG_1(self, argc, argv);
  }
  if (argc == 5) {
    return _wrap_new_BM25Weight__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_BM25Weight'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::BM25Weight::BM25Weight(double,double,double,double,double)\n"
    "    Xapian::BM25Weight::BM25Weight()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_BM25Weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__BM25Weight, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BM25Weight" "', argument " "1"" of type '" "Xapian::BM25Weight *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *BM25Weight_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__BM25Weight, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *BM25Weight_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_TradWeight__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  Xapian::TradWeight *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::TradWeight *)new Xapian::TradWeight(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TradWeight, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_TradWeight__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::TradWeight *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::TradWeight *)new Xapian::TradWeight();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TradWeight, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_TradWeight(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_TradWeight",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_TradWeight__SWIG_1(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_TradWeight__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_TradWeight'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::TradWeight::TradWeight(double)\n"
    "    Xapian::TradWeight::TradWeight()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_TradWeight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TradWeight, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TradWeight" "', argument " "1"" of type '" "Xapian::TradWeight *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *TradWeight_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__TradWeight, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *TradWeight_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_MatchSpy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::MatchSpy *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::MatchSpy *)new SwigDirector_MatchSpy(arg1); 
        } else {
          SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); 
          SWIG_fail;
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MatchSpy, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_MatchSpy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchSpy, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatchSpy" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatchSpy___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  if (!SWIG_Python_UnpackTuple(args,"MatchSpy___call__",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy___call__" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Document,  0  | 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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MatchSpy___call__" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::MatchSpy::operator ()");
        } else {
          (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatchSpy_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_name" "', argument " "1"" of type '" "Xapian::MatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::name();
        } else {
          result = ((Xapian::MatchSpy const *)arg1)->name();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatchSpy_merge_results(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  if (!SWIG_Python_UnpackTuple(args,"MatchSpy_merge_results",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_merge_results" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          (arg1)->Xapian::MatchSpy::merge_results((std::string const &)*arg2);
        } else {
          (arg1)->merge_results((std::string const &)*arg2);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MatchSpy___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy___str__" "', argument " "1"" of type '" "Xapian::MatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::get_description();
        } else {
          result = ((Xapian::MatchSpy const *)arg1)->get_description();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_MatchSpy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_MatchSpy" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *MatchSpy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__MatchSpy, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *MatchSpy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_ValueCountMatchSpy__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueCountMatchSpy, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ValueCountMatchSpy__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueCountMatchSpy, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ValueCountMatchSpy(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_ValueCountMatchSpy",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_ValueCountMatchSpy__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_ValueCountMatchSpy__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ValueCountMatchSpy'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::ValueCountMatchSpy::ValueCountMatchSpy()\n"
    "    Xapian::ValueCountMatchSpy::ValueCountMatchSpy(Xapian::valueno)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_ValueCountMatchSpy_get_total(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_get_total" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueCountMatchSpy_values_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueCountMatchSpy_values_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_values_end" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueCountMatchSpy_top_values_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::TermIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueCountMatchSpy_top_values_begin",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_begin(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueCountMatchSpy_top_values_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::TermIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueCountMatchSpy_top_values_end",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueCountMatchSpy_top_values_end" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ValueCountMatchSpy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueCountMatchSpy" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ValueCountMatchSpy_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ValueCountMatchSpy, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ValueCountMatchSpy_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_Database_add_database(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_add_database",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Database,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_database((Xapian::Database const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Database__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::Database *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Database *)new Xapian::Database();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Database__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Database(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Database, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Database" "', argument " "1"" of type '" "Xapian::Database *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Database__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Database *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__Database,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Database" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Database" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Database *)new Xapian::Database((Xapian::Database const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Database(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_Database",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_Database__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    int _v = 0;
    {
      int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Xapian__Database, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_2;
    return _wrap_new_Database__SWIG_2(self, argc, argv);
  }
check_2:
  
  if (argc == 1) {
    return _wrap_new_Database__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Database'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Database::Database()\n"
    "    Xapian::Database::Database(std::string const &)\n"
    "    Xapian::Database::Database(Xapian::Database const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Database_reopen(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->reopen();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->close();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database___str__" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_postlist_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::PostingIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_postlist_begin",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->postlist_begin((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_postlist_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::PostingIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_postlist_end",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_postlist_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_postlist_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_termlist_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::TermIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_termlist_begin",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->termlist_begin(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_termlist_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::TermIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_termlist_end",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_termlist_end" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->termlist_end(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_positionlist_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  Xapian::PositionIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_positionlist_begin",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->positionlist_begin(arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_positionlist_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  Xapian::PositionIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_positionlist_end",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[2]), &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Database_positionlist_end" "', argument " "3"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_positionlist_end" "', argument " "3"" of type '" "std::string const &""'");
    }
    arg3 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_allterms_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->allterms_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_allterms_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->allterms_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_allterms_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->allterms_begin((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_allterms_begin(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Database_allterms_begin",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_Database_allterms_begin__SWIG_0(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_Database_allterms_begin__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Database_allterms_begin'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Database::allterms_begin() const\n"
    "    Xapian::Database::allterms_begin(std::string const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Database_allterms_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_allterms_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_allterms_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_allterms_end(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Database_allterms_end",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_Database_allterms_end__SWIG_0(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_Database_allterms_end__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Database_allterms_end'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Database::allterms_end() const\n"
    "    Xapian::Database::allterms_end(std::string const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Database_get_doccount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doccount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_doccount();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_lastdocid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::docid result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::docid)((Xapian::Database const *)arg1)->get_lastdocid();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_avlength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::doclength result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_avlength();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_termfreq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::doccount result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_termfreq",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_termfreq((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_term_exists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_term_exists",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)((Xapian::Database const *)arg1)->term_exists((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_collection_freq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::termcount result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_collection_freq",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_collection_freq((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_value_freq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::doccount result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_value_freq",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_value_freq(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_value_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_value_lower_bound",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->get_value_lower_bound(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_value_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_value_upper_bound",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->get_value_upper_bound(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_doclength_lower_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_lower_bound();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_doclength_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_upper_bound();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_wdf_upper_bound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::termcount result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_wdf_upper_bound",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_wdf_upper_bound((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_valuestream_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::ValueIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_valuestream_begin",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->valuestream_begin(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_valuestream_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::ValueIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_valuestream_end",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_valuestream_end" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->valuestream_end(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_doclength(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::termcount result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_doclength",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_keep_alive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->keep_alive();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::Document result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_document",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_document" "', argument " "1"" of type '" "Xapian::Database *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (arg1)->get_document(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_spelling_suggestion__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  std::string result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_spelling_suggestion__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  std::string result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_get_spelling_suggestion(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Database_get_spelling_suggestion",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_Database_get_spelling_suggestion__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_Database_get_spelling_suggestion__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Database_get_spelling_suggestion'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Database::get_spelling_suggestion(std::string const &,unsigned int) const\n"
    "    Xapian::Database::get_spelling_suggestion(std::string const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Database_spellings_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->spellings_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_spellings_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_spellings_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->spellings_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_synonyms_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::TermIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_synonyms_begin",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->synonyms_begin((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_synonyms_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::TermIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_synonyms_end",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonyms_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonyms_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_synonym_keys_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->synonym_keys_begin((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_synonym_keys_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->synonym_keys_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_synonym_keys_begin(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Database_synonym_keys_begin",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_Database_synonym_keys_begin__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_Database_synonym_keys_begin__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Database_synonym_keys_begin'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Database::synonym_keys_begin(std::string const &) const\n"
    "    Xapian::Database::synonym_keys_begin() const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Database_synonym_keys_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonym_keys_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonym_keys_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_synonym_keys_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->synonym_keys_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_synonym_keys_end(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Database_synonym_keys_end",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_Database_synonym_keys_end__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_Database_synonym_keys_end__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Database_synonym_keys_end'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Database::synonym_keys_end(std::string const &) const\n"
    "    Xapian::Database::synonym_keys_end() const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Database_get_metadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"Database_get_metadata",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->get_metadata((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database__metadata_keys_begin__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->metadata_keys_begin((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database__metadata_keys_begin__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->metadata_keys_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database__metadata_keys_begin(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Database__metadata_keys_begin",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_Database__metadata_keys_begin__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_Database__metadata_keys_begin__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Database__metadata_keys_begin'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Database::metadata_keys_begin(std::string const &) const\n"
    "    Xapian::Database::metadata_keys_begin() const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Database__metadata_keys_end__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database__metadata_keys_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database__metadata_keys_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database__metadata_keys_end__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database__metadata_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->metadata_keys_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database__metadata_keys_end(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Database__metadata_keys_end",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_Database__metadata_keys_end__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_Database__metadata_keys_end__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Database__metadata_keys_end'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Database::metadata_keys_end(std::string const &) const\n"
    "    Xapian::Database::metadata_keys_end() const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Database_get_uuid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Database const *)arg1)->get_uuid();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Database_has_positions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)((Xapian::Database const *)arg1)->has_positions();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Database_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Database, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Database_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_WritableDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_WritableDatabase__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_WritableDatabase__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::WritableDatabase *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_WritableDatabase__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::WritableDatabase *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__WritableDatabase,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((Xapian::WritableDatabase const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_WritableDatabase(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_WritableDatabase",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_WritableDatabase__SWIG_0(self, argc, argv);
  }
  if (argc == 1) {
    return _wrap_new_WritableDatabase__SWIG_2(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_new_WritableDatabase__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_WritableDatabase'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::WritableDatabase::WritableDatabase()\n"
    "    Xapian::WritableDatabase::WritableDatabase(std::string const &,int)\n"
    "    Xapian::WritableDatabase::WritableDatabase(Xapian::WritableDatabase const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_commit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->commit();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_flush(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->flush();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_begin_transaction__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->begin_transaction(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_begin_transaction__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->begin_transaction();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_begin_transaction(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_begin_transaction",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_WritableDatabase_begin_transaction__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_WritableDatabase_begin_transaction__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WritableDatabase_begin_transaction'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::WritableDatabase::begin_transaction(bool)\n"
    "    Xapian::WritableDatabase::begin_transaction()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_commit_transaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->commit_transaction();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_cancel_transaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->cancel_transaction();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_add_document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::docid result;
  
  if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_add_document",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Document,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::docid)(arg1)->add_document((Xapian::Document const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_delete_document__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->delete_document(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_replace_document__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__Document,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->replace_document(arg2,(Xapian::Document const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_delete_document__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  {
    std::string *ptr = (std::string *)0;
    res2 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_delete_document" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_delete_document" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->delete_document((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_delete_document(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_delete_document",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_1;
    return _wrap_WritableDatabase_delete_document__SWIG_0(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_WritableDatabase_delete_document__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WritableDatabase_delete_document'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::WritableDatabase::delete_document(Xapian::docid)\n"
    "    Xapian::WritableDatabase::delete_document(std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_replace_document__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::docid result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  {
    std::string *ptr = (std::string *)0;
    res2 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_replace_document" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_replace_document" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__Document,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::docid)(arg1)->replace_document((std::string const &)*arg2,(Xapian::Document const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_replace_document(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_replace_document",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_1;
    return _wrap_WritableDatabase_replace_document__SWIG_0(self, argc, argv);
  }
check_1:
  
  if (argc == 3) {
    return _wrap_WritableDatabase_replace_document__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WritableDatabase_replace_document'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::WritableDatabase::replace_document(Xapian::docid,Xapian::Document const &)\n"
    "    Xapian::WritableDatabase::replace_document(std::string const &,Xapian::Document const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_add_spelling__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_add_spelling__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_add_spelling(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_add_spelling",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_WritableDatabase_add_spelling__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_WritableDatabase_add_spelling__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WritableDatabase_add_spelling'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::WritableDatabase::add_spelling(std::string const &,Xapian::termcount) const\n"
    "    Xapian::WritableDatabase::add_spelling(std::string const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_remove_spelling__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_remove_spelling__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_remove_spelling(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"WritableDatabase_remove_spelling",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_WritableDatabase_remove_spelling__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_WritableDatabase_remove_spelling__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'WritableDatabase_remove_spelling'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::WritableDatabase::remove_spelling(std::string const &,Xapian::termcount) const\n"
    "    Xapian::WritableDatabase::remove_spelling(std::string const &) const\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_add_synonym(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_add_synonym",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::WritableDatabase const *)arg1)->add_synonym((std::string const &)*arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_remove_synonym(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_remove_synonym",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::WritableDatabase const *)arg1)->remove_synonym((std::string const &)*arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_clear_synonyms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_clear_synonyms",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        ((Xapian::WritableDatabase const *)arg1)->clear_synonyms((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase_set_metadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args,"WritableDatabase_set_metadata",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_metadata((std::string const &)*arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_WritableDatabase___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase___str__" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::WritableDatabase const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *WritableDatabase_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__WritableDatabase, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *WritableDatabase_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_open_stub(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject *swig_obj[1] ;
  Xapian::Database result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_stub" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "open_stub" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Auto::open_stub((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_brass_open__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Brass::open((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_brass_open__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "brass_open" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "brass_open" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Brass::open((std::string const &)*arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_brass_open__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "brass_open" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Brass::open((std::string const &)*arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_brass_open(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"brass_open",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_brass_open__SWIG_0(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_brass_open__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_brass_open__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'brass_open'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Brass::open(std::string const &)\n"
    "    Xapian::Brass::open(std::string const &,int,int)\n"
    "    Xapian::Brass::open(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_chert_open__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Chert::open((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_chert_open__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "chert_open" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "chert_open" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Chert::open((std::string const &)*arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_chert_open__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "chert_open" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Chert::open((std::string const &)*arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_chert_open(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"chert_open",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_chert_open__SWIG_0(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_chert_open__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_chert_open__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'chert_open'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Chert::open(std::string const &)\n"
    "    Xapian::Chert::open(std::string const &,int,int)\n"
    "    Xapian::Chert::open(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_flint_open__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Flint::open((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_flint_open__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flint_open" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "flint_open" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Flint::open((std::string const &)*arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_flint_open__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[0]), &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'");
    }
    arg1 = ptr;
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flint_open" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Flint::open((std::string const &)*arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_flint_open(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"flint_open",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_flint_open__SWIG_0(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_flint_open__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_flint_open__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'flint_open'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Flint::open(std::string const &)\n"
    "    Xapian::Flint::open(std::string const &,int,int)\n"
    "    Xapian::Flint::open(std::string const &,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_inmemory_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::WritableDatabase result;
  
  if (!SWIG_Python_UnpackTuple(args,"inmemory_open",0,0,0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::InMemory::open();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::timeout arg3 ;
  Xapian::timeout arg4 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  unsigned int val4 ;
  int ecode4 = 0 ;
  Xapian::Database result;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "remote_open" "', argument " "4"" of type '" "Xapian::timeout""'");
  } 
  arg4 = static_cast< Xapian::timeout >(val4);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3,arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::timeout arg3 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  Xapian::Database result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::Database result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open((std::string const &)*arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open_writable__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::timeout arg3 ;
  Xapian::timeout arg4 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  unsigned int val4 ;
  int ecode4 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  ecode4 = SWIG_AsVal_unsigned_SS_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "remote_open_writable" "', argument " "4"" of type '" "Xapian::timeout""'");
  } 
  arg4 = static_cast< Xapian::timeout >(val4);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open_writable__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::timeout arg3 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open_writable__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  Xapian::timeout arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  Xapian::Database result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"remote_open",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_1;
    return _wrap_remote_open__SWIG_2(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_remote_open__SWIG_4(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_3;
    return _wrap_remote_open__SWIG_1(self, argc, argv);
  }
check_3:
  
  if (argc == 3) {
    return _wrap_remote_open__SWIG_3(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_remote_open__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'remote_open'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Remote::open(std::string const &,unsigned int,Xapian::timeout,Xapian::timeout)\n"
    "    Xapian::Remote::open(std::string const &,unsigned int,Xapian::timeout)\n"
    "    Xapian::Remote::open(std::string const &,unsigned int)\n"
    "    Xapian::Remote::open(std::string const &,std::string const &,Xapian::timeout)\n"
    "    Xapian::Remote::open(std::string const &,std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_remote_open_writable__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  Xapian::timeout arg3 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open_writable__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::WritableDatabase result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_remote_open_writable(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"remote_open_writable",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_1;
    return _wrap_remote_open_writable__SWIG_2(self, argc, argv);
  }
check_1:
  
  if (argc == 2) {
    return _wrap_remote_open_writable__SWIG_4(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_3;
    return _wrap_remote_open_writable__SWIG_1(self, argc, argv);
  }
check_3:
  
  if (argc == 3) {
    return _wrap_remote_open_writable__SWIG_3(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_remote_open_writable__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'remote_open_writable'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Remote::open_writable(std::string const &,unsigned int,Xapian::timeout,Xapian::timeout)\n"
    "    Xapian::Remote::open_writable(std::string const &,unsigned int,Xapian::timeout)\n"
    "    Xapian::Remote::open_writable(std::string const &,unsigned int)\n"
    "    Xapian::Remote::open_writable(std::string const &,std::string const &,Xapian::timeout)\n"
    "    Xapian::Remote::open_writable(std::string const &,std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Query *arg1 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_Xapian__Query,  0  | 0);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query((Xapian::Query const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **SWIGUNUSEDPARM(swig_obj)) {
  PyObject *resultobj = 0;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Query(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Query, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Query" "', argument " "1"" of type '" "Xapian::Query *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  Xapian::termcount arg2 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_5(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Query,  0  | 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(swig_obj[2], &argp3, SWIGTYPE_p_Xapian__Query,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,(Xapian::Query const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_6(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_9(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Query::op arg1 ;
  Xapian::Query arg2 ;
  double arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Query,  0  | 0);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query""'");
    } else {
      Xapian::Query * temp = reinterpret_cast< Xapian::Query * >(argp2);
      arg2 = *temp;
      if (SWIG_IsNewObj(res2)) delete temp;
    }
  }
  ecode3 = SWIG_AsVal_double(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_10(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[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_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_11(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[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_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_12(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new Xapian::Query(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Query_get_length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_length" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Query_get_terms_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Query const *)arg1)->get_terms_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Query_get_terms_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_terms_end" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Query const *)arg1)->get_terms_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Query_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_empty" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (bool)((Xapian::Query const *)arg1)->empty();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Query_serialise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Query const *)arg1)->serialise();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Query_unserialise__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Query result;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Query::unserialise((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Query_unserialise__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  Xapian::Registry *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  Xapian::Query result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Registry,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Query::unserialise((std::string const &)*arg1,(Xapian::Registry const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Query_unserialise(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"Query_unserialise",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_Query_unserialise__SWIG_0(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_Query_unserialise__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Query_unserialise'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Query::unserialise(std::string const &)\n"
    "    Xapian::Query::unserialise(std::string const &,Xapian::Registry const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Query___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query___str__" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Query const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_13(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Query::op arg1 ;
  std::vector< Xapian::Query > *arg2 = 0 ;
  Xapian::termcount arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  vector< Xapian::Query > v2 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[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);
  {
    PyObject * fastseq = PySequence_Fast(swig_obj[1], "expected sequence of strings or queries");
    if (!fastseq) {
      SWIG_fail;
    }
    
    int numitems = PySequence_Fast_GET_SIZE(fastseq);
    v2.reserve(numitems);
    for (int i = 0; i < numitems; ++i) {
      PyObject *obj = PySequence_Fast_GET_ITEM(fastseq, i);
      PyObject *decrefme = NULL;
      if (PyUnicode_Check(obj)) {
        PyObject *strobj = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(obj), PyUnicode_GET_SIZE(obj), "ignore");
        if (!strobj) SWIG_fail;
        obj = strobj;
        decrefme = strobj;
      }
#if PY_VERSION_HEX >= 0x03000000
      if (PyBytes_Check(obj))
#else
      if (PyString_Check(obj))
#endif
      {
        char * p;
        Py_ssize_t len;
#if PY_VERSION_HEX >= 0x03000000
        /* We know this must be a bytes object, so this call can't fail. */
        (void)PyBytes_AsStringAndSize(obj, &p, &len);
#else
        /* We know this must be a string, so this call can't fail. */
        (void)PyString_AsStringAndSize(obj, &p, &len);
#endif
        v2.push_back(Xapian::Query(string(p, len)));
      } else {
        Xapian::Query *subqp = Xapian::get_py_query(obj);
        if (!subqp) {
          PyErr_SetString(PyExc_TypeError, "expected string or query");
          Py_XDECREF(decrefme);
          SWIG_fail;
        }
        v2.push_back(*subqp);
      }
      Py_XDECREF(decrefme);
    }
    arg2 = &v2;
    Py_DECREF(fastseq);
  }
  ecode3 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< Xapian::Query > const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query__SWIG_14(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::Query::op arg1 ;
  std::vector< Xapian::Query > *arg2 = 0 ;
  int val1 ;
  int ecode1 = 0 ;
  vector< Xapian::Query > v2 ;
  Xapian::Query *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[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);
  {
    PyObject * fastseq = PySequence_Fast(swig_obj[1], "expected sequence of strings or queries");
    if (!fastseq) {
      SWIG_fail;
    }
    
    int numitems = PySequence_Fast_GET_SIZE(fastseq);
    v2.reserve(numitems);
    for (int i = 0; i < numitems; ++i) {
      PyObject *obj = PySequence_Fast_GET_ITEM(fastseq, i);
      PyObject *decrefme = NULL;
      if (PyUnicode_Check(obj)) {
        PyObject *strobj = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(obj), PyUnicode_GET_SIZE(obj), "ignore");
        if (!strobj) SWIG_fail;
        obj = strobj;
        decrefme = strobj;
      }
#if PY_VERSION_HEX >= 0x03000000
      if (PyBytes_Check(obj))
#else
      if (PyString_Check(obj))
#endif
      {
        char * p;
        Py_ssize_t len;
#if PY_VERSION_HEX >= 0x03000000
        /* We know this must be a bytes object, so this call can't fail. */
        (void)PyBytes_AsStringAndSize(obj, &p, &len);
#else
        /* We know this must be a string, so this call can't fail. */
        (void)PyString_AsStringAndSize(obj, &p, &len);
#endif
        v2.push_back(Xapian::Query(string(p, len)));
      } else {
        Xapian::Query *subqp = Xapian::get_py_query(obj);
        if (!subqp) {
          PyErr_SetString(PyExc_TypeError, "expected string or query");
          Py_XDECREF(decrefme);
          SWIG_fail;
        }
        v2.push_back(*subqp);
      }
      Py_XDECREF(decrefme);
    }
    arg2 = &v2;
    Py_DECREF(fastseq);
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< Xapian::Query > const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Query(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_Query",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 0) {
    return _wrap_new_Query__SWIG_1(self, argc, argv);
  }
  if (argc == 1) {
    int _v = 0;
    {
      int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_Xapian__Query, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_2;
    return _wrap_new_Query__SWIG_0(self, argc, argv);
  }
check_2:
  
  if (argc == 1) {
    int _v = 0;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__PostingSource, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_3;
    return _wrap_new_Query__SWIG_12(self, argc, argv);
  }
check_3:
  
  if (argc == 1) {
    return _wrap_new_Query__SWIG_4(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[0], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_5;
    {
      {
        if (!PySequence_Check(argv[1])) {
          _v = 0;
        } else {
          _v = 1;
          PyObject * fastseq = PySequence_Fast(argv[1], "expected sequence of strings or queries");
          if (!fastseq) {
            // We've already checked that we have a sequence, so the failure of
            // PySequence_Fast() is a serious error, not just a failure of
            // typecheck.
            SWIG_fail;
          }
          int numitems = PySequence_Fast_GET_SIZE(fastseq);
          for (int i = 0; i < numitems; ++i) {
            PyObject *obj = PySequence_Fast_GET_ITEM(fastseq, i);
            if (!PyUnicode_Check(obj) &&
  #if PY_VERSION_HEX >= 0x03000000
              !PyBytes_Check(obj) &&
  #else
              !PyString_Check(obj) &&
  #endif
              !Xapian::get_py_query(obj)) {
              _v = 0;
              break;
            }
          }
          Py_DECREF(fastseq);
        }
      }
    }
    if (!_v) goto check_5;
    return _wrap_new_Query__SWIG_14(self, argc, argv);
  }
check_5:
  
  if (argc == 2) {
    return _wrap_new_Query__SWIG_3(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[0], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_7;
    {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Xapian__Query, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_7;
    {
      int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_Xapian__Query, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_7;
    return _wrap_new_Query__SWIG_5(self, argc, argv);
  }
check_7:
  
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[0], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_8;
    {
      int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_Xapian__Query, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_8;
    {
      {
        int res = SWIG_AsVal_double(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_8;
    return _wrap_new_Query__SWIG_9(self, argc, argv);
  }
check_8:
  
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[0], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_9;
    {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_9;
    {
      int res = XapianSWIG_anystring_as_ptr(&(argv[2]), (std::string**)(0));
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_9;
    return _wrap_new_Query__SWIG_11(self, argc, argv);
  }
check_9:
  
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[0], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_10;
    {
      {
        if (!PySequence_Check(argv[1])) {
          _v = 0;
        } else {
          _v = 1;
          PyObject * fastseq = PySequence_Fast(argv[1], "expected sequence of strings or queries");
          if (!fastseq) {
            // We've already checked that we have a sequence, so the failure of
            // PySequence_Fast() is a serious error, not just a failure of
            // typecheck.
            SWIG_fail;
          }
          int numitems = PySequence_Fast_GET_SIZE(fastseq);
          for (int i = 0; i < numitems; ++i) {
            PyObject *obj = PySequence_Fast_GET_ITEM(fastseq, i);
            if (!PyUnicode_Check(obj) &&
  #if PY_VERSION_HEX >= 0x03000000
              !PyBytes_Check(obj) &&
  #else
              !PyString_Check(obj) &&
  #endif
              !Xapian::get_py_query(obj)) {
              _v = 0;
              break;
            }
          }
          Py_DECREF(fastseq);
        }
      }
    }
    if (!_v) goto check_10;
    {
      {
        int res = SWIG_AsVal_unsigned_SS_int(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_10;
    return _wrap_new_Query__SWIG_13(self, argc, argv);
  }
check_10:
  
  if (argc == 3) {
    int _v = 0;
    {
      {
        int res = SWIG_AsVal_int(argv[0], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_11;
    {
      int res = XapianSWIG_anystring_as_ptr(&(argv[1]), (std::string**)(0));
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_11;
    {
      int res = XapianSWIG_anystring_as_ptr(&(argv[2]), (std::string**)(0));
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_11;
    return _wrap_new_Query__SWIG_6(self, argc, argv);
  }
check_11:
  
  if (argc == 3) {
    return _wrap_new_Query__SWIG_2(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_new_Query__SWIG_10(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Query'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Query::Query(Xapian::Query const &)\n"
    "    Xapian::Query::Query()\n"
    "    Xapian::Query::Query(std::string const &,Xapian::termcount,Xapian::termpos)\n"
    "    Xapian::Query::Query(std::string const &,Xapian::termcount)\n"
    "    Xapian::Query::Query(std::string const &)\n"
    "    Xapian::Query::Query(Xapian::Query::op,Xapian::Query const &,Xapian::Query const &)\n"
    "    Xapian::Query::Query(Xapian::Query::op,std::string const &,std::string const &)\n"
    "    Xapian::Query::Query(Xapian::Query::op,Xapian::Query,double)\n"
    "    Xapian::Query::Query(Xapian::Query::op,Xapian::valueno,std::string const &,std::string const &)\n"
    "    Xapian::Query::Query(Xapian::Query::op,Xapian::valueno,std::string const &)\n"
    "    Xapian::Query::Query(Xapian::PostingSource *)\n"
    "    Xapian::Query::Query(Xapian::Query::op,std::vector< Xapian::Query > const &,Xapian::termcount)\n"
    "    Xapian::Query::Query(Xapian::Query::op,std::vector< Xapian::Query > const &)\n");
  return 0;
}


SWIGINTERN PyObject *Query_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Query, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Query_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_Stopper___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  bool upcall = false;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args,"Stopper___call__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stopper___call__" "', argument " "1"" of type '" "Xapian::Stopper const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::Stopper::operator ()");
        } else {
          result = (bool)((Xapian::Stopper const *)arg1)->operator ()((std::string const &)*arg2);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Stopper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Stopper, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stopper" "', argument " "1"" of type '" "Xapian::Stopper *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Stopper___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stopper___str__" "', argument " "1"" of type '" "Xapian::Stopper const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          result = ((Xapian::Stopper const *)arg1)->Xapian::Stopper::get_description();
        } else {
          result = ((Xapian::Stopper const *)arg1)->get_description();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Stopper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::Stopper *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::Stopper *)new SwigDirector_Stopper(arg1); 
        } else {
          SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); 
          SWIG_fail;
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stopper, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_Stopper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_Stopper" "', argument " "1"" of type '" "Xapian::Stopper *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Stopper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Stopper, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Stopper_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_SimpleStopper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::SimpleStopper *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"new_SimpleStopper",0,0,0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::SimpleStopper *)new Xapian::SimpleStopper();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SimpleStopper, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SimpleStopper_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"SimpleStopper_add",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_SimpleStopper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__SimpleStopper, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleStopper" "', argument " "1"" of type '" "Xapian::SimpleStopper *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *SimpleStopper_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__SimpleStopper, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *SimpleStopper_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_ValueRangeProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueRangeProcessor" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueRangeProcessor___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string temp2 ;
  std::string temp3 ;
  PyObject *swig_obj[3] ;
  Swig::Director *director = 0;
  bool upcall = false;
  Xapian::valueno result;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueRangeProcessor___call__",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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);
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string(swig_obj[1], &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ValueRangeProcessor___call__" "', argument " "2"" of type '" "std::string &""'");
    }
    temp2 = *ptr;
    arg2 = &temp2;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string(swig_obj[2], &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "ValueRangeProcessor___call__" "', argument " "3"" of type '" "std::string &""'");
    }
    temp3 = *ptr;
    arg3 = &temp3;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::ValueRangeProcessor::operator ()");
        } else {
          result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  {
    PyObject * str;
    PyObject * newresult;
    
    // Put the existing result into the first item of a new 3-tuple.
    newresult = PyTuple_New(3);
    if (newresult == 0) {
      Py_DECREF(resultobj);
      resultobj = NULL;
      SWIG_fail;
    }
    PyTuple_SET_ITEM(newresult, 0, resultobj);
    resultobj = newresult;
    
#if PY_VERSION_HEX >= 0x03000000
    str = PyBytes_FromStringAndSize(arg2->data(), arg2->size());
#else
    str = PyString_FromStringAndSize(arg2->data(), arg2->size());
#endif
    if (str == 0) {
      Py_DECREF(resultobj);
      resultobj = NULL;
      SWIG_fail;
    }
    PyTuple_SET_ITEM(resultobj, 1, str);
    
#if PY_VERSION_HEX >= 0x03000000
    str = PyBytes_FromStringAndSize(arg3->data(), arg3->size());
#else
    str = PyString_FromStringAndSize(arg3->data(), arg3->size());
#endif
    if (str == 0) {
      Py_DECREF(resultobj);
      resultobj = NULL;
      SWIG_fail;
    }
    
    PyTuple_SET_ITEM(resultobj, 2, str);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_ValueRangeProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::ValueRangeProcessor *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::ValueRangeProcessor *)new SwigDirector_ValueRangeProcessor(arg1); 
        } else {
          SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); 
          SWIG_fail;
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_ValueRangeProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_ValueRangeProcessor" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ValueRangeProcessor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ValueRangeProcessor, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ValueRangeProcessor_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_StringValueRangeProcessor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringValueRangeProcessor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  bool val3 ;
  int ecode3 = 0 ;
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringValueRangeProcessor__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StringValueRangeProcessor(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_StringValueRangeProcessor",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_StringValueRangeProcessor__SWIG_0(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_new_StringValueRangeProcessor__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_new_StringValueRangeProcessor__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_StringValueRangeProcessor'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::StringValueRangeProcessor::StringValueRangeProcessor(Xapian::valueno)\n"
    "    Xapian::StringValueRangeProcessor::StringValueRangeProcessor(Xapian::valueno,std::string const &,bool)\n"
    "    Xapian::StringValueRangeProcessor::StringValueRangeProcessor(Xapian::valueno,std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_StringValueRangeProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *StringValueRangeProcessor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *StringValueRangeProcessor_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_DateValueRangeProcessor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  bool arg2 ;
  int arg3 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DateValueRangeProcessor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  bool arg2 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DateValueRangeProcessor__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DateValueRangeProcessor__SWIG_3(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DateValueRangeProcessor__SWIG_4(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DateValueRangeProcessor__SWIG_5(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  bool val3 ;
  int ecode3 = 0 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DateValueRangeProcessor__SWIG_6(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_DateValueRangeProcessor(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[6];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_DateValueRangeProcessor",0,5,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_DateValueRangeProcessor__SWIG_2(self, argc, argv);
  }
  if (argc == 2) {
    int _v = 0;
    {
      int res = XapianSWIG_anystring_as_ptr(&(argv[1]), (std::string**)(0));
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_2;
    return _wrap_new_DateValueRangeProcessor__SWIG_6(self, argc, argv);
  }
check_2:
  
  if (argc == 2) {
    return _wrap_new_DateValueRangeProcessor__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    int _v = 0;
    {
      int res = XapianSWIG_anystring_as_ptr(&(argv[1]), (std::string**)(0));
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_4;
    {
      {
        int res = SWIG_AsVal_bool(argv[2], NULL);
        _v = SWIG_CheckState(res);
      }
    }
    if (!_v) goto check_4;
    return _wrap_new_DateValueRangeProcessor__SWIG_5(self, argc, argv);
  }
check_4:
  
  if (argc == 3) {
    return _wrap_new_DateValueRangeProcessor__SWIG_0(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_new_DateValueRangeProcessor__SWIG_4(self, argc, argv);
  }
  if (argc == 5) {
    return _wrap_new_DateValueRangeProcessor__SWIG_3(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_DateValueRangeProcessor'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno,bool,int)\n"
    "    Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno,bool)\n"
    "    Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno)\n"
    "    Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno,std::string const &,bool,bool,int)\n"
    "    Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno,std::string const &,bool,bool)\n"
    "    Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno,std::string const &,bool)\n"
    "    Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno,std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_DateValueRangeProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DateValueRangeProcessor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *DateValueRangeProcessor_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_NumberValueRangeProcessor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NumberValueRangeProcessor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  bool val3 ;
  int ecode3 = 0 ;
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NumberValueRangeProcessor__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_NumberValueRangeProcessor(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_NumberValueRangeProcessor",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_new_NumberValueRangeProcessor__SWIG_0(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_new_NumberValueRangeProcessor__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_new_NumberValueRangeProcessor__SWIG_1(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NumberValueRangeProcessor'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor(Xapian::valueno)\n"
    "    Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor(Xapian::valueno,std::string const &,bool)\n"
    "    Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor(Xapian::valueno,std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_NumberValueRangeProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *NumberValueRangeProcessor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *NumberValueRangeProcessor_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_QueryParser(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"new_QueryParser",0,0,0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::QueryParser *)new Xapian::QueryParser();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParser, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_QueryParser(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__QueryParser, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QueryParser" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_set_stemmer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_stemmer",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Stem,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_set_stemming_strategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::QueryParser::stem_strategy arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_stemming_strategy",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_stemming_strategy(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_set_stopper__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_stopper" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_set_stopper" "', argument " "2"" of type '" "Xapian::Stopper const *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Stopper * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_stopper((Xapian::Stopper const *)arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_set_stopper__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_stopper();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_set_stopper(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"QueryParser_set_stopper",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_QueryParser_set_stopper__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_QueryParser_set_stopper__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'QueryParser_set_stopper'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::QueryParser::set_stopper(Xapian::Stopper const *)\n"
    "    Xapian::QueryParser::set_stopper()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_QueryParser_set_default_op(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Query::op arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_default_op",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_default_op(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_get_default_op(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::Query::op result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Query::op)((Xapian::QueryParser const *)arg1)->get_default_op();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_set_database(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_database",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Database,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_database((Xapian::Database const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_set_max_wildcard_expansion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_set_max_wildcard_expansion",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_max_wildcard_expansion(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_parse_query__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::Query result;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (arg1)->parse_query((std::string const &)*arg2,arg3,(std::string const &)*arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_parse_query__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  Xapian::Query result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (arg1)->parse_query((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_parse_query__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::Query result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (arg1)->parse_query((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_parse_query(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"QueryParser_parse_query",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_QueryParser_parse_query__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_QueryParser_parse_query__SWIG_1(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_QueryParser_parse_query__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'QueryParser_parse_query'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::QueryParser::parse_query(std::string const &,unsigned int,std::string const &)\n"
    "    Xapian::QueryParser::parse_query(std::string const &,unsigned int)\n"
    "    Xapian::QueryParser::parse_query(std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_QueryParser_add_prefix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 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 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_add_prefix",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_prefix((std::string const &)*arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_add_boolean_prefix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  bool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  int res3 = SWIG_OLDOBJ ;
  bool val4 ;
  int ecode4 = 0 ;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_add_boolean_prefix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_add_boolean_prefix(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"QueryParser_add_boolean_prefix",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 3) {
    return _wrap_QueryParser_add_boolean_prefix__SWIG_1(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_QueryParser_add_boolean_prefix__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'QueryParser_add_boolean_prefix'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::QueryParser::add_boolean_prefix(std::string const &,std::string const &,bool)\n"
    "    Xapian::QueryParser::add_boolean_prefix(std::string const &,std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_QueryParser_stoplist_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::QueryParser const *)arg1)->stoplist_begin();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_stoplist_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::TermIterator result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_stoplist_end" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::QueryParser const *)arg1)->stoplist_end();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_unstem_begin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::TermIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_unstem_begin",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::QueryParser const *)arg1)->unstem_begin((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_unstem_end(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Xapian::TermIterator result;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_unstem_end",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_unstem_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_unstem_end" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_add_valuerangeprocessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::ValueRangeProcessor *arg2 = (Xapian::ValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"QueryParser_add_valuerangeprocessor",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_valuerangeprocessor(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser_get_corrected_query_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::QueryParser const *)arg1)->get_corrected_query_string();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_QueryParser___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser___str__" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::QueryParser const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *QueryParser_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__QueryParser, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *QueryParser_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_sortable_serialise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::sortable_serialise(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sortable_unserialise(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (double)Xapian::sortable_unserialise((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_StemImplementation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__StemImplementation, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StemImplementation" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StemImplementation___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"StemImplementation___call__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StemImplementation___call__" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = XapianSWIG_anystring_as_ptr(&(swig_obj[1]), &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StemImplementation___call__" "', argument " "2"" of type '" "std::string const &""'");
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StemImplementation___call__" "', argument " "2"" of type '" "std::string const &""'");
    }
    arg2 = ptr;
  }
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::operator ()");
        } else {
          result = (arg1)->operator ()((std::string const &)*arg2);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StemImplementation___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StemImplementation___str__" "', argument " "1"" of type '" "Xapian::StemImplementation const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::StemImplementation::get_description");
        } else {
          result = ((Xapian::StemImplementation const *)arg1)->get_description();
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_StemImplementation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::StemImplementation *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::StemImplementation *)new SwigDirector_StemImplementation(arg1); 
        } else {
          SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); 
          SWIG_fail;
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StemImplementation, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_StemImplementation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_StemImplementation" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *StemImplementation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__StemImplementation, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *StemImplementation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_Stem__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Stem *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NEW |  0 );
  if (SWIG_IsNewObj(res1)) delete arg1;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Stem__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Stem *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stem" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Stem *)new Xapian::Stem(arg1);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Stem(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[2];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"new_Stem",0,1,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    int _v = 0;
    {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__StemImplementation, 0);
      _v = SWIG_CheckState(res);
    }
    if (!_v) goto check_1;
    return _wrap_new_Stem__SWIG_1(self, argc, argv);
  }
check_1:
  
  if (argc == 1) {
    return _wrap_new_Stem__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Stem'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::Stem::Stem(std::string const &)\n"
    "    Xapian::Stem::Stem(Xapian::StemImplementation *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_Stem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stem" "', argument " "1"" of type '" "Xapian::Stem *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Stem___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"Stem___call__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Stem const *)arg1)->operator ()((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Stem___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stem___str__" "', argument " "1"" of type '" "Xapian::Stem const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::Stem const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Stem_get_available_languages(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"Stem_get_available_languages",0,0,0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = Xapian::Stem::get_available_languages();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Stem_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Stem, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Stem_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_TermGenerator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"new_TermGenerator",0,0,0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::TermGenerator *)new Xapian::TermGenerator();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermGenerator, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_TermGenerator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermGenerator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TermGenerator" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_stemmer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_stemmer",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Stem,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_stopper__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_stopper" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_stopper" "', argument " "2"" of type '" "Xapian::Stopper const *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Stopper * >(argp2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_stopper((Xapian::Stopper const *)arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_stopper__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_stopper();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_stopper(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_set_stopper",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_TermGenerator_set_stopper__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_TermGenerator_set_stopper__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'TermGenerator_set_stopper'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::TermGenerator::set_stopper(Xapian::Stopper const *)\n"
    "    Xapian::TermGenerator::set_stopper()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_document",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Document,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_document((Xapian::Document const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_get_document(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::Document *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::Document *) &((Xapian::TermGenerator const *)arg1)->get_document();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_database(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::WritableDatabase *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_database",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__WritableDatabase,  0  | 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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_database((Xapian::WritableDatabase const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_flags__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  Xapian::TermGenerator::flags result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_flags__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::flags arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::TermGenerator::flags result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_flags(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_set_flags",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_TermGenerator_set_flags__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_TermGenerator_set_flags__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'TermGenerator_set_flags'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::TermGenerator::set_flags(Xapian::TermGenerator::flags,Xapian::TermGenerator::flags)\n"
    "    Xapian::TermGenerator::set_flags(Xapian::TermGenerator::flags)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_stemming_strategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::stem_strategy arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_stemming_strategy",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_stemming_strategy(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_index_text__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->index_text((std::string const &)*arg2,arg3,(std::string const &)*arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_index_text__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->index_text((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_index_text__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->index_text((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_index_text(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_index_text",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_TermGenerator_index_text__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_TermGenerator_index_text__SWIG_1(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_TermGenerator_index_text__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'TermGenerator_index_text'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::TermGenerator::index_text(std::string const &,Xapian::termcount,std::string const &)\n"
    "    Xapian::TermGenerator::index_text(std::string const &,Xapian::termcount)\n"
    "    Xapian::TermGenerator::index_text(std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_TermGenerator_index_text_without_positions__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 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 ;
  
  if ((nobjs < 4) || (nobjs > 4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->index_text_without_positions((std::string const &)*arg2,arg3,(std::string const &)*arg4);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_index_text_without_positions__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->index_text_without_positions((std::string const &)*arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_index_text_without_positions__SWIG_2(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->index_text_without_positions((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_index_text_without_positions(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[5];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_index_text_without_positions",0,4,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_TermGenerator_index_text_without_positions__SWIG_2(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_TermGenerator_index_text_without_positions__SWIG_1(self, argc, argv);
  }
  if (argc == 4) {
    return _wrap_TermGenerator_index_text_without_positions__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'TermGenerator_index_text_without_positions'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::TermGenerator::index_text_without_positions(std::string const &,Xapian::termcount,std::string const &)\n"
    "    Xapian::TermGenerator::index_text_without_positions(std::string const &,Xapian::termcount)\n"
    "    Xapian::TermGenerator::index_text_without_positions(std::string const &)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_TermGenerator_increase_termpos__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_increase_termpos" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->increase_termpos(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_increase_termpos__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->increase_termpos();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_increase_termpos(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[3];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"TermGenerator_increase_termpos",0,2,argv))) SWIG_fail;
  --argc;
  if (argc == 1) {
    return _wrap_TermGenerator_increase_termpos__SWIG_1(self, argc, argv);
  }
  if (argc == 2) {
    return _wrap_TermGenerator_increase_termpos__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'TermGenerator_increase_termpos'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::TermGenerator::increase_termpos(Xapian::termcount)\n"
    "    Xapian::TermGenerator::increase_termpos()\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_TermGenerator_get_termpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  Xapian::termcount result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::termcount)((Xapian::TermGenerator const *)arg1)->get_termpos();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator_set_termpos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"TermGenerator_set_termpos",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_set_termpos" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_termpos(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermGenerator___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  std::string result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator___str__" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = ((Xapian::TermGenerator const *)arg1)->get_description();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *TermGenerator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__TermGenerator, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *TermGenerator_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_KeyMaker___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"KeyMaker___call__",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KeyMaker___call__" "', argument " "1"" of type '" "Xapian::KeyMaker const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Xapian__Document,  0  | 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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          Swig::DirectorPureVirtualException::raise("Xapian::KeyMaker::operator ()");
        } else {
          result = ((Xapian::KeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_KeyMaker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__KeyMaker, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KeyMaker" "', argument " "1"" of type '" "Xapian::KeyMaker *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_KeyMaker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::KeyMaker *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::KeyMaker *)new SwigDirector_KeyMaker(arg1); 
        } else {
          SWIG_SetErrorMsg(PyExc_RuntimeError,"accessing abstract class or protected constructor"); 
          SWIG_fail;
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__KeyMaker, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_KeyMaker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_KeyMaker" "', argument " "1"" of type '" "Xapian::KeyMaker *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *KeyMaker_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__KeyMaker, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *KeyMaker_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_MultiValueKeyMaker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MultiValueKeyMaker *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"new_MultiValueKeyMaker",0,0,0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::MultiValueKeyMaker *)new Xapian::MultiValueKeyMaker();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MultiValueKeyMaker, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultiValueKeyMaker_add_value__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_value(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultiValueKeyMaker_add_value__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_value(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultiValueKeyMaker_add_value(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"MultiValueKeyMaker_add_value",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_MultiValueKeyMaker_add_value__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_MultiValueKeyMaker_add_value__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiValueKeyMaker_add_value'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::MultiValueKeyMaker::add_value(Xapian::valueno,bool)\n"
    "    Xapian::MultiValueKeyMaker::add_value(Xapian::valueno)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_MultiValueKeyMaker(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiValueKeyMaker" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *MultiValueKeyMaker_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__MultiValueKeyMaker, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *MultiValueKeyMaker_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_Sorter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Sorter *arg1 = (Xapian::Sorter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Sorter, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Sorter" "', argument " "1"" of type '" "Xapian::Sorter *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Sorter * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Sorter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Sorter, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_MultiValueSorter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MultiValueSorter *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"new_MultiValueSorter",0,0,0)) SWIG_fail;
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::MultiValueSorter *)new Xapian::MultiValueSorter();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MultiValueSorter, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultiValueSorter_add__SWIG_0(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueSorter_add" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiValueSorter_add" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiValueSorter_add" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add(arg2,arg3);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultiValueSorter_add__SWIG_1(PyObject *SWIGUNUSEDPARM(self), int nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueSorter_add" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiValueSorter_add" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MultiValueSorter_add(PyObject *self, PyObject *args) {
  int argc;
  PyObject *argv[4];
  
  if (!(argc = SWIG_Python_UnpackTuple(args,"MultiValueSorter_add",0,3,argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    return _wrap_MultiValueSorter_add__SWIG_1(self, argc, argv);
  }
  if (argc == 3) {
    return _wrap_MultiValueSorter_add__SWIG_0(self, argc, argv);
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MultiValueSorter_add'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    Xapian::MultiValueSorter::add(Xapian::valueno,bool)\n"
    "    Xapian::MultiValueSorter::add(Xapian::valueno)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_MultiValueSorter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiValueSorter" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *MultiValueSorter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__MultiValueSorter, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *MultiValueSorter_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_ValueSetMatchDecider(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::valueno arg1 ;
  bool arg2 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  Xapian::ValueSetMatchDecider *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args,"new_ValueSetMatchDecider",2,2,swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        result = (Xapian::ValueSetMatchDecider *)new Xapian::ValueSetMatchDecider(arg1,arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueSetMatchDecider, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueSetMatchDecider_add_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueSetMatchDecider_add_value",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_value((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_ValueSetMatchDecider_remove_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"ValueSetMatchDecider_remove_value",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->remove_value((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ValueSetMatchDecider(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueSetMatchDecider" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *ValueSetMatchDecider_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__ValueSetMatchDecider, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *ValueSetMatchDecider_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_new_Compactor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  Xapian::Compactor *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        if ( arg1 != Py_None ) {
          /* subclassed */
          result = (Xapian::Compactor *)new SwigDirector_Compactor(arg1); 
        } else {
          result = (Xapian::Compactor *)new Xapian::Compactor(); 
        }
        
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Compactor, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Compactor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Compactor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Compactor" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
  {
    try {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        delete arg1;
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_set_block_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Compactor_set_block_size",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_block_size(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_set_renumber(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Compactor_set_renumber",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_renumber(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_set_multipass(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Compactor_set_multipass",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_multipass(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_set_compaction_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  Xapian::Compactor::compaction_level arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Compactor_set_compaction_level",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_compaction_level(arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_set_destdir(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Compactor_set_destdir",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->set_destdir((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_add_source(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args,"Compactor_add_source",2,2,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->add_source((std::string const &)*arg2);
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_compact(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[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 {
      {
        SWIG_PYTHON_THREAD_BEGIN_ALLOW;
        (arg1)->compact();
        SWIG_PYTHON_THREAD_END_ALLOW;
      }
    } catch (...) {
      Xapian::SetPythonException();
      SWIG_fail;
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_set_status(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  PyObject *swig_obj[3] ;
  Swig::Director *director = 0;
  bool upcall = false;
  
  if (!SWIG_Python_UnpackTuple(args,"Compactor_set_status",3,3,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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;
  }
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          (arg1)->Xapian::Compactor::set_status((std::string const &)*arg2,(std::string const &)*arg3);
        } else {
          (arg1)->set_status((std::string const &)*arg2,(std::string const &)*arg3);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_Py_Void();
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Compactor_resolve_duplicate_metadata(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  std::string *arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  size_t val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  Swig::Director *director = 0;
  bool upcall = false;
  std::string result;
  
  if (!SWIG_Python_UnpackTuple(args,"Compactor_resolve_duplicate_metadata",4,4,swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[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 = XapianSWIG_anystring_as_ptr(&(swig_obj[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_obj[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(swig_obj[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);
  director = SWIG_DIRECTOR_CAST(arg1);
  upcall = (director && (director->swig_get_self()==swig_obj[0]));
  try {
    {
      try {
        if (upcall) {
          result = (arg1)->Xapian::Compactor::resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
        } else {
          result = (arg1)->resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
        }
      } catch (...) {
        Xapian::SetPythonException();
        SWIG_fail;
      }
    }
  } catch (Swig::DirectorException&) {
    SWIG_fail;
  }
  resultobj = SWIG_From_std_string(static_cast< std::string >(result));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return resultobj;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_disown_Compactor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "disown_Compactor" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
  {
    SWIG_PYTHON_THREAD_BEGIN_ALLOW;
    {
      Swig::Director *director = SWIG_DIRECTOR_CAST(arg1);
      if (director) director->swig_disown();
    }
    
    SWIG_PYTHON_THREAD_END_ALLOW;
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Compactor_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args,(char*)"swigregister", 1, 1,&obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_Xapian__Compactor, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Compactor_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

static PyMethodDef SwigMethods[] = {
	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
	 { (char *)"delete_SwigPyIterator", (PyCFunction)_wrap_delete_SwigPyIterator, METH_O, NULL},
	 { (char *)"SwigPyIterator_value", (PyCFunction)_wrap_SwigPyIterator_value, METH_O, NULL},
	 { (char *)"SwigPyIterator_incr", _wrap_SwigPyIterator_incr, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator_decr", _wrap_SwigPyIterator_decr, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator_distance", _wrap_SwigPyIterator_distance, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator_equal", _wrap_SwigPyIterator_equal, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator_copy", (PyCFunction)_wrap_SwigPyIterator_copy, METH_O, NULL},
	 { (char *)"SwigPyIterator_next", (PyCFunction)_wrap_SwigPyIterator_next, METH_O, NULL},
	 { (char *)"SwigPyIterator___next__", (PyCFunction)_wrap_SwigPyIterator___next__, METH_O, NULL},
	 { (char *)"SwigPyIterator_previous", (PyCFunction)_wrap_SwigPyIterator_previous, METH_O, NULL},
	 { (char *)"SwigPyIterator_advance", _wrap_SwigPyIterator_advance, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator___eq__", _wrap_SwigPyIterator___eq__, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator___ne__", _wrap_SwigPyIterator___ne__, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator___iadd__", _wrap_SwigPyIterator___iadd__, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator___isub__", _wrap_SwigPyIterator___isub__, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator___add__", _wrap_SwigPyIterator___add__, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator___sub__", _wrap_SwigPyIterator___sub__, METH_VARARGS, NULL},
	 { (char *)"SwigPyIterator_swigregister", SwigPyIterator_swigregister, METH_VARARGS, NULL},
	 { (char *)"Error_get_type", (PyCFunction)_wrap_Error_get_type, METH_O, (char *)"\n"
		"The type of this error (e.g. \"DocNotFoundError\".).\n"
		"\n"
		"const char* Xapian::Error::get_type() const \n"
		""},
	 { (char *)"Error_get_msg", (PyCFunction)_wrap_Error_get_msg, METH_O, (char *)"\n"
		"Message giving details of the error, intended for human consumption.\n"
		"\n"
		"const std::string& Xapian::Error::get_msg() const \n"
		""},
	 { (char *)"Error_get_context", (PyCFunction)_wrap_Error_get_context, METH_O, (char *)"\n"
		"Optional context information.\n"
		"\n"
		"const std::string& Xapian::Error::get_context() const\n"
		"\n"
		"This context is intended for use by Xapian::ErrorHandler (for example\n"
		"so it can know which remote server is unreliable and report the\n"
		"problem and remove that server from those being searched). But it's\n"
		"typically a plain-text string, and so also fit for human consumption.\n"
		"\n"
		""},
	 { (char *)"Error_get_error_string", (PyCFunction)_wrap_Error_get_error_string, METH_O, (char *)"\n"
		"Returns any system error string associated with this exception.\n"
		"\n"
		"const char* Xapian::Error::get_error_string() const\n"
		"\n"
		"The system error string may come from errno, h_errno (on UNIX), or\n"
		"GetLastError() (on MS Windows). If there is no associated system error\n"
		"string, NULL is returned. \n"
		""},
	 { (char *)"Error___str__", (PyCFunction)_wrap_Error___str__, METH_O, NULL},
	 { (char *)"delete_Error", (PyCFunction)_wrap_delete_Error, METH_O, NULL},
	 { (char *)"Error_swigregister", Error_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_LogicError", (PyCFunction)_wrap_delete_LogicError, METH_O, NULL},
	 { (char *)"LogicError_swigregister", LogicError_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_RuntimeError", (PyCFunction)_wrap_delete_RuntimeError, METH_O, NULL},
	 { (char *)"RuntimeError_swigregister", RuntimeError_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_AssertionError", _wrap_new_AssertionError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::AssertionError::AssertionError(const std::string &msg_, int\n"
		"errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_AssertionError", (PyCFunction)_wrap_delete_AssertionError, METH_O, NULL},
	 { (char *)"AssertionError_swigregister", AssertionError_swigregister, METH_VARARGS, NULL},
	 { (char *)"AssertionError_swiginit", AssertionError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_InvalidArgumentError", _wrap_new_InvalidArgumentError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::InvalidArgumentError::InvalidArgumentError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_InvalidArgumentError", (PyCFunction)_wrap_delete_InvalidArgumentError, METH_O, NULL},
	 { (char *)"InvalidArgumentError_swigregister", InvalidArgumentError_swigregister, METH_VARARGS, NULL},
	 { (char *)"InvalidArgumentError_swiginit", InvalidArgumentError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_InvalidOperationError", _wrap_new_InvalidOperationError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::InvalidOperationError::InvalidOperationError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_InvalidOperationError", (PyCFunction)_wrap_delete_InvalidOperationError, METH_O, NULL},
	 { (char *)"InvalidOperationError_swigregister", InvalidOperationError_swigregister, METH_VARARGS, NULL},
	 { (char *)"InvalidOperationError_swiginit", InvalidOperationError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_UnimplementedError", _wrap_new_UnimplementedError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::UnimplementedError::UnimplementedError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_UnimplementedError", (PyCFunction)_wrap_delete_UnimplementedError, METH_O, NULL},
	 { (char *)"UnimplementedError_swigregister", UnimplementedError_swigregister, METH_VARARGS, NULL},
	 { (char *)"UnimplementedError_swiginit", UnimplementedError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DatabaseError", _wrap_new_DatabaseError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::DatabaseError::DatabaseError(const std::string &msg_, int\n"
		"errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_DatabaseError", (PyCFunction)_wrap_delete_DatabaseError, METH_O, NULL},
	 { (char *)"DatabaseError_swigregister", DatabaseError_swigregister, METH_VARARGS, NULL},
	 { (char *)"DatabaseError_swiginit", DatabaseError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DatabaseCorruptError", _wrap_new_DatabaseCorruptError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::DatabaseCorruptError::DatabaseCorruptError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_DatabaseCorruptError", (PyCFunction)_wrap_delete_DatabaseCorruptError, METH_O, NULL},
	 { (char *)"DatabaseCorruptError_swigregister", DatabaseCorruptError_swigregister, METH_VARARGS, NULL},
	 { (char *)"DatabaseCorruptError_swiginit", DatabaseCorruptError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DatabaseCreateError", _wrap_new_DatabaseCreateError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::DatabaseCreateError::DatabaseCreateError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_DatabaseCreateError", (PyCFunction)_wrap_delete_DatabaseCreateError, METH_O, NULL},
	 { (char *)"DatabaseCreateError_swigregister", DatabaseCreateError_swigregister, METH_VARARGS, NULL},
	 { (char *)"DatabaseCreateError_swiginit", DatabaseCreateError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DatabaseLockError", _wrap_new_DatabaseLockError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::DatabaseLockError::DatabaseLockError(const std::string &msg_,\n"
		"int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_DatabaseLockError", (PyCFunction)_wrap_delete_DatabaseLockError, METH_O, NULL},
	 { (char *)"DatabaseLockError_swigregister", DatabaseLockError_swigregister, METH_VARARGS, NULL},
	 { (char *)"DatabaseLockError_swiginit", DatabaseLockError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DatabaseModifiedError", _wrap_new_DatabaseModifiedError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::DatabaseModifiedError::DatabaseModifiedError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_DatabaseModifiedError", (PyCFunction)_wrap_delete_DatabaseModifiedError, METH_O, NULL},
	 { (char *)"DatabaseModifiedError_swigregister", DatabaseModifiedError_swigregister, METH_VARARGS, NULL},
	 { (char *)"DatabaseModifiedError_swiginit", DatabaseModifiedError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DatabaseOpeningError", _wrap_new_DatabaseOpeningError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::DatabaseOpeningError::DatabaseOpeningError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_DatabaseOpeningError", (PyCFunction)_wrap_delete_DatabaseOpeningError, METH_O, NULL},
	 { (char *)"DatabaseOpeningError_swigregister", DatabaseOpeningError_swigregister, METH_VARARGS, NULL},
	 { (char *)"DatabaseOpeningError_swiginit", DatabaseOpeningError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DatabaseVersionError", _wrap_new_DatabaseVersionError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::DatabaseVersionError::DatabaseVersionError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_DatabaseVersionError", (PyCFunction)_wrap_delete_DatabaseVersionError, METH_O, NULL},
	 { (char *)"DatabaseVersionError_swigregister", DatabaseVersionError_swigregister, METH_VARARGS, NULL},
	 { (char *)"DatabaseVersionError_swiginit", DatabaseVersionError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DocNotFoundError", _wrap_new_DocNotFoundError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::DocNotFoundError::DocNotFoundError(const std::string &msg_,\n"
		"int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_DocNotFoundError", (PyCFunction)_wrap_delete_DocNotFoundError, METH_O, NULL},
	 { (char *)"DocNotFoundError_swigregister", DocNotFoundError_swigregister, METH_VARARGS, NULL},
	 { (char *)"DocNotFoundError_swiginit", DocNotFoundError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_FeatureUnavailableError", _wrap_new_FeatureUnavailableError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::FeatureUnavailableError::FeatureUnavailableError(const\n"
		"std::string &msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_FeatureUnavailableError", (PyCFunction)_wrap_delete_FeatureUnavailableError, METH_O, NULL},
	 { (char *)"FeatureUnavailableError_swigregister", FeatureUnavailableError_swigregister, METH_VARARGS, NULL},
	 { (char *)"FeatureUnavailableError_swiginit", FeatureUnavailableError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_InternalError", _wrap_new_InternalError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::InternalError::InternalError(const std::string &msg_, int\n"
		"errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_InternalError", (PyCFunction)_wrap_delete_InternalError, METH_O, NULL},
	 { (char *)"InternalError_swigregister", InternalError_swigregister, METH_VARARGS, NULL},
	 { (char *)"InternalError_swiginit", InternalError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_NetworkError", _wrap_new_NetworkError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::NetworkError::NetworkError(const std::string &msg_, int\n"
		"errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_NetworkError", (PyCFunction)_wrap_delete_NetworkError, METH_O, NULL},
	 { (char *)"NetworkError_swigregister", NetworkError_swigregister, METH_VARARGS, NULL},
	 { (char *)"NetworkError_swiginit", NetworkError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_NetworkTimeoutError", _wrap_new_NetworkTimeoutError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::NetworkTimeoutError::NetworkTimeoutError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_NetworkTimeoutError", (PyCFunction)_wrap_delete_NetworkTimeoutError, METH_O, NULL},
	 { (char *)"NetworkTimeoutError_swigregister", NetworkTimeoutError_swigregister, METH_VARARGS, NULL},
	 { (char *)"NetworkTimeoutError_swiginit", NetworkTimeoutError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_QueryParserError", _wrap_new_QueryParserError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::QueryParserError::QueryParserError(const std::string &msg_,\n"
		"int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_QueryParserError", (PyCFunction)_wrap_delete_QueryParserError, METH_O, NULL},
	 { (char *)"QueryParserError_swigregister", QueryParserError_swigregister, METH_VARARGS, NULL},
	 { (char *)"QueryParserError_swiginit", QueryParserError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_SerialisationError", _wrap_new_SerialisationError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::SerialisationError::SerialisationError(const std::string\n"
		"&msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_SerialisationError", (PyCFunction)_wrap_delete_SerialisationError, METH_O, NULL},
	 { (char *)"SerialisationError_swigregister", SerialisationError_swigregister, METH_VARARGS, NULL},
	 { (char *)"SerialisationError_swiginit", SerialisationError_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_RangeError", _wrap_new_RangeError, METH_VARARGS, (char *)"\n"
		"Construct from message and errno value.\n"
		"\n"
		"Xapian::RangeError::RangeError(const std::string &msg_, int errno_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"msg_:  Message giving details of the error, intended for human\n"
		"consumption.\n"
		"\n"
		"errno_:  Optional errno value associated with this error. \n"
		""},
	 { (char *)"delete_RangeError", (PyCFunction)_wrap_delete_RangeError, METH_O, NULL},
	 { (char *)"RangeError_swigregister", RangeError_swigregister, METH_VARARGS, NULL},
	 { (char *)"RangeError_swiginit", RangeError_swiginit, METH_VARARGS, NULL},
	 { (char *)"version_string", (PyCFunction)_wrap_version_string, METH_NOARGS, NULL},
	 { (char *)"major_version", (PyCFunction)_wrap_major_version, METH_NOARGS, NULL},
	 { (char *)"minor_version", (PyCFunction)_wrap_minor_version, METH_NOARGS, NULL},
	 { (char *)"revision", (PyCFunction)_wrap_revision, METH_NOARGS, NULL},
	 { (char *)"new_PositionIterator", _wrap_new_PositionIterator, METH_VARARGS, (char *)"\n"
		"Copying is allowed.\n"
		"\n"
		"Xapian::PositionIterator::PositionIterator(const PositionIterator &o)\n"
		"\n"
		"The internals are reference counted, so copying is also cheap. \n"
		""},
	 { (char *)"delete_PositionIterator", (PyCFunction)_wrap_delete_PositionIterator, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::PositionIterator::~PositionIterator() \n"
		""},
	 { (char *)"PositionIterator_get_termpos", (PyCFunction)_wrap_PositionIterator_get_termpos, METH_O, NULL},
	 { (char *)"PositionIterator_next", (PyCFunction)_wrap_PositionIterator_next, METH_O, NULL},
	 { (char *)"PositionIterator_equals", _wrap_PositionIterator_equals, METH_VARARGS, NULL},
	 { (char *)"PositionIterator_skip_to", _wrap_PositionIterator_skip_to, METH_VARARGS, (char *)"\n"
		"Advance the iterator to the specified termpos.\n"
		"\n"
		"void Xapian::PositionIterator::skip_to(Xapian::termpos pos)\n"
		"\n"
		"If the specified termpos isn't in the list, position ourselves on the\n"
		"first termpos after it (or at_end() if no greater term positions are\n"
		"present). \n"
		""},
	 { (char *)"PositionIterator___str__", (PyCFunction)_wrap_PositionIterator___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::PositionIterator::get_description() const \n"
		""},
	 { (char *)"PositionIterator___eq__", _wrap_PositionIterator___eq__, METH_VARARGS, NULL},
	 { (char *)"PositionIterator___ne__", _wrap_PositionIterator___ne__, METH_VARARGS, NULL},
	 { (char *)"PositionIterator_swigregister", PositionIterator_swigregister, METH_VARARGS, NULL},
	 { (char *)"PositionIterator_swiginit", PositionIterator_swiginit, METH_VARARGS, NULL},
	 { (char *)"delete_PostingIterator", (PyCFunction)_wrap_delete_PostingIterator, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::PostingIterator::~PostingIterator() \n"
		""},
	 { (char *)"new_PostingIterator", _wrap_new_PostingIterator, METH_VARARGS, (char *)"\n"
		"Copying is allowed.\n"
		"\n"
		"Xapian::PostingIterator::PostingIterator(const PostingIterator &other)\n"
		"\n"
		"The internals are reference counted, so copying is also cheap. \n"
		""},
	 { (char *)"PostingIterator_skip_to", _wrap_PostingIterator_skip_to, METH_VARARGS, (char *)"\n"
		"Advance the iterator to the specified docid.\n"
		"\n"
		"void Xapian::PostingIterator::skip_to(Xapian::docid did)\n"
		"\n"
		"If the specified docid isn't in the list, position ourselves on the\n"
		"first document after it (or at_end() if no greater docids are\n"
		"present). \n"
		""},
	 { (char *)"PostingIterator_get_doclength", (PyCFunction)_wrap_PostingIterator_get_doclength, METH_O, (char *)"\n"
		"Get the length of the document at the current position in the\n"
		"postlist.\n"
		"\n"
		"Xapian::termcount Xapian::PostingIterator::get_doclength() const\n"
		"\n"
		"This information may be stored in the postlist, in which case this\n"
		"lookup should be extremely fast (indeed, not require further disk\n"
		"access). If the information is not present in the postlist, it will be\n"
		"retrieved from the database, at a greater performance cost. \n"
		""},
	 { (char *)"PostingIterator_get_wdf", (PyCFunction)_wrap_PostingIterator_get_wdf, METH_O, (char *)"\n"
		"Get the within document frequency of the document at the current\n"
		"position in the postlist.\n"
		"\n"
		"Xapian::termcount Xapian::PostingIterator::get_wdf() const \n"
		""},
	 { (char *)"PostingIterator_positionlist_begin", (PyCFunction)_wrap_PostingIterator_positionlist_begin, METH_O, (char *)"\n"
		"Return PositionIterator pointing to start of positionlist for current\n"
		"document.\n"
		"\n"
		"PositionIterator Xapian::PostingIterator::positionlist_begin() const\n"
		"\n"
		""},
	 { (char *)"PostingIterator_positionlist_end", (PyCFunction)_wrap_PostingIterator_positionlist_end, METH_O, (char *)"\n"
		"Return PositionIterator pointing to end of positionlist for current\n"
		"document.\n"
		"\n"
		"PositionIterator Xapian::PostingIterator::positionlist_end() const \n"
		""},
	 { (char *)"PostingIterator___str__", (PyCFunction)_wrap_PostingIterator___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::PostingIterator::get_description() const \n"
		""},
	 { (char *)"PostingIterator___eq__", _wrap_PostingIterator___eq__, METH_VARARGS, NULL},
	 { (char *)"PostingIterator___ne__", _wrap_PostingIterator___ne__, METH_VARARGS, NULL},
	 { (char *)"PostingIterator_get_docid", (PyCFunction)_wrap_PostingIterator_get_docid, METH_O, NULL},
	 { (char *)"PostingIterator_next", (PyCFunction)_wrap_PostingIterator_next, METH_O, NULL},
	 { (char *)"PostingIterator_equals", _wrap_PostingIterator_equals, METH_VARARGS, NULL},
	 { (char *)"PostingIterator_swigregister", PostingIterator_swigregister, METH_VARARGS, NULL},
	 { (char *)"PostingIterator_swiginit", PostingIterator_swiginit, METH_VARARGS, NULL},
	 { (char *)"__eq__", _wrap___eq__, METH_VARARGS, NULL},
	 { (char *)"__ne__", _wrap___ne__, METH_VARARGS, NULL},
	 { (char *)"new_TermIterator", _wrap_new_TermIterator, METH_VARARGS, (char *)"\n"
		"Copying is allowed.\n"
		"\n"
		"Xapian::TermIterator::TermIterator(const TermIterator &other)\n"
		"\n"
		"The internals are reference counted, so copying is also cheap. \n"
		""},
	 { (char *)"delete_TermIterator", (PyCFunction)_wrap_delete_TermIterator, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::TermIterator::~TermIterator() \n"
		""},
	 { (char *)"TermIterator_get_term", (PyCFunction)_wrap_TermIterator_get_term, METH_O, NULL},
	 { (char *)"TermIterator_next", (PyCFunction)_wrap_TermIterator_next, METH_O, NULL},
	 { (char *)"TermIterator_equals", _wrap_TermIterator_equals, METH_VARARGS, NULL},
	 { (char *)"TermIterator_skip_to", _wrap_TermIterator_skip_to, METH_VARARGS, (char *)"\n"
		"Advance the iterator to the specified term.\n"
		"\n"
		"void Xapian::TermIterator::skip_to(const std::string &tname)\n"
		"\n"
		"If the specified term isn't in the list, position ourselves on the\n"
		"first term after it (or at_end() if no greater terms are present). \n"
		""},
	 { (char *)"TermIterator_get_wdf", (PyCFunction)_wrap_TermIterator_get_wdf, METH_O, (char *)"\n"
		"Return the wdf of the current term (if meaningful).\n"
		"\n"
		"Xapian::termcount Xapian::TermIterator::get_wdf() const\n"
		"\n"
		"The wdf (within document frequency) is the number of occurrences of a\n"
		"term in a particular document. \n"
		""},
	 { (char *)"TermIterator_get_termfreq", (PyCFunction)_wrap_TermIterator_get_termfreq, METH_O, (char *)"\n"
		"Return the term frequency of the current term (if meaningful).\n"
		"\n"
		"Xapian::doccount Xapian::TermIterator::get_termfreq() const\n"
		"\n"
		"The term frequency is the number of documents which a term indexes. \n"
		""},
	 { (char *)"TermIterator_positionlist_count", (PyCFunction)_wrap_TermIterator_positionlist_count, METH_O, (char *)"\n"
		"Return length of positionlist for current term.\n"
		"\n"
		"Xapian::termcount Xapian::TermIterator::positionlist_count() const \n"
		""},
	 { (char *)"TermIterator_positionlist_begin", (PyCFunction)_wrap_TermIterator_positionlist_begin, METH_O, (char *)"\n"
		"Return PositionIterator pointing to start of positionlist for current\n"
		"term.\n"
		"\n"
		"PositionIterator Xapian::TermIterator::positionlist_begin() const \n"
		""},
	 { (char *)"TermIterator_positionlist_end", (PyCFunction)_wrap_TermIterator_positionlist_end, METH_O, (char *)"\n"
		"Return PositionIterator pointing to end of positionlist for current\n"
		"term.\n"
		"\n"
		"PositionIterator Xapian::TermIterator::positionlist_end() const \n"
		""},
	 { (char *)"TermIterator___str__", (PyCFunction)_wrap_TermIterator___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::TermIterator::get_description() const \n"
		""},
	 { (char *)"TermIterator___eq__", _wrap_TermIterator___eq__, METH_VARARGS, NULL},
	 { (char *)"TermIterator___ne__", _wrap_TermIterator___ne__, METH_VARARGS, NULL},
	 { (char *)"TermIterator_swigregister", TermIterator_swigregister, METH_VARARGS, NULL},
	 { (char *)"TermIterator_swiginit", TermIterator_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_ValueIterator", _wrap_new_ValueIterator, METH_VARARGS, (char *)"\n"
		"Default constructor.\n"
		"\n"
		"Xapian::ValueIterator::ValueIterator()\n"
		"\n"
		"Creates an uninitialised iterator, which can't be used before being\n"
		"assigned to, but is sometimes syntactically convenient. \n"
		""},
	 { (char *)"delete_ValueIterator", (PyCFunction)_wrap_delete_ValueIterator, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::ValueIterator::~ValueIterator() \n"
		""},
	 { (char *)"ValueIterator_get_value", (PyCFunction)_wrap_ValueIterator_get_value, METH_O, NULL},
	 { (char *)"ValueIterator_next", (PyCFunction)_wrap_ValueIterator_next, METH_O, NULL},
	 { (char *)"ValueIterator_equals", _wrap_ValueIterator_equals, METH_VARARGS, NULL},
	 { (char *)"ValueIterator_get_docid", (PyCFunction)_wrap_ValueIterator_get_docid, METH_O, (char *)"\n"
		"Return the docid at the current position.\n"
		"\n"
		"Xapian::docid Xapian::ValueIterator::get_docid() const\n"
		"\n"
		"If we're iterating over values of a document, this method will throw\n"
		"Xapian::InvalidOperationError. \n"
		""},
	 { (char *)"ValueIterator_get_valueno", (PyCFunction)_wrap_ValueIterator_get_valueno, METH_O, (char *)"\n"
		"Return the value slot number for the current position.\n"
		"\n"
		"Xapian::valueno Xapian::ValueIterator::get_valueno() const\n"
		"\n"
		"If the iterator is over all values in a slot, this returns that slot's\n"
		"number. If the iterator is over the values in a particular document,\n"
		"it returns the number of each slot in turn. \n"
		""},
	 { (char *)"ValueIterator_skip_to", _wrap_ValueIterator_skip_to, METH_VARARGS, (char *)"\n"
		"Advance the iterator to document id or value slot docid_or_slot.\n"
		"\n"
		"void Xapian::ValueIterator::skip_to(Xapian::docid docid_or_slot)\n"
		"\n"
		"If this iterator is over values in a document, then this method\n"
		"advances the iterator to value slot docid_or_slot, or the first slot\n"
		"after it if there is no value in slot slot.\n"
		"\n"
		"If this iterator is over values in a particular slot, then this method\n"
		"advances the iterator to document id docid_or_slot, or the first\n"
		"document id after it if there is no value in the slot we're iterating\n"
		"over for document docid_or_slot.\n"
		"\n"
		"Note: The \"two-faced\" nature of this method is due to how C++\n"
		"overloading works. Xapian::docid and Xapian::valueno are both typedefs\n"
		"for the same unsigned integer type, so overloading can't distinguish\n"
		"them.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"docid_or_slot:  The docid/slot to advance to. \n"
		""},
	 { (char *)"ValueIterator_check", _wrap_ValueIterator_check, METH_VARARGS, (char *)"\n"
		"Check if the specified docid occurs.\n"
		"\n"
		"bool Xapian::ValueIterator::check(Xapian::docid docid)\n"
		"\n"
		"The caller is required to ensure that the specified document id did\n"
		"actually exists in the database.\n"
		"\n"
		"This method acts like skip_to() if that can be done at little extra\n"
		"cost, in which case it then returns true. This is how brass and chert\n"
		"databases behave because they store values in streams which allow for\n"
		"an efficient implementation of skip_to().\n"
		"\n"
		"Otherwise it simply checks if a particular docid is present. If it is,\n"
		"it returns true. If it isn't, it returns false, and leaves the\n"
		"position unspecified (and hence the result of calling methods which\n"
		"depends on the current position, such as get_docid(), are also\n"
		"unspecified). In this state, next() will advance to the first matching\n"
		"position after document did, and skip_to() will act as it would if the\n"
		"position was the first matching position after document did.\n"
		"\n"
		"Currently the inmemory, flint, and remote backends behave in the\n"
		"latter way because they don't support streamed values and so skip_to()\n"
		"must check each document it skips over which is significantly slower.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"docid:  The document id to check. \n"
		""},
	 { (char *)"ValueIterator___str__", (PyCFunction)_wrap_ValueIterator___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::ValueIterator::get_description() const \n"
		""},
	 { (char *)"ValueIterator___eq__", _wrap_ValueIterator___eq__, METH_VARARGS, NULL},
	 { (char *)"ValueIterator___ne__", _wrap_ValueIterator___ne__, METH_VARARGS, NULL},
	 { (char *)"ValueIterator_swigregister", ValueIterator_swigregister, METH_VARARGS, NULL},
	 { (char *)"ValueIterator_swiginit", ValueIterator_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_Document", _wrap_new_Document, METH_VARARGS, (char *)"\n"
		"Make a new empty Document.\n"
		"\n"
		"Xapian::Document::Document() \n"
		""},
	 { (char *)"delete_Document", (PyCFunction)_wrap_delete_Document, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::Document::~Document() \n"
		""},
	 { (char *)"Document_get_value", _wrap_Document_get_value, METH_VARARGS, (char *)"\n"
		"Get value by number.\n"
		"\n"
		"std::string Xapian::Document::get_value(Xapian::valueno slot) const\n"
		"\n"
		"Returns an empty string if no value with the given number is present\n"
		"in the document.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot:  The number of the value. \n"
		""},
	 { (char *)"Document_add_value", _wrap_Document_add_value, METH_VARARGS, (char *)"\n"
		"Add a new value.\n"
		"\n"
		"void Xapian::Document::add_value(Xapian::valueno slot, const\n"
		"std::string &value)\n"
		"\n"
		"The new value will replace any existing value with the same number (or\n"
		"if the new value is empty, it will remove any existing value with the\n"
		"same number).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot:  The value slot to add the value in.\n"
		"\n"
		"value:  The value to set. \n"
		""},
	 { (char *)"Document_remove_value", _wrap_Document_remove_value, METH_VARARGS, (char *)"\n"
		"Remove any value with the given number.\n"
		"\n"
		"void Xapian::Document::remove_value(Xapian::valueno slot) \n"
		""},
	 { (char *)"Document_clear_values", (PyCFunction)_wrap_Document_clear_values, METH_O, (char *)"\n"
		"Remove all values associated with the document.\n"
		"\n"
		"void Xapian::Document::clear_values() \n"
		""},
	 { (char *)"Document_get_data", (PyCFunction)_wrap_Document_get_data, METH_O, (char *)"\n"
		"Get data stored in the document.\n"
		"\n"
		"std::string Xapian::Document::get_data() const\n"
		"\n"
		"This is potentially a relatively expensive operation, and shouldn't\n"
		"normally be used during the match (e.g. in a PostingSource or match\n"
		"decider functor. Put data for use by match deciders in a value\n"
		"instead. \n"
		""},
	 { (char *)"Document_set_data", _wrap_Document_set_data, METH_VARARGS, (char *)"\n"
		"Set data stored in the document.\n"
		"\n"
		"void Xapian::Document::set_data(const std::string &data)\n"
		"\n"
		"Xapian treats the data as an opaque blob. It may try to compress it,\n"
		"but other than that it will just store it and return it when\n"
		"requested.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"data:  The data to store. \n"
		""},
	 { (char *)"Document_add_posting", _wrap_Document_add_posting, METH_VARARGS, (char *)"\n"
		"Add an occurrence of a term at a particular position.\n"
		"\n"
		"void Xapian::Document::add_posting(const std::string &tname,\n"
		"Xapian::termpos tpos, Xapian::termcount wdfinc=1)\n"
		"\n"
		"Multiple occurrences of the term at the same position are represented\n"
		"only once in the positional information, but do increase the wdf.\n"
		"\n"
		"If the term is not already in the document, it will be added to it.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The name of the term.\n"
		"\n"
		"tpos:  The position of the term.\n"
		"\n"
		"wdfinc:  The increment that will be applied to the wdf for this term.\n"
		"\n"
		""},
	 { (char *)"Document_add_term", _wrap_Document_add_term, METH_VARARGS, (char *)"\n"
		"Add a term to the document, without positional information.\n"
		"\n"
		"void Xapian::Document::add_term(const std::string &tname,\n"
		"Xapian::termcount wdfinc=1)\n"
		"\n"
		"Any existing positional information for the term will be left\n"
		"unmodified.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The name of the term.\n"
		"\n"
		"wdfinc:  The increment that will be applied to the wdf for this term\n"
		"(default: 1). \n"
		""},
	 { (char *)"Document_add_boolean_term", _wrap_Document_add_boolean_term, METH_VARARGS, (char *)"\n"
		"Add a boolean filter term to the document.\n"
		"\n"
		"void Xapian::Document::add_boolean_term(const std::string &term)\n"
		"\n"
		"This method adds term to the document with wdf of 0 - this is\n"
		"generally what you want for a term used for boolean filtering as the\n"
		"wdf of such terms is ignored, and it doesn't make sense for them to\n"
		"contribute to the document's length.\n"
		"\n"
		"If the specified term already indexes this document, this method has\n"
		"no effect.\n"
		"\n"
		"It is exactly the same as add_term(term, 0).\n"
		"\n"
		"This method was added in Xapian 1.0.18.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"term:  The term to add. \n"
		""},
	 { (char *)"Document_remove_posting", _wrap_Document_remove_posting, METH_VARARGS, (char *)"\n"
		"Remove a posting of a term from the document.\n"
		"\n"
		"void Xapian::Document::remove_posting(const std::string &tname,\n"
		"Xapian::termpos tpos, Xapian::termcount wdfdec=1)\n"
		"\n"
		"Note that the term will still index the document even if all\n"
		"occurrences are removed. To remove a term from a document completely,\n"
		"use remove_term().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The name of the term.\n"
		"\n"
		"tpos:  The position of the term.\n"
		"\n"
		"wdfdec:  The decrement that will be applied to the wdf when removing\n"
		"this posting. The wdf will not go below the value of 0.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::InvalidArgumentError:  will be thrown if the term is not at\n"
		"the position specified in the position list for this term in this\n"
		"document.\n"
		"\n"
		"Xapian::InvalidArgumentError:  will be thrown if the term is not in\n"
		"the document \n"
		""},
	 { (char *)"Document_remove_term", _wrap_Document_remove_term, METH_VARARGS, (char *)"\n"
		"Remove a term and all postings associated with it.\n"
		"\n"
		"void Xapian::Document::remove_term(const std::string &tname)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The name of the term.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::InvalidArgumentError:  will be thrown if the term is not in\n"
		"the document \n"
		""},
	 { (char *)"Document_clear_terms", (PyCFunction)_wrap_Document_clear_terms, METH_O, (char *)"\n"
		"Remove all terms (and postings) from the document.\n"
		"\n"
		"void Xapian::Document::clear_terms() \n"
		""},
	 { (char *)"Document_termlist_count", (PyCFunction)_wrap_Document_termlist_count, METH_O, (char *)"\n"
		"The length of the termlist - i.e.\n"
		"\n"
		"Xapian::termcount Xapian::Document::termlist_count() const\n"
		"\n"
		"the number of different terms which index this document. \n"
		""},
	 { (char *)"Document_termlist_begin", (PyCFunction)_wrap_Document_termlist_begin, METH_O, (char *)"\n"
		"Iterator for the terms in this document.\n"
		"\n"
		"TermIterator Xapian::Document::termlist_begin() const \n"
		""},
	 { (char *)"Document_termlist_end", (PyCFunction)_wrap_Document_termlist_end, METH_O, (char *)"\n"
		"Equivalent end iterator for termlist_begin().\n"
		"\n"
		"TermIterator Xapian::Document::termlist_end() const \n"
		""},
	 { (char *)"Document_values_count", (PyCFunction)_wrap_Document_values_count, METH_O, (char *)"\n"
		"Count the values in this document.\n"
		"\n"
		"Xapian::termcount Xapian::Document::values_count() const \n"
		""},
	 { (char *)"Document_values_begin", (PyCFunction)_wrap_Document_values_begin, METH_O, (char *)"\n"
		"Iterator for the values in this document.\n"
		"\n"
		"ValueIterator Xapian::Document::values_begin() const \n"
		""},
	 { (char *)"Document_values_end", (PyCFunction)_wrap_Document_values_end, METH_O, (char *)"\n"
		"Equivalent end iterator for values_begin().\n"
		"\n"
		"ValueIteratorEnd_ Xapian::Document::values_end() const \n"
		""},
	 { (char *)"Document_get_docid", (PyCFunction)_wrap_Document_get_docid, METH_O, (char *)"\n"
		"Get the document id which is associated with this document (if any).\n"
		"\n"
		"docid Xapian::Document::get_docid() const\n"
		"\n"
		"NB If multiple databases are being searched together, then this will\n"
		"be the document id in the individual database, not the merged\n"
		"database!\n"
		"\n"
		"If this document came from a database, return the document id in that\n"
		"database. Otherwise, return 0 (in Xapian 1.0.22/1.2.4 or later; prior\n"
		"to this the returned value was uninitialised). \n"
		""},
	 { (char *)"Document_serialise", (PyCFunction)_wrap_Document_serialise, METH_O, (char *)"\n"
		"Serialise document into a string.\n"
		"\n"
		"std::string Xapian::Document::serialise() const\n"
		"\n"
		"The document representation may change between Xapian releases: even\n"
		"between minor versions. However, it is guaranteed not to change if the\n"
		"remote database protocol has not changed between releases. \n"
		""},
	 { (char *)"Document_unserialise", (PyCFunction)_wrap_Document_unserialise, METH_O, NULL},
	 { (char *)"Document___str__", (PyCFunction)_wrap_Document___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::Document::get_description() const \n"
		""},
	 { (char *)"Document_swigregister", Document_swigregister, METH_VARARGS, NULL},
	 { (char *)"Document_swiginit", Document_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_PostingSource", (PyCFunction)_wrap_new_PostingSource, METH_O, NULL},
	 { (char *)"delete_PostingSource", (PyCFunction)_wrap_delete_PostingSource, METH_O, (char *)"\n"
		"virtual\n"
		"Xapian::PostingSource::~PostingSource() \n"
		""},
	 { (char *)"PostingSource_get_termfreq_min", (PyCFunction)_wrap_PostingSource_get_termfreq_min, METH_O, (char *)"\n"
		"A lower bound on the number of documents this object can return.\n"
		"\n"
		"virtual Xapian::doccount Xapian::PostingSource::get_termfreq_min()\n"
		"const =0\n"
		"\n"
		"Xapian will always call init() on a PostingSource before calling this\n"
		"for the first time. \n"
		""},
	 { (char *)"PostingSource_get_termfreq_est", (PyCFunction)_wrap_PostingSource_get_termfreq_est, METH_O, (char *)"\n"
		"An estimate of the number of documents this object can return.\n"
		"\n"
		"virtual Xapian::doccount Xapian::PostingSource::get_termfreq_est()\n"
		"const =0\n"
		"\n"
		"It must always be true that:\n"
		"\n"
		"get_termfreq_min() <= get_termfreq_est() <= get_termfreq_max()\n"
		"\n"
		"Xapian will always call init() on a PostingSource before calling this\n"
		"for the first time. \n"
		""},
	 { (char *)"PostingSource_get_termfreq_max", (PyCFunction)_wrap_PostingSource_get_termfreq_max, METH_O, (char *)"\n"
		"An upper bound on the number of documents this object can return.\n"
		"\n"
		"virtual Xapian::doccount Xapian::PostingSource::get_termfreq_max()\n"
		"const =0\n"
		"\n"
		"Xapian will always call init() on a PostingSource before calling this\n"
		"for the first time. \n"
		""},
	 { (char *)"PostingSource_get_maxweight", (PyCFunction)_wrap_PostingSource_get_maxweight, METH_O, (char *)"\n"
		"Return the currently set upper bound on what get_weight() can return.\n"
		"\n"
		"Xapian::weight Xapian::PostingSource::get_maxweight() const \n"
		""},
	 { (char *)"PostingSource_get_weight", (PyCFunction)_wrap_PostingSource_get_weight, METH_O, (char *)"\n"
		"Return the weight contribution for the current document.\n"
		"\n"
		"virtual Xapian::weight Xapian::PostingSource::get_weight() const\n"
		"\n"
		"This default implementation always returns 0, for convenience when\n"
		"implementing \"weight-less\" PostingSource subclasses.\n"
		"\n"
		"This method may assume that it will only be called when there is a\n"
		"\"current document\". In detail: Xapian will always call init() on a\n"
		"PostingSource before calling this for the first time. It will also\n"
		"only call this if the PostingSource reports that it is pointing to a\n"
		"valid document (ie, it will not call it before calling at least one of\n"
		"next(), skip_to() or check(), and will ensure that the PostingSource\n"
		"is not at the end by calling at_end()). \n"
		""},
	 { (char *)"PostingSource_get_docid", (PyCFunction)_wrap_PostingSource_get_docid, METH_O, (char *)"\n"
		"Return the current docid.\n"
		"\n"
		"virtual Xapian::docid Xapian::PostingSource::get_docid() const =0\n"
		"\n"
		"This method may assume that it will only be called when there is a\n"
		"\"current document\". See  get_weight() for details.\n"
		"\n"
		"Note: in the case of a multi-database search, the returned docid\n"
		"should be in the single subdatabase relevant to this posting source.\n"
		"See the  init() method for details. \n"
		""},
	 { (char *)"PostingSource_next", _wrap_PostingSource_next, METH_VARARGS, (char *)"\n"
		"Advance the current position to the next matching document.\n"
		"\n"
		"virtual void Xapian::PostingSource::next(Xapian::weight min_wt)=0\n"
		"\n"
		"The PostingSource starts before the first entry in the list, so next()\n"
		"must be called before any methods which need the context of the\n"
		"current position.\n"
		"\n"
		"Xapian will always call init() on a PostingSource before calling this\n"
		"for the first time.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"min_wt:  The minimum weight contribution that is needed (this is just\n"
		"a hint which subclasses may ignore). \n"
		""},
	 { (char *)"PostingSource_skip_to", _wrap_PostingSource_skip_to, METH_VARARGS, (char *)"\n"
		"Advance to the specified docid.\n"
		"\n"
		"virtual void Xapian::PostingSource::skip_to(Xapian::docid did,\n"
		"Xapian::weight min_wt)\n"
		"\n"
		"If the specified docid isn't in the list, position ourselves on the\n"
		"first document after it (or at_end() if no greater docids are\n"
		"present).\n"
		"\n"
		"If the current position is already the specified docid, this method\n"
		"will leave the position unmodified.\n"
		"\n"
		"If the specified docid is earlier than the current position, the\n"
		"behaviour is unspecified. A sensible behaviour would be to leave the\n"
		"current position unmodified, but it is also reasonable to move to the\n"
		"specified docid.\n"
		"\n"
		"The default implementation calls next() repeatedly, which works but\n"
		"skip_to() can often be implemented much more efficiently.\n"
		"\n"
		"Xapian will always call init() on a PostingSource before calling this\n"
		"for the first time.\n"
		"\n"
		"Note: in the case of a multi-database search, the docid specified is\n"
		"the docid in the single subdatabase relevant to this posting source.\n"
		"See the  init() method for details.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"did:  The document id to advance to.\n"
		"\n"
		"min_wt:  The minimum weight contribution that is needed (this is just\n"
		"a hint which subclasses may ignore). \n"
		""},
	 { (char *)"PostingSource_check", _wrap_PostingSource_check, METH_VARARGS, (char *)"\n"
		"Check if the specified docid occurs.\n"
		"\n"
		"virtual bool Xapian::PostingSource::check(Xapian::docid did,\n"
		"Xapian::weight min_wt)\n"
		"\n"
		"The caller is required to ensure that the specified document id did\n"
		"actually exists in the database. If it does, it must move to that\n"
		"document id, and return true. If it does not, it may either:\n"
		"\n"
		"return true, having moved to a definite position (including\n"
		"\"at_end\"), which must be the same position as skip_to() would have\n"
		"moved to.\n"
		"\n"
		"or\n"
		"\n"
		"return false, having moved to an \"indeterminate\" position, such that\n"
		"a subsequent call to next() or skip_to() will move to the next\n"
		"matching position after did.\n"
		"\n"
		"Generally, this method should act like skip_to() and return true if\n"
		"that can be done at little extra cost.\n"
		"\n"
		"Otherwise it should simply check if a particular docid is present,\n"
		"returning true if it is, and false if it isn't.\n"
		"\n"
		"The default implementation calls skip_to() and always returns true.\n"
		"\n"
		"Xapian will always call init() on a PostingSource before calling this\n"
		"for the first time.\n"
		"\n"
		"Note: in the case of a multi-database search, the docid specified is\n"
		"the docid in the single subdatabase relevant to this posting source.\n"
		"See the  init() method for details.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"did:  The document id to check.\n"
		"\n"
		"min_wt:  The minimum weight contribution that is needed (this is just\n"
		"a hint which subclasses may ignore). \n"
		""},
	 { (char *)"PostingSource_at_end", (PyCFunction)_wrap_PostingSource_at_end, METH_O, (char *)"\n"
		"Return true if the current position is past the last entry in this\n"
		"list.\n"
		"\n"
		"virtual bool Xapian::PostingSource::at_end() const =0\n"
		"\n"
		"At least one of  next(),  skip_to() or  check() will be called before\n"
		"this method is first called. \n"
		""},
	 { (char *)"PostingSource_name", (PyCFunction)_wrap_PostingSource_name, METH_O, (char *)"\n"
		"Name of the posting source class.\n"
		"\n"
		"virtual std::string Xapian::PostingSource::name() const\n"
		"\n"
		"This is used when serialising and unserialising posting sources; for\n"
		"example, for performing remote searches.\n"
		"\n"
		"If the subclass is in a C++ namespace, the namespace should be\n"
		"included in the name, using \"::\" as a separator. For example, for a\n"
		"PostingSource subclass called \"FooPostingSource\" in the \"Xapian\"\n"
		"namespace the result of this call should be\n"
		"\"Xapian::FooPostingSource\".\n"
		"\n"
		"This should only be implemented if serialise() and unserialise() are\n"
		"also implemented. The default implementation returns an empty string.\n"
		"\n"
		"If this returns an empty string, Xapian will assume that serialise()\n"
		"and unserialise() are not implemented. \n"
		""},
	 { (char *)"PostingSource_init", _wrap_PostingSource_init, METH_VARARGS, (char *)"\n"
		"Set this PostingSource to the start of the list of postings.\n"
		"\n"
		"virtual void Xapian::PostingSource::init(const Database &db)=0\n"
		"\n"
		"This is called automatically by the matcher prior to each query being\n"
		"processed.\n"
		"\n"
		"If a PostingSource is used for multiple searches,  init() will\n"
		"therefore be called multiple times, and must handle this by using the\n"
		"database passed in the most recent call.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"db:  The database which the PostingSource should iterate through.\n"
		"\n"
		"Note: the database supplied to this method must not be modified: in\n"
		"particular, the reopen() method should not be called on it.\n"
		"\n"
		"Note: in the case of a multi-database search, a separate PostingSource\n"
		"will be used for each database (the separate PostingSources will be\n"
		"obtained using  clone()), and each PostingSource will be passed one of\n"
		"the sub-databases as the db parameter here. The db parameter will\n"
		"therefore always refer to a single database. All docids passed to, or\n"
		"returned from, the PostingSource refer to docids in that single\n"
		"database, rather than in the multi- database. \n"
		""},
	 { (char *)"PostingSource___str__", (PyCFunction)_wrap_PostingSource___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"virtual std::string Xapian::PostingSource::get_description() const\n"
		"\n"
		"This default implementation returns a generic answer. This default it\n"
		"provided to avoid forcing those deriving their own PostingSource\n"
		"subclass from having to implement this (they may not care what\n"
		"get_description() gives for their subclass). \n"
		""},
	 { (char *)"disown_PostingSource", (PyCFunction)_wrap_disown_PostingSource, METH_O, NULL},
	 { (char *)"PostingSource_swigregister", PostingSource_swigregister, METH_VARARGS, NULL},
	 { (char *)"PostingSource_swiginit", PostingSource_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_ValuePostingSource", (PyCFunction)_wrap_new_ValuePostingSource, METH_O, (char *)"\n"
		"Construct a ValuePostingSource.\n"
		"\n"
		"Xapian::ValuePostingSource::ValuePostingSource(Xapian::valueno slot_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot_:  The value slot to read values from. \n"
		""},
	 { (char *)"delete_ValuePostingSource", (PyCFunction)_wrap_delete_ValuePostingSource, METH_O, NULL},
	 { (char *)"ValuePostingSource_swigregister", ValuePostingSource_swigregister, METH_VARARGS, NULL},
	 { (char *)"ValuePostingSource_swiginit", ValuePostingSource_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_ValueWeightPostingSource", (PyCFunction)_wrap_new_ValueWeightPostingSource, METH_O, (char *)"\n"
		"Construct a ValueWeightPostingSource.\n"
		"\n"
		"Xapian::ValueWeightPostingSource::ValueWeightPostingSource(Xapian::valueno\n"
		"slot_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot_:  The value slot to read values from. \n"
		""},
	 { (char *)"delete_ValueWeightPostingSource", (PyCFunction)_wrap_delete_ValueWeightPostingSource, METH_O, NULL},
	 { (char *)"ValueWeightPostingSource_swigregister", ValueWeightPostingSource_swigregister, METH_VARARGS, NULL},
	 { (char *)"ValueWeightPostingSource_swiginit", ValueWeightPostingSource_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DecreasingValueWeightPostingSource", _wrap_new_DecreasingValueWeightPostingSource, METH_VARARGS, (char *)"\n"
		"Xapian::DecreasingValueWeightPostingSource::DecreasingValueWeightPostingSource(Xapian::valueno\n"
		"slot_, Xapian::docid range_start_=0, Xapian::docid range_end_=0) \n"
		""},
	 { (char *)"delete_DecreasingValueWeightPostingSource", (PyCFunction)_wrap_delete_DecreasingValueWeightPostingSource, METH_O, NULL},
	 { (char *)"DecreasingValueWeightPostingSource_swigregister", DecreasingValueWeightPostingSource_swigregister, METH_VARARGS, NULL},
	 { (char *)"DecreasingValueWeightPostingSource_swiginit", DecreasingValueWeightPostingSource_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_ValueMapPostingSource", (PyCFunction)_wrap_new_ValueMapPostingSource, METH_O, (char *)"\n"
		"Construct a ValueWeightPostingSource.\n"
		"\n"
		"Xapian::ValueMapPostingSource::ValueMapPostingSource(Xapian::valueno\n"
		"slot_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot_:  The value slot to read values from. \n"
		""},
	 { (char *)"ValueMapPostingSource_add_mapping", _wrap_ValueMapPostingSource_add_mapping, METH_VARARGS, (char *)"\n"
		"Add a mapping.\n"
		"\n"
		"void Xapian::ValueMapPostingSource::add_mapping(const std::string\n"
		"&key, double wt)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"key:  The key looked up from the value slot.\n"
		"\n"
		"wt:  The weight to give this key. \n"
		""},
	 { (char *)"ValueMapPostingSource_clear_mappings", (PyCFunction)_wrap_ValueMapPostingSource_clear_mappings, METH_O, (char *)"\n"
		"Clear all mappings.\n"
		"\n"
		"void Xapian::ValueMapPostingSource::clear_mappings() \n"
		""},
	 { (char *)"ValueMapPostingSource_set_default_weight", _wrap_ValueMapPostingSource_set_default_weight, METH_VARARGS, (char *)"\n"
		"Set a default weight for document values not in the map.\n"
		"\n"
		"void Xapian::ValueMapPostingSource::set_default_weight(double wt)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"wt:  The weight to set as the default. \n"
		""},
	 { (char *)"delete_ValueMapPostingSource", (PyCFunction)_wrap_delete_ValueMapPostingSource, METH_O, NULL},
	 { (char *)"ValueMapPostingSource_swigregister", ValueMapPostingSource_swigregister, METH_VARARGS, NULL},
	 { (char *)"ValueMapPostingSource_swiginit", ValueMapPostingSource_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_FixedWeightPostingSource", (PyCFunction)_wrap_new_FixedWeightPostingSource, METH_O, (char *)"\n"
		"Construct a FixedWeightPostingSource.\n"
		"\n"
		"Xapian::FixedWeightPostingSource::FixedWeightPostingSource(Xapian::weight\n"
		"wt)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"wt:  The fixed weight to return. \n"
		""},
	 { (char *)"delete_FixedWeightPostingSource", (PyCFunction)_wrap_delete_FixedWeightPostingSource, METH_O, NULL},
	 { (char *)"FixedWeightPostingSource_swigregister", FixedWeightPostingSource_swigregister, METH_VARARGS, NULL},
	 { (char *)"FixedWeightPostingSource_swiginit", FixedWeightPostingSource_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_MSet", _wrap_new_MSet, METH_VARARGS, (char *)"\n"
		"Copying is allowed (and is cheap).\n"
		"\n"
		"Xapian::MSet::MSet(const MSet &other) \n"
		""},
	 { (char *)"delete_MSet", (PyCFunction)_wrap_delete_MSet, METH_O, (char *)"\n"
		"Destroy a Xapian::MSet.\n"
		"\n"
		"Xapian::MSet::~MSet() \n"
		""},
	 { (char *)"MSet_fetch", _wrap_MSet_fetch, METH_VARARGS, (char *)"\n"
		"Fetch all the items in the MSet.\n"
		"\n"
		"void Xapian::MSet::fetch() const \n"
		""},
	 { (char *)"MSet_convert_to_percent", _wrap_MSet_convert_to_percent, METH_VARARGS, (char *)"\n"
		"Return the percentage score for a particular item.\n"
		"\n"
		"Xapian::percent Xapian::MSet::convert_to_percent(const MSetIterator\n"
		"&it) const \n"
		""},
	 { (char *)"MSet_get_termfreq", _wrap_MSet_get_termfreq, METH_VARARGS, (char *)"\n"
		"Return the term frequency of the given query term.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::get_termfreq(const std::string &tname)\n"
		"const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The term to look for.\n"
		"\n"
		"This is sometimes more efficient than asking the database directly for\n"
		"the term frequency - in particular, if the term was in the query, its\n"
		"frequency will usually be cached in the MSet. \n"
		""},
	 { (char *)"MSet_get_termweight", _wrap_MSet_get_termweight, METH_VARARGS, (char *)"\n"
		"Return the term weight of the given query term.\n"
		"\n"
		"Xapian::weight Xapian::MSet::get_termweight(const std::string &tname)\n"
		"const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The term to look for.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::InvalidArgumentError:  is thrown if the term was not in the\n"
		"query. \n"
		""},
	 { (char *)"MSet_get_firstitem", (PyCFunction)_wrap_MSet_get_firstitem, METH_O, (char *)"\n"
		"The index of the first item in the result which was put into the MSet.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::get_firstitem() const\n"
		"\n"
		"This corresponds to the parameter \"first\" specified in\n"
		"Xapian::Enquire::get_mset(). A value of 0 corresponds to the highest\n"
		"result being the first item in the MSet. \n"
		""},
	 { (char *)"MSet_get_matches_lower_bound", (PyCFunction)_wrap_MSet_get_matches_lower_bound, METH_O, (char *)"\n"
		"A lower bound on the number of documents in the database which match\n"
		"the query.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::get_matches_lower_bound() const\n"
		"\n"
		"This figure takes into account collapsing of duplicates, and weighting\n"
		"cutoff values.\n"
		"\n"
		"This number is usually considerably less than the actual number of\n"
		"documents which match the query. \n"
		""},
	 { (char *)"MSet_get_matches_estimated", (PyCFunction)_wrap_MSet_get_matches_estimated, METH_O, (char *)"\n"
		"An estimate for the number of documents in the database which match\n"
		"the query.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::get_matches_estimated() const\n"
		"\n"
		"This figure takes into account collapsing of duplicates, and weighting\n"
		"cutoff values.\n"
		"\n"
		"This value is returned because there is sometimes a request to display\n"
		"such information. However, our experience is that presenting this\n"
		"value to users causes them to worry about the large number of results,\n"
		"rather than how useful those at the top of the result set are, and is\n"
		"thus undesirable. \n"
		""},
	 { (char *)"MSet_get_matches_upper_bound", (PyCFunction)_wrap_MSet_get_matches_upper_bound, METH_O, (char *)"\n"
		"An upper bound on the number of documents in the database which match\n"
		"the query.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::get_matches_upper_bound() const\n"
		"\n"
		"This figure takes into account collapsing of duplicates, and weighting\n"
		"cutoff values.\n"
		"\n"
		"This number is usually considerably greater than the actual number of\n"
		"documents which match the query. \n"
		""},
	 { (char *)"MSet_get_uncollapsed_matches_lower_bound", (PyCFunction)_wrap_MSet_get_uncollapsed_matches_lower_bound, METH_O, (char *)"\n"
		"A lower bound on the number of documents in the database which would\n"
		"match the query if collapsing wasn't used.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::get_uncollapsed_matches_lower_bound()\n"
		"const \n"
		""},
	 { (char *)"MSet_get_uncollapsed_matches_estimated", (PyCFunction)_wrap_MSet_get_uncollapsed_matches_estimated, METH_O, (char *)"\n"
		"A estimate of the number of documents in the database which would\n"
		"match the query if collapsing wasn't used.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::get_uncollapsed_matches_estimated()\n"
		"const \n"
		""},
	 { (char *)"MSet_get_uncollapsed_matches_upper_bound", (PyCFunction)_wrap_MSet_get_uncollapsed_matches_upper_bound, METH_O, (char *)"\n"
		"A upper bound on the number of documents in the database which would\n"
		"match the query if collapsing wasn't used.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::get_uncollapsed_matches_upper_bound()\n"
		"const \n"
		""},
	 { (char *)"MSet_get_max_possible", (PyCFunction)_wrap_MSet_get_max_possible, METH_O, (char *)"\n"
		"The maximum possible weight in the MSet.\n"
		"\n"
		"Xapian::weight Xapian::MSet::get_max_possible() const\n"
		"\n"
		"This weight is likely not to be attained in the set of results, but\n"
		"represents an upper bound on the weight which a document could attain\n"
		"for the given query. \n"
		""},
	 { (char *)"MSet_get_max_attained", (PyCFunction)_wrap_MSet_get_max_attained, METH_O, (char *)"\n"
		"The greatest weight which is attained by any document in the database.\n"
		"\n"
		"Xapian::weight Xapian::MSet::get_max_attained() const\n"
		"\n"
		"If firstitem == 0 and the primary ordering is by relevance, this is\n"
		"the weight of the first entry in the MSet.\n"
		"\n"
		"If no documents are found by the query, this will be 0.\n"
		"\n"
		"Note that calculation of max_attained requires calculation of at least\n"
		"one result item - therefore, if no items were requested when the query\n"
		"was performed (by specifying maxitems = 0 in\n"
		"Xapian::Enquire::get_mset()), this value will be 0. \n"
		""},
	 { (char *)"MSet_size", (PyCFunction)_wrap_MSet_size, METH_O, (char *)"\n"
		"The number of items in this MSet.\n"
		"\n"
		"Xapian::doccount Xapian::MSet::size() const \n"
		""},
	 { (char *)"MSet_empty", (PyCFunction)_wrap_MSet_empty, METH_O, (char *)"\n"
		"Test if this MSet is empty.\n"
		"\n"
		"bool Xapian::MSet::empty() const \n"
		""},
	 { (char *)"MSet_begin", (PyCFunction)_wrap_MSet_begin, METH_O, (char *)"\n"
		"Iterator for the items in this MSet.\n"
		"\n"
		"MSetIterator Xapian::MSet::begin() const \n"
		""},
	 { (char *)"MSet_end", (PyCFunction)_wrap_MSet_end, METH_O, (char *)"\n"
		"End iterator corresponding to begin().\n"
		"\n"
		"MSetIterator Xapian::MSet::end() const \n"
		""},
	 { (char *)"MSet_back", (PyCFunction)_wrap_MSet_back, METH_O, (char *)"\n"
		"Iterator pointing to the last element of this MSet.\n"
		"\n"
		"MSetIterator Xapian::MSet::back() const \n"
		""},
	 { (char *)"MSet__get_hit_internal", _wrap_MSet__get_hit_internal, METH_VARARGS, (char *)"\n"
		"Get an item from the MSet.\n"
		"\n"
		"The supplied index is relative to the start of the MSet, not the absolute rank\n"
		"of the item. \n"
		""},
	 { (char *)"MSet_get_document_percentage", _wrap_MSet_get_document_percentage, METH_VARARGS, NULL},
	 { (char *)"MSet_get_document", _wrap_MSet_get_document, METH_VARARGS, NULL},
	 { (char *)"MSet_get_docid", _wrap_MSet_get_docid, METH_VARARGS, NULL},
	 { (char *)"MSet___str__", (PyCFunction)_wrap_MSet___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::MSet::get_description() const \n"
		""},
	 { (char *)"MSet_items_get", (PyCFunction)_wrap_MSet_items_get, METH_O, NULL},
	 { (char *)"MSet___cmp__", _wrap_MSet___cmp__, METH_VARARGS, NULL},
	 { (char *)"MSet_swigregister", MSet_swigregister, METH_VARARGS, NULL},
	 { (char *)"MSet_swiginit", MSet_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_MSetIterator", _wrap_new_MSetIterator, METH_VARARGS, (char *)"\n"
		"Copying is allowed (and is cheap).\n"
		"\n"
		"Xapian::MSetIterator::MSetIterator(const MSetIterator &other) \n"
		""},
	 { (char *)"delete_MSetIterator", (PyCFunction)_wrap_delete_MSetIterator, METH_O, NULL},
	 { (char *)"MSetIterator_get_docid", (PyCFunction)_wrap_MSetIterator_get_docid, METH_O, NULL},
	 { (char *)"MSetIterator_next", (PyCFunction)_wrap_MSetIterator_next, METH_O, NULL},
	 { (char *)"MSetIterator_prev", (PyCFunction)_wrap_MSetIterator_prev, METH_O, NULL},
	 { (char *)"MSetIterator_equals", _wrap_MSetIterator_equals, METH_VARARGS, NULL},
	 { (char *)"MSetIterator_get_document", (PyCFunction)_wrap_MSetIterator_get_document, METH_O, (char *)"\n"
		"Get a Xapian::Document object for the current position.\n"
		"\n"
		"Xapian::Document Xapian::MSetIterator::get_document() const\n"
		"\n"
		"This method returns a Xapian::Document object which provides the\n"
		"information about the document pointed to by the MSetIterator.\n"
		"\n"
		"If the underlying database has suitable support, using this call\n"
		"(rather than asking the database for a document based on its document\n"
		"ID) will enable the system to ensure that the correct data is\n"
		"returned, and that the document has not been deleted or changed since\n"
		"the query was performed.\n"
		"\n"
		"A Xapian::Document object containing the document data.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DocNotFoundError:  The document specified could not be found\n"
		"in the database. \n"
		""},
	 { (char *)"MSetIterator_get_rank", (PyCFunction)_wrap_MSetIterator_get_rank, METH_O, (char *)"\n"
		"Get the rank of the document at the current position.\n"
		"\n"
		"Xapian::doccount Xapian::MSetIterator::get_rank() const\n"
		"\n"
		"The rank is the position that this document is at in the ordered list\n"
		"of results of the query. The result is 0-based - i.e. the top-ranked\n"
		"document has a rank of 0. \n"
		""},
	 { (char *)"MSetIterator_get_weight", (PyCFunction)_wrap_MSetIterator_get_weight, METH_O, (char *)"\n"
		"Get the weight of the document at the current position.\n"
		"\n"
		"Xapian::weight Xapian::MSetIterator::get_weight() const \n"
		""},
	 { (char *)"MSetIterator_get_collapse_key", (PyCFunction)_wrap_MSetIterator_get_collapse_key, METH_O, (char *)"\n"
		"Get the collapse key for this document.\n"
		"\n"
		"std::string Xapian::MSetIterator::get_collapse_key() const \n"
		""},
	 { (char *)"MSetIterator_get_collapse_count", (PyCFunction)_wrap_MSetIterator_get_collapse_count, METH_O, (char *)"\n"
		"Get an estimate of the number of documents that have been collapsed\n"
		"into this one.\n"
		"\n"
		"Xapian::doccount Xapian::MSetIterator::get_collapse_count() const\n"
		"\n"
		"The estimate will always be less than or equal to the actual number of\n"
		"other documents satisfying the match criteria with the same collapse\n"
		"key as this document.\n"
		"\n"
		"This method may return 0 even though there are other documents with\n"
		"the same collapse key which satisfying the match criteria. However if\n"
		"this method returns non-zero, there definitely are other such\n"
		"documents. So this method may be used to inform the user that there\n"
		"are \"at least N other matches in this group\", or to control whether\n"
		"to offer a \"show other documents in this group\" feature (but note\n"
		"that it may not offer it in every case where it would show other\n"
		"documents). \n"
		""},
	 { (char *)"MSetIterator_get_percent", (PyCFunction)_wrap_MSetIterator_get_percent, METH_O, (char *)"\n"
		"This returns the weight of the document as a percentage score.\n"
		"\n"
		"Xapian::percent Xapian::MSetIterator::get_percent() const\n"
		"\n"
		"The return value will be an integer in the range 0 to 100: 0 meaning\n"
		"that the item did not match the query at all.\n"
		"\n"
		"The intention is that the highest weighted document will get 100 if it\n"
		"matches all the weight-contributing terms in the query. However,\n"
		"currently it may get a lower percentage score if you use a\n"
		"MatchDecider and the sorting is primarily by value. In this case, the\n"
		"percentage for a particular document may vary depending on the first,\n"
		"max_size, and checkatleast parameters passed to Enquire::get_mset()\n"
		"(this bug is hard to fix without having to apply the MatchDecider to\n"
		"potentially many more documents, which is potentially costly). \n"
		""},
	 { (char *)"MSetIterator___str__", (PyCFunction)_wrap_MSetIterator___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::MSetIterator::get_description() const \n"
		""},
	 { (char *)"MSetIterator___eq__", _wrap_MSetIterator___eq__, METH_VARARGS, NULL},
	 { (char *)"MSetIterator___ne__", _wrap_MSetIterator___ne__, METH_VARARGS, NULL},
	 { (char *)"MSetIterator_swigregister", MSetIterator_swigregister, METH_VARARGS, NULL},
	 { (char *)"MSetIterator_swiginit", MSetIterator_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_ESet", _wrap_new_ESet, METH_VARARGS, (char *)"\n"
		"Copying is allowed (and is cheap).\n"
		"\n"
		"Xapian::ESet::ESet(const ESet &other) \n"
		""},
	 { (char *)"delete_ESet", (PyCFunction)_wrap_delete_ESet, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::ESet::~ESet() \n"
		""},
	 { (char *)"ESet_get_ebound", (PyCFunction)_wrap_ESet_get_ebound, METH_O, (char *)"\n"
		"A lower bound on the number of terms which are in the full set of\n"
		"results of the expand.\n"
		"\n"
		"Xapian::termcount Xapian::ESet::get_ebound() const\n"
		"\n"
		"This will be greater than or equal to size() \n"
		""},
	 { (char *)"ESet_size", (PyCFunction)_wrap_ESet_size, METH_O, (char *)"\n"
		"The number of terms in this E-Set.\n"
		"\n"
		"Xapian::termcount Xapian::ESet::size() const \n"
		""},
	 { (char *)"ESet_empty", (PyCFunction)_wrap_ESet_empty, METH_O, (char *)"\n"
		"Test if this E-Set is empty.\n"
		"\n"
		"bool Xapian::ESet::empty() const \n"
		""},
	 { (char *)"ESet_begin", (PyCFunction)_wrap_ESet_begin, METH_O, (char *)"\n"
		"Iterator for the terms in this E-Set.\n"
		"\n"
		"ESetIterator Xapian::ESet::begin() const \n"
		""},
	 { (char *)"ESet_end", (PyCFunction)_wrap_ESet_end, METH_O, (char *)"\n"
		"End iterator corresponding to begin().\n"
		"\n"
		"ESetIterator Xapian::ESet::end() const \n"
		""},
	 { (char *)"ESet_back", (PyCFunction)_wrap_ESet_back, METH_O, (char *)"\n"
		"Iterator pointing to the last element of this E-Set.\n"
		"\n"
		"ESetIterator Xapian::ESet::back() const \n"
		""},
	 { (char *)"ESet___str__", (PyCFunction)_wrap_ESet___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::ESet::get_description() const \n"
		""},
	 { (char *)"ESet_items_get", (PyCFunction)_wrap_ESet_items_get, METH_O, NULL},
	 { (char *)"ESet_swigregister", ESet_swigregister, METH_VARARGS, NULL},
	 { (char *)"ESet_swiginit", ESet_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_ESetIterator", _wrap_new_ESetIterator, METH_VARARGS, (char *)"\n"
		"Copying is allowed (and is cheap).\n"
		"\n"
		"Xapian::ESetIterator::ESetIterator(const ESetIterator &other) \n"
		""},
	 { (char *)"delete_ESetIterator", (PyCFunction)_wrap_delete_ESetIterator, METH_O, NULL},
	 { (char *)"ESetIterator_get_term", (PyCFunction)_wrap_ESetIterator_get_term, METH_O, NULL},
	 { (char *)"ESetIterator_next", (PyCFunction)_wrap_ESetIterator_next, METH_O, NULL},
	 { (char *)"ESetIterator_prev", (PyCFunction)_wrap_ESetIterator_prev, METH_O, NULL},
	 { (char *)"ESetIterator_equals", _wrap_ESetIterator_equals, METH_VARARGS, NULL},
	 { (char *)"ESetIterator_get_weight", (PyCFunction)_wrap_ESetIterator_get_weight, METH_O, (char *)"\n"
		"Get the weight of the term at the current position.\n"
		"\n"
		"Xapian::weight Xapian::ESetIterator::get_weight() const \n"
		""},
	 { (char *)"ESetIterator___str__", (PyCFunction)_wrap_ESetIterator___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::ESetIterator::get_description() const \n"
		""},
	 { (char *)"ESetIterator___eq__", _wrap_ESetIterator___eq__, METH_VARARGS, NULL},
	 { (char *)"ESetIterator___ne__", _wrap_ESetIterator___ne__, METH_VARARGS, NULL},
	 { (char *)"ESetIterator_swigregister", ESetIterator_swigregister, METH_VARARGS, NULL},
	 { (char *)"ESetIterator_swiginit", ESetIterator_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_RSet", _wrap_new_RSet, METH_VARARGS, (char *)"\n"
		"Default constructor.\n"
		"\n"
		"Xapian::RSet::RSet() \n"
		""},
	 { (char *)"delete_RSet", (PyCFunction)_wrap_delete_RSet, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::RSet::~RSet() \n"
		""},
	 { (char *)"RSet_size", (PyCFunction)_wrap_RSet_size, METH_O, (char *)"\n"
		"The number of documents in this R-Set.\n"
		"\n"
		"Xapian::doccount Xapian::RSet::size() const \n"
		""},
	 { (char *)"RSet_empty", (PyCFunction)_wrap_RSet_empty, METH_O, (char *)"\n"
		"Test if this R-Set is empty.\n"
		"\n"
		"bool Xapian::RSet::empty() const \n"
		""},
	 { (char *)"RSet_add_document", _wrap_RSet_add_document, METH_VARARGS, (char *)"\n"
		"Add a document to the relevance set.\n"
		"\n"
		"void Xapian::RSet::add_document(const Xapian::MSetIterator &i) \n"
		""},
	 { (char *)"RSet_remove_document", _wrap_RSet_remove_document, METH_VARARGS, (char *)"\n"
		"Remove a document from the relevance set.\n"
		"\n"
		"void Xapian::RSet::remove_document(const Xapian::MSetIterator &i) \n"
		""},
	 { (char *)"RSet_contains", _wrap_RSet_contains, METH_VARARGS, (char *)"\n"
		"Test if a given document in the relevance set.\n"
		"\n"
		"bool Xapian::RSet::contains(const Xapian::MSetIterator &i) const \n"
		""},
	 { (char *)"RSet___str__", (PyCFunction)_wrap_RSet___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::RSet::get_description() const \n"
		""},
	 { (char *)"RSet_swigregister", RSet_swigregister, METH_VARARGS, NULL},
	 { (char *)"RSet_swiginit", RSet_swiginit, METH_VARARGS, NULL},
	 { (char *)"MatchDecider___call__", _wrap_MatchDecider___call__, METH_VARARGS, NULL},
	 { (char *)"delete_MatchDecider", (PyCFunction)_wrap_delete_MatchDecider, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"virtual Xapian::MatchDecider::~MatchDecider() \n"
		""},
	 { (char *)"new_MatchDecider", (PyCFunction)_wrap_new_MatchDecider, METH_O, NULL},
	 { (char *)"disown_MatchDecider", (PyCFunction)_wrap_disown_MatchDecider, METH_O, NULL},
	 { (char *)"MatchDecider_swigregister", MatchDecider_swigregister, METH_VARARGS, NULL},
	 { (char *)"MatchDecider_swiginit", MatchDecider_swiginit, METH_VARARGS, NULL},
	 { (char *)"ExpandDecider___call__", _wrap_ExpandDecider___call__, METH_VARARGS, NULL},
	 { (char *)"delete_ExpandDecider", (PyCFunction)_wrap_delete_ExpandDecider, METH_O, (char *)"\n"
		"Virtual destructor, because we have virtual methods.\n"
		"\n"
		"virtual Xapian::ExpandDecider::~ExpandDecider() \n"
		""},
	 { (char *)"new_ExpandDecider", (PyCFunction)_wrap_new_ExpandDecider, METH_O, NULL},
	 { (char *)"disown_ExpandDecider", (PyCFunction)_wrap_disown_ExpandDecider, METH_O, NULL},
	 { (char *)"ExpandDecider_swigregister", ExpandDecider_swigregister, METH_VARARGS, NULL},
	 { (char *)"ExpandDecider_swiginit", ExpandDecider_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_Enquire", (PyCFunction)_wrap_new_Enquire, METH_O, (char *)"\n"
		"Create a Xapian::Enquire object.\n"
		"\n"
		"Xapian::Enquire::Enquire(const Database &database, ErrorHandler\n"
		"*errorhandler_=0)\n"
		"\n"
		"This specification cannot be changed once the Xapian::Enquire is\n"
		"opened: you must create a new Xapian::Enquire object to access a\n"
		"different database, or set of databases.\n"
		"\n"
		"The database supplied must have been initialised (ie, must not be the\n"
		"result of calling the Database::Database() constructor). If you need\n"
		"to handle a situation where you have no index gracefully, a database\n"
		"created with InMemory::open() can be passed here, which represents a\n"
		"completely empty database.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"database:  Specification of the database or databases to use.\n"
		"\n"
		"errorhandler_:  A pointer to the error handler to use. Ownership of\n"
		"the object pointed to is not assumed by the Xapian::Enquire object -\n"
		"the user should delete the Xapian::ErrorHandler object after the\n"
		"Xapian::Enquire object is deleted. To use no error handler, this\n"
		"parameter should be 0.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::InvalidArgumentError:  will be thrown if an empty Database\n"
		"object is supplied. \n"
		""},
	 { (char *)"delete_Enquire", (PyCFunction)_wrap_delete_Enquire, METH_O, (char *)"\n"
		"Close the Xapian::Enquire object.\n"
		"\n"
		"Xapian::Enquire::~Enquire() \n"
		""},
	 { (char *)"Enquire_set_query", _wrap_Enquire_set_query, METH_VARARGS, (char *)"\n"
		"Set the query to run.\n"
		"\n"
		"void Xapian::Enquire::set_query(const Xapian::Query &query,\n"
		"Xapian::termcount qlen=0)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"query:  the new query to run.\n"
		"\n"
		"qlen:  the query length to use in weight calculations - by default the\n"
		"sum of the wqf of all terms is used. \n"
		""},
	 { (char *)"Enquire_get_query", (PyCFunction)_wrap_Enquire_get_query, METH_O, (char *)"\n"
		"Get the query which has been set.\n"
		"\n"
		"const Xapian::Query& Xapian::Enquire::get_query() const\n"
		"\n"
		"This is only valid after set_query() has been called.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::InvalidArgumentError:  will be thrown if query has not yet\n"
		"been set. \n"
		""},
	 { (char *)"Enquire_add_matchspy", _wrap_Enquire_add_matchspy, METH_VARARGS, (char *)"\n"
		"Add a matchspy.\n"
		"\n"
		"void Xapian::Enquire::add_matchspy(MatchSpy *spy)\n"
		"\n"
		"This matchspy will be called with some of the documents which match\n"
		"the query, during the match process. Exactly which of the matching\n"
		"documents are passed to it depends on exactly when certain\n"
		"optimisations occur during the match process, but it can be controlled\n"
		"to some extent by setting the checkatleast parameter to  get_mset().\n"
		"\n"
		"In particular, if there are enough matching documents, at least the\n"
		"number specified by checkatleast will be passed to the matchspy. This\n"
		"means that you can force the matchspy to be shown all matching\n"
		"documents by setting checkatleast to the number of documents in the\n"
		"database.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"spy:  The MatchSpy subclass to add. The caller must ensure that this\n"
		"remains valid while the Enquire object remains active, or until\n"
		"clear_matchspies() is called. \n"
		""},
	 { (char *)"Enquire_clear_matchspies", (PyCFunction)_wrap_Enquire_clear_matchspies, METH_O, (char *)"\n"
		"Remove all the matchspies.\n"
		"\n"
		"void Xapian::Enquire::clear_matchspies() \n"
		""},
	 { (char *)"Enquire_set_weighting_scheme", _wrap_Enquire_set_weighting_scheme, METH_VARARGS, (char *)"\n"
		"Set the weighting scheme to use for queries.\n"
		"\n"
		"void Xapian::Enquire::set_weighting_scheme(const Weight &weight_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"weight_:  the new weighting scheme. If no weighting scheme is\n"
		"specified, the default is BM25 with the default parameters. \n"
		""},
	 { (char *)"Enquire_set_collapse_key", _wrap_Enquire_set_collapse_key, METH_VARARGS, (char *)"\n"
		"Set the collapse key to use for queries.\n"
		"\n"
		"void Xapian::Enquire::set_collapse_key(Xapian::valueno collapse_key,\n"
		"Xapian::doccount collapse_max=1)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"collapse_key:  value number to collapse on - at most one MSet entry\n"
		"with each particular value will be returned (default is\n"
		"Xapian::BAD_VALUENO which means no collapsing).\n"
		"\n"
		"collapse_max:  Max number of items with the same key to leave after\n"
		"collapsing (default 1).\n"
		"\n"
		"The MSet returned by get_mset() will have only the \"best\" (at most)\n"
		"collapse_max entries with each particular value of collapse_key\n"
		"(\"best\" being highest ranked - i.e. highest weight or highest\n"
		"sorting key).\n"
		"\n"
		"An example use might be to create a value for each document containing\n"
		"an MD5 hash of the document contents. Then duplicate documents from\n"
		"different sources can be eliminated at search time by collapsing with\n"
		"collapse_max = 1 (it's better to eliminate duplicates at index time,\n"
		"but this may not be always be possible - for example the search may be\n"
		"over more than one Xapian database).\n"
		"\n"
		"Another use is to group matches in a particular category (e.g. you\n"
		"might collapse a mailing list search on the Subject: so that there's\n"
		"only one result per discussion thread). In this case you can use\n"
		"get_collapse_count() to give the user some idea how many other results\n"
		"there are. And if you index the Subject: as a boolean term as well as\n"
		"putting it in a value, you can offer a link to a non-collapsed search\n"
		"restricted to that thread using a boolean filter. \n"
		""},
	 { (char *)"Enquire_set_docid_order", _wrap_Enquire_set_docid_order, METH_VARARGS, (char *)"\n"
		"Set the direction in which documents are ordered by document id in the\n"
		"returned MSet.\n"
		"\n"
		"void Xapian::Enquire::set_docid_order(docid_order order)\n"
		"\n"
		"This order only has an effect on documents which would otherwise have\n"
		"equal rank. For a weighted probabilistic match with no sort value,\n"
		"this means documents with equal weight. For a boolean match, with no\n"
		"sort value, this means all documents. And if a sort value is used,\n"
		"this means documents with equal sort value (and also equal weight if\n"
		"ordering on relevance after the sort).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"order:  This can be: Xapian::Enquire::ASCENDING docids sort in\n"
		"ascending order (default)\n"
		"\n"
		"Xapian::Enquire::DESCENDING docids sort in descending order\n"
		"\n"
		"Xapian::Enquire::DONT_CARE docids sort in whatever order is most\n"
		"efficient for the backend\n"
		"\n"
		"Note: If you add documents in strict date order, then a boolean search\n"
		"- i.e. set_weighting_scheme(Xapian::BoolWeight()) - with\n"
		"set_docid_order(Xapian::Enquire::DESCENDING) is an efficient way to\n"
		"perform \"sort by date, newest first\", and with\n"
		"set_docid_order(Xapian::Enquire::ASCENDING) a very efficient way to\n"
		"perform \"sort by date, oldest first\". \n"
		""},
	 { (char *)"Enquire_set_cutoff", _wrap_Enquire_set_cutoff, METH_VARARGS, (char *)"\n"
		"Set the percentage and/or weight cutoffs.\n"
		"\n"
		"void Xapian::Enquire::set_cutoff(Xapian::percent percent_cutoff,\n"
		"Xapian::weight weight_cutoff=0)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"percent_cutoff:  Minimum percentage score for returned documents. If a\n"
		"document has a lower percentage score than this, it will not appear in\n"
		"the MSet. If your intention is to return only matches which contain\n"
		"all the terms in the query, then it's more efficient to use\n"
		"Xapian::Query::OP_AND instead of Xapian::Query::OP_OR in the query\n"
		"than to use set_cutoff(100). (default 0 => no percentage cut-off).\n"
		"\n"
		"weight_cutoff:  Minimum weight for a document to be returned. If a\n"
		"document has a lower score that this, it will not appear in the MSet.\n"
		"It is usually only possible to choose an appropriate weight for cutoff\n"
		"based on the results of a previous run of the same query; this is thus\n"
		"mainly useful for alerting operations. The other potential use is with\n"
		"a user specified weighting scheme. (default 0 => no weight cut-off).\n"
		"\n"
		""},
	 { (char *)"Enquire_set_sort_by_relevance", (PyCFunction)_wrap_Enquire_set_sort_by_relevance, METH_O, (char *)"\n"
		"Set the sorting to be by relevance only.\n"
		"\n"
		"void Xapian::Enquire::set_sort_by_relevance()\n"
		"\n"
		"This is the default. \n"
		""},
	 { (char *)"Enquire_set_sort_by_value", _wrap_Enquire_set_sort_by_value, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::Enquire::set_sort_by_value(Xapian::valueno sort_key) \n"
		""},
	 { (char *)"Enquire_set_sort_by_value_then_relevance", _wrap_Enquire_set_sort_by_value_then_relevance, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::Enquire::set_sort_by_value_then_relevance(Xapian::valueno\n"
		"sort_key) \n"
		""},
	 { (char *)"Enquire_set_sort_by_relevance_then_value", _wrap_Enquire_set_sort_by_relevance_then_value, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::Enquire::set_sort_by_relevance_then_value(Xapian::valueno\n"
		"sort_key) \n"
		""},
	 { (char *)"Enquire_set_sort_by_key", _wrap_Enquire_set_sort_by_key, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::Enquire::set_sort_by_key(Xapian::KeyMaker *sorter) \n"
		""},
	 { (char *)"Enquire_set_sort_by_key_then_relevance", _wrap_Enquire_set_sort_by_key_then_relevance, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::Enquire::set_sort_by_key_then_relevance(Xapian::KeyMaker\n"
		"*sorter) \n"
		""},
	 { (char *)"Enquire_set_sort_by_relevance_then_key", _wrap_Enquire_set_sort_by_relevance_then_key, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::Enquire::set_sort_by_relevance_then_key(Xapian::KeyMaker\n"
		"*sorter) \n"
		""},
	 { (char *)"Enquire_get_mset", _wrap_Enquire_get_mset, METH_VARARGS, NULL},
	 { (char *)"Enquire_get_eset", _wrap_Enquire_get_eset, METH_VARARGS, (char *)"\n"
		"Get the expand set for the given rset.\n"
		"\n"
		"ESet Xapian::Enquire::get_eset(Xapian::termcount maxitems, const RSet\n"
		"&omrset, int flags, double k, const Xapian::ExpandDecider *edecider,\n"
		"Xapian::weight min_wt) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"maxitems:  the maximum number of items to return.\n"
		"\n"
		"omrset:  the relevance set to use when performing the expand\n"
		"operation.\n"
		"\n"
		"flags:  zero or more of these values |-ed together:\n"
		"Xapian::Enquire::INCLUDE_QUERY_TERMS query terms may be returned from\n"
		"expand\n"
		"\n"
		"Xapian::Enquire::USE_EXACT_TERMFREQ for multi dbs, calculate the exact\n"
		"termfreq; otherwise an approximation is used which can greatly improve\n"
		"efficiency, but still returns good results.\n"
		"\n"
		"k:  the parameter k in the query expansion algorithm (default is 1.0)\n"
		"\n"
		"edecider:  a decision functor to use to decide whether a given term\n"
		"should be put in the ESet\n"
		"\n"
		"min_wt:  the minimum weight for included terms\n"
		"\n"
		"An ESet object containing the results of the expand.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::InvalidArgumentError:  See class documentation. \n"
		""},
	 { (char *)"Enquire_get_matching_terms_begin", _wrap_Enquire_get_matching_terms_begin, METH_VARARGS, (char *)"\n"
		"Get terms which match a given document, by match set item.\n"
		"\n"
		"TermIterator Xapian::Enquire::get_matching_terms_begin(const\n"
		"MSetIterator &it) const\n"
		"\n"
		"This method returns the terms in the current query which match the\n"
		"given document.\n"
		"\n"
		"If the underlying database has suitable support, using this call\n"
		"(rather than passing a Xapian::docid) will enable the system to ensure\n"
		"that the correct data is returned, and that the document has not been\n"
		"deleted or changed since the query was performed.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"it:  The iterator for which to retrieve the matching terms.\n"
		"\n"
		"An iterator returning the terms which match the document. The terms\n"
		"will be returned (as far as this makes any sense) in the same order as\n"
		"the terms in the query. Terms will not occur more than once, even if\n"
		"they do in the query.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::InvalidArgumentError:  See class documentation.\n"
		"\n"
		"Xapian::DocNotFoundError:  The document specified could not be found\n"
		"in the database. \n"
		""},
	 { (char *)"Enquire_get_matching_terms_end", _wrap_Enquire_get_matching_terms_end, METH_VARARGS, (char *)"\n"
		"End iterator corresponding to get_matching_terms_begin().\n"
		"\n"
		"TermIterator Xapian::Enquire::get_matching_terms_end(const\n"
		"MSetIterator &) const \n"
		""},
	 { (char *)"Enquire___str__", (PyCFunction)_wrap_Enquire___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::Enquire::get_description() const \n"
		""},
	 { (char *)"Enquire_swigregister", Enquire_swigregister, METH_VARARGS, NULL},
	 { (char *)"Enquire_swiginit", Enquire_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_Registry", _wrap_new_Registry, METH_VARARGS, (char *)"\n"
		"Default constructor.\n"
		"\n"
		"Xapian::Registry::Registry()\n"
		"\n"
		"The registry will contain all standard subclasses of user-subclassable\n"
		"classes. \n"
		""},
	 { (char *)"delete_Registry", (PyCFunction)_wrap_delete_Registry, METH_O, (char *)"Xapian::Registry::~Registry() "},
	 { (char *)"Registry_register_weighting_scheme", _wrap_Registry_register_weighting_scheme, METH_VARARGS, (char *)"\n"
		"Register a weighting scheme.\n"
		"\n"
		"void Xapian::Registry::register_weighting_scheme(const Xapian::Weight\n"
		"&wt)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"wt:  The weighting scheme to register. \n"
		""},
	 { (char *)"Registry_get_weighting_scheme", _wrap_Registry_get_weighting_scheme, METH_VARARGS, (char *)"\n"
		"Get the weighting scheme given a name.\n"
		"\n"
		"const Xapian::Weight* Xapian::Registry::get_weighting_scheme(const\n"
		"std::string &name) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"name:  The name of the weighting scheme to find.\n"
		"\n"
		"An object with the requested name, or NULL if the weighting scheme\n"
		"could not be found. The returned object is owned by the registry and\n"
		"so must not be deleted by the caller. \n"
		""},
	 { (char *)"Registry_register_posting_source", _wrap_Registry_register_posting_source, METH_VARARGS, (char *)"\n"
		"Register a user-defined posting source class.\n"
		"\n"
		"void Xapian::Registry::register_posting_source(const\n"
		"Xapian::PostingSource &source)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"source:  The posting source to register. \n"
		""},
	 { (char *)"Registry_get_posting_source", _wrap_Registry_get_posting_source, METH_VARARGS, (char *)"\n"
		"Get a posting source given a name.\n"
		"\n"
		"const Xapian::PostingSource*\n"
		"Xapian::Registry::get_posting_source(const std::string &name) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"name:  The name of the posting source to find.\n"
		"\n"
		"An object with the requested name, or NULL if the posting source could\n"
		"not be found. The returned object is owned by the registry and so must\n"
		"not be deleted by the caller. \n"
		""},
	 { (char *)"Registry_register_match_spy", _wrap_Registry_register_match_spy, METH_VARARGS, (char *)"\n"
		"Register a user-defined match spy class.\n"
		"\n"
		"void Xapian::Registry::register_match_spy(const Xapian::MatchSpy &spy)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"spy:  The match spy to register. \n"
		""},
	 { (char *)"Registry_get_match_spy", _wrap_Registry_get_match_spy, METH_VARARGS, (char *)"\n"
		"Get a match spy given a name.\n"
		"\n"
		"const Xapian::MatchSpy* Xapian::Registry::get_match_spy(const\n"
		"std::string &name) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"name:  The name of the match spy to find.\n"
		"\n"
		"An object with the requested name, or NULL if the match spy could not\n"
		"be found. The returned object is owned by the registry and so must not\n"
		"be deleted by the caller. \n"
		""},
	 { (char *)"Registry_swigregister", Registry_swigregister, METH_VARARGS, NULL},
	 { (char *)"Registry_swiginit", Registry_swiginit, METH_VARARGS, NULL},
	 { (char *)"delete_Weight", (PyCFunction)_wrap_delete_Weight, METH_O, (char *)"\n"
		"Virtual destructor, because we have virtual methods.\n"
		"\n"
		"virtual Xapian::Weight::~Weight() \n"
		""},
	 { (char *)"Weight_name", (PyCFunction)_wrap_Weight_name, METH_O, (char *)"\n"
		"Return the name of this weighting scheme.\n"
		"\n"
		"virtual std::string Xapian::Weight::name() const\n"
		"\n"
		"This name is used by the remote backend. It is passed along with the\n"
		"serialised parameters to the remote server so that it knows which\n"
		"class to create.\n"
		"\n"
		"Return the full namespace-qualified name of your class here - if your\n"
		"class is called FooWeight, return \"FooWeight\" from this method (\n"
		"Xapian::BM25Weight returns \"Xapian::BM25Weight\" here).\n"
		"\n"
		"If you don't want to support the remote backend, you can use the\n"
		"default implementation which simply returns an empty string. \n"
		""},
	 { (char *)"Weight_get_sumpart", _wrap_Weight_get_sumpart, METH_VARARGS, (char *)"\n"
		"Calculate the weight contribution for this object's term to a\n"
		"document.\n"
		"\n"
		"virtual Xapian::weight Xapian::Weight::get_sumpart(Xapian::termcount\n"
		"wdf, Xapian::termcount doclen) const =0\n"
		"\n"
		"The parameters give information about the document which may be used\n"
		"in the calculations:\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"wdf:  The within document frequency of the term in the document.\n"
		"\n"
		"doclen:  The document's length (unnormalised). \n"
		""},
	 { (char *)"Weight_get_maxpart", (PyCFunction)_wrap_Weight_get_maxpart, METH_O, (char *)"\n"
		"Return an upper bound on what get_sumpart() can return for any\n"
		"document.\n"
		"\n"
		"virtual Xapian::weight Xapian::Weight::get_maxpart() const =0\n"
		"\n"
		"This information is used by the matcher to perform various\n"
		"optimisations, so strive to make the bound as tight as possible. \n"
		""},
	 { (char *)"Weight_get_sumextra", _wrap_Weight_get_sumextra, METH_VARARGS, (char *)"\n"
		"Calculate the term-independent weight component for a document.\n"
		"\n"
		"virtual Xapian::weight Xapian::Weight::get_sumextra(Xapian::termcount\n"
		"doclen) const =0\n"
		"\n"
		"The parameter gives information about the document which may be used\n"
		"in the calculations:\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"doclen:  The document's length (unnormalised). \n"
		""},
	 { (char *)"Weight_get_maxextra", (PyCFunction)_wrap_Weight_get_maxextra, METH_O, (char *)"\n"
		"Return an upper bound on what get_sumextra() can return for any\n"
		"document.\n"
		"\n"
		"virtual Xapian::weight Xapian::Weight::get_maxextra() const =0\n"
		"\n"
		"This information is used by the matcher to perform various\n"
		"optimisations, so strive to make the bound as tight as possible. \n"
		""},
	 { (char *)"Weight_get_sumpart_needs_doclength_", (PyCFunction)_wrap_Weight_get_sumpart_needs_doclength_, METH_O, NULL},
	 { (char *)"Weight_get_sumpart_needs_wdf_", (PyCFunction)_wrap_Weight_get_sumpart_needs_wdf_, METH_O, NULL},
	 { (char *)"Weight_swigregister", Weight_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_BoolWeight", (PyCFunction)_wrap_new_BoolWeight, METH_NOARGS, (char *)"\n"
		"Construct a BoolWeight.\n"
		"\n"
		"Xapian::BoolWeight::BoolWeight() \n"
		""},
	 { (char *)"delete_BoolWeight", (PyCFunction)_wrap_delete_BoolWeight, METH_O, NULL},
	 { (char *)"BoolWeight_swigregister", BoolWeight_swigregister, METH_VARARGS, NULL},
	 { (char *)"BoolWeight_swiginit", BoolWeight_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_BM25Weight", _wrap_new_BM25Weight, METH_VARARGS, (char *)"Xapian::BM25Weight::BM25Weight() "},
	 { (char *)"delete_BM25Weight", (PyCFunction)_wrap_delete_BM25Weight, METH_O, NULL},
	 { (char *)"BM25Weight_swigregister", BM25Weight_swigregister, METH_VARARGS, NULL},
	 { (char *)"BM25Weight_swiginit", BM25Weight_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_TradWeight", _wrap_new_TradWeight, METH_VARARGS, (char *)"\n"
		"Construct a TradWeight.\n"
		"\n"
		"Xapian::TradWeight::TradWeight(double k=1.0)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"k:  A non-negative parameter controlling how influential within-\n"
		"document- frequency (wdf) and document length are. k=0 means that wdf\n"
		"and document length don't affect the weights. The larger k is, the\n"
		"more they do. (default 1) \n"
		""},
	 { (char *)"delete_TradWeight", (PyCFunction)_wrap_delete_TradWeight, METH_O, NULL},
	 { (char *)"TradWeight_swigregister", TradWeight_swigregister, METH_VARARGS, NULL},
	 { (char *)"TradWeight_swiginit", TradWeight_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_MatchSpy", (PyCFunction)_wrap_new_MatchSpy, METH_O, NULL},
	 { (char *)"delete_MatchSpy", (PyCFunction)_wrap_delete_MatchSpy, METH_O, (char *)"\n"
		"Virtual destructor, because we have virtual methods.\n"
		"\n"
		"virtual Xapian::MatchSpy::~MatchSpy() \n"
		""},
	 { (char *)"MatchSpy___call__", _wrap_MatchSpy___call__, METH_VARARGS, NULL},
	 { (char *)"MatchSpy_name", (PyCFunction)_wrap_MatchSpy_name, METH_O, (char *)"\n"
		"Return the name of this match spy.\n"
		"\n"
		"virtual std::string Xapian::MatchSpy::name() const\n"
		"\n"
		"This name is used by the remote backend. It is passed with the\n"
		"serialised parameters to the remote server so that it knows which\n"
		"class to create.\n"
		"\n"
		"Return the full namespace-qualified name of your class here - if your\n"
		"class is called MyApp::FooMatchSpy, return \"MyApp::FooMatchSpy\" from\n"
		"this method.\n"
		"\n"
		"If you don't want to support the remote backend in your match spy, you\n"
		"can use the default implementation which simply throws\n"
		"Xapian::UnimplementedError. \n"
		""},
	 { (char *)"MatchSpy_merge_results", _wrap_MatchSpy_merge_results, METH_VARARGS, (char *)"\n"
		"Unserialise some results, and merge them into this matchspy.\n"
		"\n"
		"virtual void Xapian::MatchSpy::merge_results(const std::string &s)\n"
		"\n"
		"The order in which results are merged should not be significant, since\n"
		"this order is not specified (and will vary depending on the speed of\n"
		"the search in each sub-database).\n"
		"\n"
		"If you don't want to support the remote backend in your match spy, you\n"
		"can use the default implementation which simply throws\n"
		"Xapian::UnimplementedError.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"s:  A string containing the serialised results. \n"
		""},
	 { (char *)"MatchSpy___str__", (PyCFunction)_wrap_MatchSpy___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"virtual std::string Xapian::MatchSpy::get_description() const\n"
		"\n"
		"This default implementation returns a generic answer, to avoid forcing\n"
		"those deriving their own MatchSpy subclasses from having to implement\n"
		"this (they may not care what get_description() gives for their\n"
		"subclass). \n"
		""},
	 { (char *)"disown_MatchSpy", (PyCFunction)_wrap_disown_MatchSpy, METH_O, NULL},
	 { (char *)"MatchSpy_swigregister", MatchSpy_swigregister, METH_VARARGS, NULL},
	 { (char *)"MatchSpy_swiginit", MatchSpy_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_ValueCountMatchSpy", _wrap_new_ValueCountMatchSpy, METH_VARARGS, (char *)"\n"
		"Construct a MatchSpy which counts the values in a particular slot.\n"
		"\n"
		"Xapian::ValueCountMatchSpy::ValueCountMatchSpy(Xapian::valueno slot_)\n"
		"\n"
		""},
	 { (char *)"ValueCountMatchSpy_get_total", (PyCFunction)_wrap_ValueCountMatchSpy_get_total, METH_O, (char *)"\n"
		"Return the total number of documents tallied.\n"
		"\n"
		"size_t Xapian::ValueCountMatchSpy::get_total() const \n"
		""},
	 { (char *)"ValueCountMatchSpy_values_begin", (PyCFunction)_wrap_ValueCountMatchSpy_values_begin, METH_O, (char *)"\n"
		"Get an iterator over the values seen in the slot.\n"
		"\n"
		"TermIterator Xapian::ValueCountMatchSpy::values_begin() const\n"
		"\n"
		"Items will be returned in ascending alphabetical order.\n"
		"\n"
		"During the iteration, the frequency of the current value can be\n"
		"obtained with the get_termfreq() method on the iterator. \n"
		""},
	 { (char *)"ValueCountMatchSpy_values_end", (PyCFunction)_wrap_ValueCountMatchSpy_values_end, METH_O, (char *)"\n"
		"End iterator corresponding to values_begin().\n"
		"\n"
		"TermIterator Xapian::ValueCountMatchSpy::values_end() const \n"
		""},
	 { (char *)"ValueCountMatchSpy_top_values_begin", _wrap_ValueCountMatchSpy_top_values_begin, METH_VARARGS, (char *)"\n"
		"Get an iterator over the most frequent values seen in the slot.\n"
		"\n"
		"TermIterator Xapian::ValueCountMatchSpy::top_values_begin(size_t\n"
		"maxvalues) const\n"
		"\n"
		"Items will be returned in descending order of frequency. Values with\n"
		"the same frequency will be returned in ascending alphabetical order.\n"
		"\n"
		"During the iteration, the frequency of the current value can be\n"
		"obtained with the get_termfreq() method on the iterator.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"maxvalues:  The maximum number of values to return. \n"
		""},
	 { (char *)"ValueCountMatchSpy_top_values_end", _wrap_ValueCountMatchSpy_top_values_end, METH_VARARGS, (char *)"\n"
		"End iterator corresponding to top_values_begin().\n"
		"\n"
		"TermIterator Xapian::ValueCountMatchSpy::top_values_end(size_t) const\n"
		"\n"
		""},
	 { (char *)"delete_ValueCountMatchSpy", (PyCFunction)_wrap_delete_ValueCountMatchSpy, METH_O, NULL},
	 { (char *)"ValueCountMatchSpy_swigregister", ValueCountMatchSpy_swigregister, METH_VARARGS, NULL},
	 { (char *)"ValueCountMatchSpy_swiginit", ValueCountMatchSpy_swiginit, METH_VARARGS, NULL},
	 { (char *)"Database_add_database", _wrap_Database_add_database, METH_VARARGS, (char *)"\n"
		"Add an existing database (or group of databases) to those accessed by\n"
		"this object.\n"
		"\n"
		"void Xapian::Database::add_database(const Database &database)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"database:  the database(s) to add. \n"
		""},
	 { (char *)"delete_Database", (PyCFunction)_wrap_delete_Database, METH_O, (char *)"\n"
		"Destroy this handle on the database.\n"
		"\n"
		"virtual Xapian::Database::~Database()\n"
		"\n"
		"If there are no copies of this object remaining, the database(s) will\n"
		"be closed. \n"
		""},
	 { (char *)"new_Database", _wrap_new_Database, METH_VARARGS, (char *)"\n"
		"Copying is allowed.\n"
		"\n"
		"Xapian::Database::Database(const Database &other)\n"
		"\n"
		"The internals are reference counted, so copying is cheap.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"other:  The object to copy. \n"
		""},
	 { (char *)"Database_reopen", (PyCFunction)_wrap_Database_reopen, METH_O, (char *)"\n"
		"Re-open the database.\n"
		"\n"
		"void Xapian::Database::reopen()\n"
		"\n"
		"This re-opens the database(s) to the latest available version(s). It\n"
		"can be used either to make sure the latest results are returned, or to\n"
		"recover from a Xapian::DatabaseModifiedError.\n"
		"\n"
		"Calling reopen() on a database which has been closed (with  close())\n"
		"will always raise a Xapian::DatabaseError. \n"
		""},
	 { (char *)"Database_close", (PyCFunction)_wrap_Database_close, METH_O, (char *)"\n"
		"Close the database.\n"
		"\n"
		"virtual void Xapian::Database::close()\n"
		"\n"
		"This closes the database and closes all its file handles.\n"
		"\n"
		"For a WritableDatabase, if a transaction is active it will be aborted,\n"
		"while if no transaction is active commit() will be implicitly called.\n"
		"Also the write lock is released.\n"
		"\n"
		"Closing a database cannot be undone - in particular, calling reopen()\n"
		"after close() will not reopen it, but will instead throw a\n"
		"Xapian::DatabaseError exception.\n"
		"\n"
		"Calling close() again on a database which has already been closed has\n"
		"no effect (and doesn't raise an exception).\n"
		"\n"
		"After close() has been called, calls to other methods of the database,\n"
		"and to methods of other objects associated with the database, will\n"
		"either:\n"
		"\n"
		"behave exactly as they would have done if the database had not been\n"
		"closed (this can only happen if all the required data is cached)\n"
		"\n"
		"raise a Xapian::DatabaseError exception indicating that the database\n"
		"is closed.\n"
		"\n"
		"The reason for this behaviour is that otherwise we'd have to check\n"
		"that the database is still open on every method call on every object\n"
		"associated with a Database, when in many cases they are working on\n"
		"data which has already been loaded and so they are able to just behave\n"
		"correctly.\n"
		"\n"
		"This method was added in Xapian 1.1.0. \n"
		""},
	 { (char *)"Database___str__", (PyCFunction)_wrap_Database___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"virtual std::string Xapian::Database::get_description() const \n"
		""},
	 { (char *)"Database_postlist_begin", _wrap_Database_postlist_begin, METH_VARARGS, (char *)"\n"
		"An iterator pointing to the start of the postlist for a given term.\n"
		"\n"
		"PostingIterator Xapian::Database::postlist_begin(const std::string\n"
		"&tname) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The termname to iterate postings for. If the term name is the\n"
		"empty string, the iterator returned will list all the documents in the\n"
		"database. Such an iterator will always return a WDF value of 1, since\n"
		"there is no obvious meaning for this quantity in this case. \n"
		""},
	 { (char *)"Database_postlist_end", _wrap_Database_postlist_end, METH_VARARGS, (char *)"\n"
		"Corresponding end iterator to postlist_begin().\n"
		"\n"
		"PostingIterator Xapian::Database::postlist_end(const std::string &)\n"
		"const \n"
		""},
	 { (char *)"Database_termlist_begin", _wrap_Database_termlist_begin, METH_VARARGS, (char *)"\n"
		"An iterator pointing to the start of the termlist for a given\n"
		"document.\n"
		"\n"
		"TermIterator Xapian::Database::termlist_begin(Xapian::docid did) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"did:  The document id of the document to iterate terms for. \n"
		""},
	 { (char *)"Database_termlist_end", _wrap_Database_termlist_end, METH_VARARGS, (char *)"\n"
		"Corresponding end iterator to termlist_begin().\n"
		"\n"
		"TermIterator Xapian::Database::termlist_end(Xapian::docid) const \n"
		""},
	 { (char *)"Database_positionlist_begin", _wrap_Database_positionlist_begin, METH_VARARGS, (char *)"\n"
		"An iterator pointing to the start of the position list for a given\n"
		"term in a given document.\n"
		"\n"
		"PositionIterator Xapian::Database::positionlist_begin(Xapian::docid\n"
		"did, const std::string &tname) const \n"
		""},
	 { (char *)"Database_positionlist_end", _wrap_Database_positionlist_end, METH_VARARGS, (char *)"\n"
		"Corresponding end iterator to positionlist_begin().\n"
		"\n"
		"PositionIterator Xapian::Database::positionlist_end(Xapian::docid,\n"
		"const std::string &) const \n"
		""},
	 { (char *)"Database_allterms_begin", _wrap_Database_allterms_begin, METH_VARARGS, (char *)"\n"
		"An iterator which runs across all terms with a given prefix.\n"
		"\n"
		"TermIterator Xapian::Database::allterms_begin(const std::string\n"
		"&prefix) const\n"
		"\n"
		"This is functionally similar to getting an iterator with\n"
		"allterms_begin() and then calling skip_to(prefix) on that iterator to\n"
		"move to the start of the prefix, but is more convenient (because it\n"
		"detects the end of the prefixed terms), and may be more efficient than\n"
		"simply calling skip_to() after opening the iterator, particularly for\n"
		"remote databases.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"prefix:  The prefix to restrict the returned terms to. \n"
		""},
	 { (char *)"Database_allterms_end", _wrap_Database_allterms_end, METH_VARARGS, (char *)"\n"
		"Corresponding end iterator to allterms_begin(prefix).\n"
		"\n"
		"TermIterator Xapian::Database::allterms_end(const std::string &) const\n"
		"\n"
		""},
	 { (char *)"Database_get_doccount", (PyCFunction)_wrap_Database_get_doccount, METH_O, (char *)"\n"
		"Get the number of documents in the database.\n"
		"\n"
		"Xapian::doccount Xapian::Database::get_doccount() const \n"
		""},
	 { (char *)"Database_get_lastdocid", (PyCFunction)_wrap_Database_get_lastdocid, METH_O, (char *)"\n"
		"Get the highest document id which has been used in the database.\n"
		"\n"
		"Xapian::docid Xapian::Database::get_lastdocid() const \n"
		""},
	 { (char *)"Database_get_avlength", (PyCFunction)_wrap_Database_get_avlength, METH_O, (char *)"\n"
		"Get the average length of the documents in the database.\n"
		"\n"
		"Xapian::doclength Xapian::Database::get_avlength() const \n"
		""},
	 { (char *)"Database_get_termfreq", _wrap_Database_get_termfreq, METH_VARARGS, (char *)"\n"
		"Get the number of documents in the database indexed by a given term.\n"
		"\n"
		"Xapian::doccount Xapian::Database::get_termfreq(const std::string\n"
		"&tname) const \n"
		""},
	 { (char *)"Database_term_exists", _wrap_Database_term_exists, METH_VARARGS, (char *)"\n"
		"Check if a given term exists in the database.\n"
		"\n"
		"bool Xapian::Database::term_exists(const std::string &tname) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The term to test the existence of.\n"
		"\n"
		"true if and only if the term exists in the database. This is the same\n"
		"as (get_termfreq(tname) != 0), but will often be more efficient. \n"
		""},
	 { (char *)"Database_get_collection_freq", _wrap_Database_get_collection_freq, METH_VARARGS, (char *)"\n"
		"Return the total number of occurrences of the given term.\n"
		"\n"
		"Xapian::termcount Xapian::Database::get_collection_freq(const\n"
		"std::string &tname) const\n"
		"\n"
		"This is the sum of the number of occurrences of the term in each\n"
		"document it indexes: i.e., the sum of the within document frequencies\n"
		"of the term.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"tname:  The term whose collection frequency is being requested. \n"
		""},
	 { (char *)"Database_get_value_freq", _wrap_Database_get_value_freq, METH_VARARGS, (char *)"\n"
		"Return the frequency of a given value slot.\n"
		"\n"
		"Xapian::doccount Xapian::Database::get_value_freq(Xapian::valueno\n"
		"slot) const\n"
		"\n"
		"This is the number of documents which have a (non-empty) value stored\n"
		"in the slot.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot:  The value slot to examine.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"UnimplementedError:  The frequency of the value isn't available for\n"
		"this database type. \n"
		""},
	 { (char *)"Database_get_value_lower_bound", _wrap_Database_get_value_lower_bound, METH_VARARGS, (char *)"\n"
		"Get a lower bound on the values stored in the given value slot.\n"
		"\n"
		"std::string Xapian::Database::get_value_lower_bound(Xapian::valueno\n"
		"slot) const\n"
		"\n"
		"If there are no values stored in the given value slot, this will\n"
		"return an empty string.\n"
		"\n"
		"If the lower bound isn't available for the given database type, this\n"
		"will return the lowest possible bound - the empty string.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot:  The value slot to examine. \n"
		""},
	 { (char *)"Database_get_value_upper_bound", _wrap_Database_get_value_upper_bound, METH_VARARGS, (char *)"\n"
		"Get an upper bound on the values stored in the given value slot.\n"
		"\n"
		"std::string Xapian::Database::get_value_upper_bound(Xapian::valueno\n"
		"slot) const\n"
		"\n"
		"If there are no values stored in the given value slot, this will\n"
		"return an empty string.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot:  The value slot to examine.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"UnimplementedError:  The upper bound of the values isn't available for\n"
		"this database type. \n"
		""},
	 { (char *)"Database_get_doclength_lower_bound", (PyCFunction)_wrap_Database_get_doclength_lower_bound, METH_O, (char *)"\n"
		"Get a lower bound on the length of a document in this DB.\n"
		"\n"
		"Xapian::termcount Xapian::Database::get_doclength_lower_bound() const\n"
		"\n"
		"This bound does not include any zero-length documents. \n"
		""},
	 { (char *)"Database_get_doclength_upper_bound", (PyCFunction)_wrap_Database_get_doclength_upper_bound, METH_O, (char *)"\n"
		"Get an upper bound on the length of a document in this DB.\n"
		"\n"
		"Xapian::termcount Xapian::Database::get_doclength_upper_bound() const\n"
		"\n"
		""},
	 { (char *)"Database_get_wdf_upper_bound", _wrap_Database_get_wdf_upper_bound, METH_VARARGS, (char *)"\n"
		"Get an upper bound on the wdf of term term.\n"
		"\n"
		"Xapian::termcount Xapian::Database::get_wdf_upper_bound(const\n"
		"std::string &term) const \n"
		""},
	 { (char *)"Database_valuestream_begin", _wrap_Database_valuestream_begin, METH_VARARGS, (char *)"\n"
		"Return an iterator over the value in slot slot for each document.\n"
		"\n"
		"ValueIterator Xapian::Database::valuestream_begin(Xapian::valueno\n"
		"slot) const \n"
		""},
	 { (char *)"Database_valuestream_end", _wrap_Database_valuestream_end, METH_VARARGS, (char *)"\n"
		"Return end iterator corresponding to valuestream_begin().\n"
		"\n"
		"ValueIteratorEnd_ Xapian::Database::valuestream_end(Xapian::valueno)\n"
		"const \n"
		""},
	 { (char *)"Database_get_doclength", _wrap_Database_get_doclength, METH_VARARGS, (char *)"\n"
		"Get the length of a document.\n"
		"\n"
		"Xapian::termcount Xapian::Database::get_doclength(Xapian::docid did)\n"
		"const \n"
		""},
	 { (char *)"Database_keep_alive", (PyCFunction)_wrap_Database_keep_alive, METH_O, (char *)"\n"
		"Send a \"keep-alive\" to remote databases to stop them timing out.\n"
		"\n"
		"void Xapian::Database::keep_alive()\n"
		"\n"
		"Has no effect on non-remote databases. \n"
		""},
	 { (char *)"Database_get_document", _wrap_Database_get_document, METH_VARARGS, (char *)"\n"
		"Get a document from the database, given its document id.\n"
		"\n"
		"Xapian::Document Xapian::Database::get_document(Xapian::docid did)\n"
		"const\n"
		"\n"
		"This method returns a Xapian::Document object which provides the\n"
		"information about a document.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"did:  The document id of the document to retrieve.\n"
		"\n"
		"A Xapian::Document object containing the document data\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DocNotFoundError:  The document specified could not be found\n"
		"in the database.\n"
		"\n"
		"Xapian::InvalidArgumentError:  did was 0, which is not a valid\n"
		"document id. \n"
		""},
	 { (char *)"Database_get_spelling_suggestion", _wrap_Database_get_spelling_suggestion, METH_VARARGS, (char *)"\n"
		"Suggest a spelling correction.\n"
		"\n"
		"std::string Xapian::Database::get_spelling_suggestion(const\n"
		"std::string &word, unsigned max_edit_distance=2) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"word:  The potentially misspelled word.\n"
		"\n"
		"max_edit_distance:  Only consider words which are at most\n"
		"max_edit_distance edits from word. An edit is a character insertion,\n"
		"deletion, or the transposition of two adjacent characters (default is\n"
		"2). \n"
		""},
	 { (char *)"Database_spellings_begin", (PyCFunction)_wrap_Database_spellings_begin, METH_O, (char *)"\n"
		"An iterator which returns all the spelling correction targets.\n"
		"\n"
		"Xapian::TermIterator Xapian::Database::spellings_begin() const\n"
		"\n"
		"This returns all the words which are considered as targets for the\n"
		"spelling correction algorithm. The frequency of each word is available\n"
		"as the term frequency of each entry in the returned iterator. \n"
		""},
	 { (char *)"Database_spellings_end", (PyCFunction)_wrap_Database_spellings_end, METH_O, (char *)"\n"
		"Corresponding end iterator to spellings_begin().\n"
		"\n"
		"Xapian::TermIterator Xapian::Database::spellings_end() const \n"
		""},
	 { (char *)"Database_synonyms_begin", _wrap_Database_synonyms_begin, METH_VARARGS, (char *)"\n"
		"An iterator which returns all the synonyms for a given term.\n"
		"\n"
		"Xapian::TermIterator Xapian::Database::synonyms_begin(const\n"
		"std::string &term) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"term:  The term to return synonyms for. \n"
		""},
	 { (char *)"Database_synonyms_end", _wrap_Database_synonyms_end, METH_VARARGS, (char *)"\n"
		"Corresponding end iterator to synonyms_begin(term).\n"
		"\n"
		"Xapian::TermIterator Xapian::Database::synonyms_end(const std::string\n"
		"&) const \n"
		""},
	 { (char *)"Database_synonym_keys_begin", _wrap_Database_synonym_keys_begin, METH_VARARGS, (char *)"\n"
		"An iterator which returns all terms which have synonyms.\n"
		"\n"
		"Xapian::TermIterator Xapian::Database::synonym_keys_begin(const\n"
		"std::string &prefix=std::string()) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"prefix:  If non-empty, only terms with this prefix are returned. \n"
		""},
	 { (char *)"Database_synonym_keys_end", _wrap_Database_synonym_keys_end, METH_VARARGS, (char *)"\n"
		"Corresponding end iterator to synonym_keys_begin(prefix).\n"
		"\n"
		"Xapian::TermIterator Xapian::Database::synonym_keys_end(const\n"
		"std::string &=std::string()) const \n"
		""},
	 { (char *)"Database_get_metadata", _wrap_Database_get_metadata, METH_VARARGS, (char *)"\n"
		"Get the user-specified metadata associated with a given key.\n"
		"\n"
		"std::string Xapian::Database::get_metadata(const std::string &key)\n"
		"const\n"
		"\n"
		"User-specified metadata allows you to store arbitrary information in\n"
		"the form of (key,tag) pairs. See  WritableDatabase::set_metadata() for\n"
		"more information.\n"
		"\n"
		"When invoked on a Xapian::Database object representing multiple\n"
		"databases, currently only the metadata for the first is considered but\n"
		"this behaviour may change in the future.\n"
		"\n"
		"If there is no piece of metadata associated with the specified key, an\n"
		"empty string is returned (this applies even for backends which don't\n"
		"support metadata).\n"
		"\n"
		"Empty keys are not valid, and specifying one will cause an exception.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"key:  The key of the metadata item to access.\n"
		"\n"
		"The retrieved metadata item's value.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::InvalidArgumentError:  will be thrown if the key supplied is\n"
		"empty. \n"
		""},
	 { (char *)"Database__metadata_keys_begin", _wrap_Database__metadata_keys_begin, METH_VARARGS, (char *)"\n"
		"An iterator which returns all user-specified metadata keys.\n"
		"\n"
		"Xapian::TermIterator Xapian::Database::metadata_keys_begin(const\n"
		"std::string &prefix=std::string()) const\n"
		"\n"
		"When invoked on a Xapian::Database object representing multiple\n"
		"databases, currently only the metadata for the first is considered but\n"
		"this behaviour may change in the future.\n"
		"\n"
		"If the backend doesn't support metadata, then this method returns an\n"
		"iterator which compares equal to that returned by metadata_keys_end().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"prefix:  If non-empty, only keys with this prefix are returned.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::UnimplementedError:  will be thrown if the backend implements\n"
		"user-specified metadata, but doesn't implement iterating its keys\n"
		"(currently this happens for the InMemory backend). \n"
		""},
	 { (char *)"Database__metadata_keys_end", _wrap_Database__metadata_keys_end, METH_VARARGS, (char *)"\n"
		"Corresponding end iterator to metadata_keys_begin().\n"
		"\n"
		"Xapian::TermIterator Xapian::Database::metadata_keys_end(const\n"
		"std::string &=std::string()) const \n"
		""},
	 { (char *)"Database_get_uuid", (PyCFunction)_wrap_Database_get_uuid, METH_O, (char *)"\n"
		"Get a UUID for the database.\n"
		"\n"
		"std::string Xapian::Database::get_uuid() const\n"
		"\n"
		"The UUID will persist for the lifetime of the database.\n"
		"\n"
		"Replicas (eg, made with the replication protocol, or by copying all\n"
		"the database files) will have the same UUID. However, copies (made\n"
		"with copydatabase, or xapian-compact) will have different UUIDs.\n"
		"\n"
		"If the backend does not support UUIDs or this database has no\n"
		"subdatabases, the UUID will be empty.\n"
		"\n"
		"If this database has multiple sub-databases, the UUID string will\n"
		"contain the UUIDs of all the sub-databases. \n"
		""},
	 { (char *)"Database_has_positions", (PyCFunction)_wrap_Database_has_positions, METH_O, (char *)"\n"
		"Does this database have any positional information?\n"
		"\n"
		"bool Xapian::Database::has_positions() const \n"
		""},
	 { (char *)"Database_swigregister", Database_swigregister, METH_VARARGS, NULL},
	 { (char *)"Database_swiginit", Database_swiginit, METH_VARARGS, NULL},
	 { (char *)"delete_WritableDatabase", (PyCFunction)_wrap_delete_WritableDatabase, METH_O, (char *)"\n"
		"Destroy this handle on the database.\n"
		"\n"
		"virtual Xapian::WritableDatabase::~WritableDatabase()\n"
		"\n"
		"If no other handles to this database remain, the database will be\n"
		"closed.\n"
		"\n"
		"If a transaction is active cancel_transaction() will be implicitly\n"
		"called; if no transaction is active commit() will be implicitly\n"
		"called, but any exception will be swallowed (because throwing\n"
		"exceptions in C++ destructors is problematic). If you aren't using\n"
		"transactions and want to know about any failure to commit changes,\n"
		"call commit() explicitly before the destructor gets called. \n"
		""},
	 { (char *)"new_WritableDatabase", _wrap_new_WritableDatabase, METH_VARARGS, (char *)"\n"
		"Copying is allowed.\n"
		"\n"
		"Xapian::WritableDatabase::WritableDatabase(const WritableDatabase\n"
		"&other)\n"
		"\n"
		"The internals are reference counted, so copying is cheap.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"other:  The object to copy. \n"
		""},
	 { (char *)"WritableDatabase_commit", (PyCFunction)_wrap_WritableDatabase_commit, METH_O, (char *)"\n"
		"Commit any pending modifications made to the database.\n"
		"\n"
		"void Xapian::WritableDatabase::commit()\n"
		"\n"
		"For efficiency reasons, when performing multiple updates to a database\n"
		"it is best (indeed, almost essential) to make as many modifications as\n"
		"memory will permit in a single pass through the database. To ensure\n"
		"this, Xapian batches up modifications.\n"
		"\n"
		"This method may be called at any time to commit any pending\n"
		"modifications to the database.\n"
		"\n"
		"If any of the modifications fail, an exception will be thrown and the\n"
		"database will be left in a state in which each separate addition,\n"
		"replacement or deletion operation has either been fully performed or\n"
		"not performed at all: it is then up to the application to work out\n"
		"which operations need to be repeated.\n"
		"\n"
		"It's not valid to call commit() within a transaction.\n"
		"\n"
		"Beware of calling commit() too frequently: this will make indexing\n"
		"take much longer.\n"
		"\n"
		"Note that commit() need not be called explicitly: it will be called\n"
		"automatically when the database is closed, or when a sufficient number\n"
		"of modifications have been made. By default, this is every 10000\n"
		"documents added, deleted, or modified. This value is rather\n"
		"conservative, and if you have a machine with plenty of memory, you can\n"
		"improve indexing throughput dramatically by setting\n"
		"XAPIAN_FLUSH_THRESHOLD in the environment to a larger value.\n"
		"\n"
		"This method was new in Xapian 1.1.0 - in earlier versions it was\n"
		"called flush().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DatabaseError:  will be thrown if a problem occurs while\n"
		"modifying the database.\n"
		"\n"
		"Xapian::DatabaseCorruptError:  will be thrown if the database is in a\n"
		"corrupt state. \n"
		""},
	 { (char *)"WritableDatabase_flush", (PyCFunction)_wrap_WritableDatabase_flush, METH_O, (char *)"\n"
		"Pre-1.1.0 name for commit().\n"
		"\n"
		"void Xapian::WritableDatabase::flush()\n"
		"\n"
		"Use commit() instead in new code. This alias may be deprecated in the\n"
		"future. \n"
		""},
	 { (char *)"WritableDatabase_begin_transaction", _wrap_WritableDatabase_begin_transaction, METH_VARARGS, (char *)"\n"
		"Begin a transaction.\n"
		"\n"
		"void Xapian::WritableDatabase::begin_transaction(bool flushed=true)\n"
		"\n"
		"In Xapian a transaction is a group of modifications to the database\n"
		"which are linked such that either all will be applied simultaneously\n"
		"or none will be applied at all. Even in the case of a power failure,\n"
		"this characteristic should be preserved (as long as the filesystem\n"
		"isn't corrupted, etc).\n"
		"\n"
		"A transaction is started with begin_transaction() and can either be\n"
		"committed by calling commit_transaction() or aborted by calling\n"
		"cancel_transaction().\n"
		"\n"
		"By default, a transaction implicitly calls commit() before and after\n"
		"so that the modifications stand and fall without affecting\n"
		"modifications before or after.\n"
		"\n"
		"The downside of these implicit calls to commit() is that small\n"
		"transactions can harm indexing performance in the same way that\n"
		"explicitly calling commit() frequently can.\n"
		"\n"
		"If you're applying atomic groups of changes and only wish to ensure\n"
		"that each group is either applied or not applied, then you can prevent\n"
		"the automatic commit() before and after the transaction by starting\n"
		"the transaction with begin_transaction(false). However, if\n"
		"cancel_transaction is called (or if commit_transaction isn't called\n"
		"before the WritableDatabase object is destroyed) then any changes\n"
		"which were pending before the transaction began will also be\n"
		"discarded.\n"
		"\n"
		"Transactions aren't currently supported by the InMemory backend.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"flushed:  Is this a flushed transaction? By default transactions are\n"
		"\"flushed\", which means that committing a transaction will ensure\n"
		"those changes are permanently written to the database. By contrast,\n"
		"unflushed transactions only ensure that changes within the transaction\n"
		"are either all applied or all aren't.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::UnimplementedError:  will be thrown if transactions are not\n"
		"available for this database type.\n"
		"\n"
		"Xapian::InvalidOperationError:  will be thrown if this is called at an\n"
		"invalid time, such as when a transaction is already in progress. \n"
		""},
	 { (char *)"WritableDatabase_commit_transaction", (PyCFunction)_wrap_WritableDatabase_commit_transaction, METH_O, (char *)"\n"
		"Complete the transaction currently in progress.\n"
		"\n"
		"void Xapian::WritableDatabase::commit_transaction()\n"
		"\n"
		"If this method completes successfully and this is a flushed\n"
		"transaction, all the database modifications made during the\n"
		"transaction will have been committed to the database.\n"
		"\n"
		"If an error occurs, an exception will be thrown, and none of the\n"
		"modifications made to the database during the transaction will have\n"
		"been applied to the database.\n"
		"\n"
		"In all cases the transaction will no longer be in progress.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DatabaseError:  will be thrown if a problem occurs while\n"
		"modifying the database.\n"
		"\n"
		"Xapian::DatabaseCorruptError:  will be thrown if the database is in a\n"
		"corrupt state.\n"
		"\n"
		"Xapian::InvalidOperationError:  will be thrown if a transaction is not\n"
		"currently in progress.\n"
		"\n"
		"Xapian::UnimplementedError:  will be thrown if transactions are not\n"
		"available for this database type. \n"
		""},
	 { (char *)"WritableDatabase_cancel_transaction", (PyCFunction)_wrap_WritableDatabase_cancel_transaction, METH_O, (char *)"\n"
		"Abort the transaction currently in progress, discarding the pending\n"
		"modifications made to the database.\n"
		"\n"
		"void Xapian::WritableDatabase::cancel_transaction()\n"
		"\n"
		"If an error occurs in this method, an exception will be thrown, but\n"
		"the transaction will be cancelled anyway.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DatabaseError:  will be thrown if a problem occurs while\n"
		"modifying the database.\n"
		"\n"
		"Xapian::DatabaseCorruptError:  will be thrown if the database is in a\n"
		"corrupt state.\n"
		"\n"
		"Xapian::InvalidOperationError:  will be thrown if a transaction is not\n"
		"currently in progress.\n"
		"\n"
		"Xapian::UnimplementedError:  will be thrown if transactions are not\n"
		"available for this database type. \n"
		""},
	 { (char *)"WritableDatabase_add_document", _wrap_WritableDatabase_add_document, METH_VARARGS, (char *)"\n"
		"Add a new document to the database.\n"
		"\n"
		"Xapian::docid Xapian::WritableDatabase::add_document(const\n"
		"Xapian::Document &document)\n"
		"\n"
		"This method adds the specified document to the database, returning a\n"
		"newly allocated document ID. Automatically allocated document IDs come\n"
		"from a per-database monotonically increasing counter, so IDs from\n"
		"deleted documents won't be reused.\n"
		"\n"
		"If you want to specify the document ID to be used, you should call\n"
		"replace_document() instead.\n"
		"\n"
		"Note that changes to the database won't be immediately committed to\n"
		"disk; see commit() for more details.\n"
		"\n"
		"As with all database modification operations, the effect is atomic:\n"
		"the document will either be fully added, or the document fails to be\n"
		"added and an exception is thrown (possibly at a later time when\n"
		"commit() is called or the database is closed).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"document:  The new document to be added.\n"
		"\n"
		"The document ID of the newly added document.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DatabaseError:  will be thrown if a problem occurs while\n"
		"writing to the database.\n"
		"\n"
		"Xapian::DatabaseCorruptError:  will be thrown if the database is in a\n"
		"corrupt state. \n"
		""},
	 { (char *)"WritableDatabase_delete_document", _wrap_WritableDatabase_delete_document, METH_VARARGS, (char *)"\n"
		"Delete any documents indexed by a term from the database.\n"
		"\n"
		"void Xapian::WritableDatabase::delete_document(const std::string\n"
		"&unique_term)\n"
		"\n"
		"This method removes any documents indexed by the specified term from\n"
		"the database.\n"
		"\n"
		"A major use is for convenience when UIDs from another system are\n"
		"mapped to terms in Xapian, although this method has other uses (for\n"
		"example, you could add a \"deletion date\" term to documents at index\n"
		"time and use this method to delete all documents due for deletion on a\n"
		"particular date).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"unique_term:  The term to remove references to.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DatabaseError:  will be thrown if a problem occurs while\n"
		"writing to the database.\n"
		"\n"
		"Xapian::DatabaseCorruptError:  will be thrown if the database is in a\n"
		"corrupt state. \n"
		""},
	 { (char *)"WritableDatabase_replace_document", _wrap_WritableDatabase_replace_document, METH_VARARGS, (char *)"\n"
		"Replace any documents matching a term.\n"
		"\n"
		"Xapian::docid Xapian::WritableDatabase::replace_document(const\n"
		"std::string &unique_term, const Xapian::Document &document)\n"
		"\n"
		"This method replaces any documents indexed by the specified term with\n"
		"the specified document. If any documents are indexed by the term, the\n"
		"lowest document ID will be used for the document, otherwise a new\n"
		"document ID will be generated as for add_document.\n"
		"\n"
		"One common use is to allow UIDs from another system to easily be\n"
		"mapped to terms in Xapian. Note that this method doesn't automatically\n"
		"add unique_term as a term, so you'll need to call\n"
		"document.add_term(unique_term) first when using replace_document() in\n"
		"this way.\n"
		"\n"
		"Note that changes to the database won't be immediately committed to\n"
		"disk; see commit() for more details.\n"
		"\n"
		"As with all database modification operations, the effect is atomic:\n"
		"the document(s) will either be fully replaced, or the document(s) fail\n"
		"to be replaced and an exception is thrown (possibly at a later time\n"
		"when commit() is called or the database is closed).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"unique_term:  The \"unique\" term.\n"
		"\n"
		"document:  The new document.\n"
		"\n"
		"The document ID that document was given.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DatabaseError:  will be thrown if a problem occurs while\n"
		"writing to the database.\n"
		"\n"
		"Xapian::DatabaseCorruptError:  will be thrown if the database is in a\n"
		"corrupt state. \n"
		""},
	 { (char *)"WritableDatabase_add_spelling", _wrap_WritableDatabase_add_spelling, METH_VARARGS, (char *)"\n"
		"Add a word to the spelling dictionary.\n"
		"\n"
		"void Xapian::WritableDatabase::add_spelling(const std::string &word,\n"
		"Xapian::termcount freqinc=1) const\n"
		"\n"
		"If the word is already present, its frequency is increased.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"word:  The word to add.\n"
		"\n"
		"freqinc:  How much to increase its frequency by (default 1). \n"
		""},
	 { (char *)"WritableDatabase_remove_spelling", _wrap_WritableDatabase_remove_spelling, METH_VARARGS, (char *)"\n"
		"Remove a word from the spelling dictionary.\n"
		"\n"
		"void Xapian::WritableDatabase::remove_spelling(const std::string\n"
		"&word, Xapian::termcount freqdec=1) const\n"
		"\n"
		"The word's frequency is decreased, and if would become zero or less\n"
		"then the word is removed completely.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"word:  The word to remove.\n"
		"\n"
		"freqdec:  How much to decrease its frequency by (default 1). \n"
		""},
	 { (char *)"WritableDatabase_add_synonym", _wrap_WritableDatabase_add_synonym, METH_VARARGS, (char *)"\n"
		"Add a synonym for a term.\n"
		"\n"
		"void Xapian::WritableDatabase::add_synonym(const std::string &term,\n"
		"const std::string &synonym) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"term:  The term to add a synonym for.\n"
		"\n"
		"synonym:  The synonym to add. If this is already a synonym for term,\n"
		"then no action is taken. \n"
		""},
	 { (char *)"WritableDatabase_remove_synonym", _wrap_WritableDatabase_remove_synonym, METH_VARARGS, (char *)"\n"
		"Remove a synonym for a term.\n"
		"\n"
		"void Xapian::WritableDatabase::remove_synonym(const std::string &term,\n"
		"const std::string &synonym) const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"term:  The term to remove a synonym for.\n"
		"\n"
		"synonym:  The synonym to remove. If this isn't currently a synonym for\n"
		"term, then no action is taken. \n"
		""},
	 { (char *)"WritableDatabase_clear_synonyms", _wrap_WritableDatabase_clear_synonyms, METH_VARARGS, (char *)"\n"
		"Remove all synonyms for a term.\n"
		"\n"
		"void Xapian::WritableDatabase::clear_synonyms(const std::string &term)\n"
		"const\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"term:  The term to remove all synonyms for. If the term has no\n"
		"synonyms, no action is taken. \n"
		""},
	 { (char *)"WritableDatabase_set_metadata", _wrap_WritableDatabase_set_metadata, METH_VARARGS, (char *)"\n"
		"Set the user-specified metadata associated with a given key.\n"
		"\n"
		"void Xapian::WritableDatabase::set_metadata(const std::string &key,\n"
		"const std::string &value)\n"
		"\n"
		"This method sets the metadata value associated with a given key. If\n"
		"there is already a metadata value stored in the database with the same\n"
		"key, the old value is replaced. If you want to delete an existing item\n"
		"of metadata, just set its value to the empty string.\n"
		"\n"
		"User-specified metadata allows you to store arbitrary information in\n"
		"the form of (key,tag) pairs.\n"
		"\n"
		"There's no hard limit on the number of metadata items, or the size of\n"
		"the metadata values. Metadata keys have a limited length, which\n"
		"depends on the backend. We recommend limiting them to 200 bytes. Empty\n"
		"keys are not valid, and specifying one will cause an exception.\n"
		"\n"
		"Metadata modifications are committed to disk in the same way as\n"
		"modifications to the documents in the database are: i.e.,\n"
		"modifications are atomic, and won't be committed to disk immediately\n"
		"(see commit() for more details). This allows metadata to be used to\n"
		"link databases with versioned external resources by storing the\n"
		"appropriate version number in a metadata item.\n"
		"\n"
		"You can also use the metadata to store arbitrary extra information\n"
		"associated with terms, documents, or postings by encoding the termname\n"
		"and/or document id into the metadata key.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"key:  The key of the metadata item to set.\n"
		"\n"
		"value:  The value of the metadata item to set.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"Xapian::DatabaseError:  will be thrown if a problem occurs while\n"
		"writing to the database.\n"
		"\n"
		"Xapian::DatabaseCorruptError:  will be thrown if the database is in a\n"
		"corrupt state.\n"
		"\n"
		"Xapian::InvalidArgumentError:  will be thrown if the key supplied is\n"
		"empty.\n"
		"\n"
		"Xapian::UnimplementedError:  will be thrown if the database backend in\n"
		"use doesn't support user- specified metadata. \n"
		""},
	 { (char *)"WritableDatabase___str__", (PyCFunction)_wrap_WritableDatabase___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::WritableDatabase::get_description() const \n"
		""},
	 { (char *)"WritableDatabase_swigregister", WritableDatabase_swigregister, METH_VARARGS, NULL},
	 { (char *)"WritableDatabase_swiginit", WritableDatabase_swiginit, METH_VARARGS, NULL},
	 { (char *)"open_stub", (PyCFunction)_wrap_open_stub, METH_O, (char *)"\n"
		"Construct a WritableDatabase object for a stub database file.\n"
		"\n"
		"WritableDatabase Xapian::Auto::open_stub(const std::string &file, int\n"
		"action)\n"
		"\n"
		"The stub database file must contain serialised parameters for exactly\n"
		"one database.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"file:  pathname of the stub database file.\n"
		"\n"
		"action:  determines handling of existing/non-existing database:\n"
		"Xapian::DB_CREATE fail if database already exist, otherwise create new\n"
		"database.\n"
		"\n"
		"Xapian::DB_CREATE_OR_OPEN open existing database, or create new\n"
		"database if none exists.\n"
		"\n"
		"Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create\n"
		"new database if none exists.\n"
		"\n"
		"Xapian::DB_OPEN open existing database, failing if none exists. \n"
		""},
	 { (char *)"brass_open", _wrap_brass_open, METH_VARARGS, (char *)"\n"
		"Construct a Database object for update access to a Brass database.\n"
		"\n"
		"WritableDatabase Xapian::Brass::open(const std::string &dir, int\n"
		"action, int block_size=8192)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"dir:  pathname of the directory containing the database.\n"
		"\n"
		"action:  determines handling of existing/non-existing database:\n"
		"Xapian::DB_CREATE fail if database already exist, otherwise create new\n"
		"database.\n"
		"\n"
		"Xapian::DB_CREATE_OR_OPEN open existing database, or create new\n"
		"database if none exists.\n"
		"\n"
		"Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create\n"
		"new database if none exists.\n"
		"\n"
		"Xapian::DB_OPEN open existing database, failing if none exists.\n"
		"\n"
		"block_size:  the Btree blocksize to use (in bytes), which must be a\n"
		"power of two between 2048 and 65536 (inclusive). The default (also\n"
		"used if an invalid value if passed) is 8192 bytes. This parameter is\n"
		"ignored when opening an existing database. \n"
		""},
	 { (char *)"chert_open", _wrap_chert_open, METH_VARARGS, (char *)"\n"
		"Construct a Database object for update access to a Chert database.\n"
		"\n"
		"WritableDatabase Xapian::Chert::open(const std::string &dir, int\n"
		"action, int block_size=8192)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"dir:  pathname of the directory containing the database.\n"
		"\n"
		"action:  determines handling of existing/non-existing database:\n"
		"Xapian::DB_CREATE fail if database already exist, otherwise create new\n"
		"database.\n"
		"\n"
		"Xapian::DB_CREATE_OR_OPEN open existing database, or create new\n"
		"database if none exists.\n"
		"\n"
		"Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create\n"
		"new database if none exists.\n"
		"\n"
		"Xapian::DB_OPEN open existing database, failing if none exists.\n"
		"\n"
		"block_size:  the Btree blocksize to use (in bytes), which must be a\n"
		"power of two between 2048 and 65536 (inclusive). The default (also\n"
		"used if an invalid value if passed) is 8192 bytes. This parameter is\n"
		"ignored when opening an existing database. \n"
		""},
	 { (char *)"flint_open", _wrap_flint_open, METH_VARARGS, (char *)"\n"
		"Construct a Database object for update access to a Flint database.\n"
		"\n"
		"WritableDatabase Xapian::Flint::open(const std::string &dir, int\n"
		"action, int block_size=8192)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"dir:  pathname of the directory containing the database.\n"
		"\n"
		"action:  determines handling of existing/non-existing database:\n"
		"Xapian::DB_CREATE fail if database already exist, otherwise create new\n"
		"database.\n"
		"\n"
		"Xapian::DB_CREATE_OR_OPEN open existing database, or create new\n"
		"database if none exists.\n"
		"\n"
		"Xapian::DB_CREATE_OR_OVERWRITE overwrite existing database, or create\n"
		"new database if none exists.\n"
		"\n"
		"Xapian::DB_OPEN open existing database, failing if none exists.\n"
		"\n"
		"block_size:  the Btree blocksize to use (in bytes), which must be a\n"
		"power of two between 2048 and 65536 (inclusive). The default (also\n"
		"used if an invalid value if passed) is 8192 bytes. This parameter is\n"
		"ignored when opening an existing database. \n"
		""},
	 { (char *)"inmemory_open", (PyCFunction)_wrap_inmemory_open, METH_NOARGS, (char *)"\n"
		"Construct a WritableDatabase object for a new, empty InMemory\n"
		"database.\n"
		"\n"
		"WritableDatabase Xapian::InMemory::open()\n"
		"\n"
		"Only a writable InMemory database can be created, since a read-only\n"
		"one would always remain empty. \n"
		""},
	 { (char *)"remote_open", _wrap_remote_open, METH_VARARGS, (char *)"\n"
		"Construct a Database object for read-only access to a remote database\n"
		"accessed via a program.\n"
		"\n"
		"Database Xapian::Remote::open(const std::string &program, const\n"
		"std::string &args, Xapian::timeout timeout=10000)\n"
		"\n"
		"Access to the remote database is done by running an external program\n"
		"and communicating with it on stdin/stdout.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"program:  the external program to run.\n"
		"\n"
		"args:  space-separated list of arguments to pass to program.\n"
		"\n"
		"timeout:  timeout in milliseconds. If this timeout is exceeded for any\n"
		"individual operation on the remote database then\n"
		"Xapian::NetworkTimeoutError is thrown. A timeout of 0 means don't\n"
		"timeout. (Default is 10000ms, which is 10 seconds). \n"
		""},
	 { (char *)"remote_open_writable", _wrap_remote_open_writable, METH_VARARGS, (char *)"\n"
		"Construct a WritableDatabase object for update access to a remote\n"
		"database accessed via a program.\n"
		"\n"
		"WritableDatabase Xapian::Remote::open_writable(const std::string\n"
		"&program, const std::string &args, Xapian::timeout timeout=0)\n"
		"\n"
		"Access to the remote database is done by running an external program\n"
		"and communicating with it on stdin/stdout.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"program:  the external program to run.\n"
		"\n"
		"args:  space-separated list of arguments to pass to program.\n"
		"\n"
		"timeout:  timeout in milliseconds. If this timeout is exceeded for any\n"
		"individual operation on the remote database then\n"
		"Xapian::NetworkTimeoutError is thrown. (Default is 0, which means\n"
		"don't timeout). \n"
		""},
	 { (char *)"delete_Query", (PyCFunction)_wrap_delete_Query, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::Query::~Query() \n"
		""},
	 { (char *)"Query_get_length", (PyCFunction)_wrap_Query_get_length, METH_O, (char *)"\n"
		"Get the length of the query, used by some ranking formulae.\n"
		"\n"
		"Xapian::termcount Xapian::Query::get_length() const\n"
		"\n"
		"This value is calculated automatically - if you want to override it\n"
		"you can pass a different value to Enquire::set_query(). \n"
		""},
	 { (char *)"Query_get_terms_begin", (PyCFunction)_wrap_Query_get_terms_begin, METH_O, (char *)"\n"
		"Return a Xapian::TermIterator returning all the terms in the query, in\n"
		"order of termpos.\n"
		"\n"
		"TermIterator Xapian::Query::get_terms_begin() const\n"
		"\n"
		"If multiple terms have the same term position, their order is\n"
		"unspecified. Duplicates (same term and termpos) will be removed. \n"
		""},
	 { (char *)"Query_get_terms_end", (PyCFunction)_wrap_Query_get_terms_end, METH_O, (char *)"\n"
		"Return a Xapian::TermIterator to the end of the list of terms in the\n"
		"query.\n"
		"\n"
		"TermIterator Xapian::Query::get_terms_end() const \n"
		""},
	 { (char *)"Query_empty", (PyCFunction)_wrap_Query_empty, METH_O, (char *)"\n"
		"Test if the query is empty (i.e.\n"
		"\n"
		"bool Xapian::Query::empty() const\n"
		"\n"
		"was constructed using the default ctor or with an empty iterator\n"
		"ctor). \n"
		""},
	 { (char *)"Query_serialise", (PyCFunction)_wrap_Query_serialise, METH_O, (char *)"\n"
		"Serialise query into a string.\n"
		"\n"
		"std::string Xapian::Query::serialise() const\n"
		"\n"
		"The query representation may change between Xapian releases: even\n"
		"between minor versions. However, it is guaranteed not to change unless\n"
		"the remote database protocol has also changed between releases. \n"
		""},
	 { (char *)"Query_unserialise", _wrap_Query_unserialise, METH_VARARGS, NULL},
	 { (char *)"Query___str__", (PyCFunction)_wrap_Query___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::Query::get_description() const \n"
		""},
	 { (char *)"new_Query", _wrap_new_Query, METH_VARARGS, (char *)"\n"
		"Construct an external source query.\n"
		"\n"
		"Xapian::Query::Query(Xapian::PostingSource *external_source)\n"
		"\n"
		"An attempt to clone the posting source will be made immediately, so if\n"
		"the posting source supports clone(), the source supplied may be safely\n"
		"deallocated after this call. If the source does not support clone(),\n"
		"the caller must ensure that the posting source remains valid until the\n"
		"Query is deallocated.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"external_source:  The source to use in the query. \n"
		""},
	 { (char *)"Query_swigregister", Query_swigregister, METH_VARARGS, NULL},
	 { (char *)"Query_swiginit", Query_swiginit, METH_VARARGS, NULL},
	 { (char *)"Stopper___call__", _wrap_Stopper___call__, METH_VARARGS, NULL},
	 { (char *)"delete_Stopper", (PyCFunction)_wrap_delete_Stopper, METH_O, (char *)"\n"
		"Class has virtual methods, so provide a virtual destructor.\n"
		"\n"
		"virtual Xapian::Stopper::~Stopper() \n"
		""},
	 { (char *)"Stopper___str__", (PyCFunction)_wrap_Stopper___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"virtual std::string Xapian::Stopper::get_description() const \n"
		""},
	 { (char *)"new_Stopper", (PyCFunction)_wrap_new_Stopper, METH_O, NULL},
	 { (char *)"disown_Stopper", (PyCFunction)_wrap_disown_Stopper, METH_O, NULL},
	 { (char *)"Stopper_swigregister", Stopper_swigregister, METH_VARARGS, NULL},
	 { (char *)"Stopper_swiginit", Stopper_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_SimpleStopper", (PyCFunction)_wrap_new_SimpleStopper, METH_NOARGS, (char *)"\n"
		"Initialise from a pair of iterators.\n"
		"\n"
		"Xapian::SimpleStopper::SimpleStopper(Iterator begin, Iterator end) \n"
		""},
	 { (char *)"SimpleStopper_add", _wrap_SimpleStopper_add, METH_VARARGS, (char *)"\n"
		"Add a single stop word.\n"
		"\n"
		"void Xapian::SimpleStopper::add(const std::string &word) \n"
		""},
	 { (char *)"delete_SimpleStopper", (PyCFunction)_wrap_delete_SimpleStopper, METH_O, NULL},
	 { (char *)"SimpleStopper_swigregister", SimpleStopper_swigregister, METH_VARARGS, NULL},
	 { (char *)"SimpleStopper_swiginit", SimpleStopper_swiginit, METH_VARARGS, NULL},
	 { (char *)"delete_ValueRangeProcessor", (PyCFunction)_wrap_delete_ValueRangeProcessor, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"virtual Xapian::ValueRangeProcessor::~ValueRangeProcessor() \n"
		""},
	 { (char *)"ValueRangeProcessor___call__", _wrap_ValueRangeProcessor___call__, METH_VARARGS, NULL},
	 { (char *)"new_ValueRangeProcessor", (PyCFunction)_wrap_new_ValueRangeProcessor, METH_O, NULL},
	 { (char *)"disown_ValueRangeProcessor", (PyCFunction)_wrap_disown_ValueRangeProcessor, METH_O, NULL},
	 { (char *)"ValueRangeProcessor_swigregister", ValueRangeProcessor_swigregister, METH_VARARGS, NULL},
	 { (char *)"ValueRangeProcessor_swiginit", ValueRangeProcessor_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_StringValueRangeProcessor", _wrap_new_StringValueRangeProcessor, METH_VARARGS, (char *)"\n"
		"Constructor.\n"
		"\n"
		"Xapian::StringValueRangeProcessor::StringValueRangeProcessor(Xapian::valueno\n"
		"slot_, const std::string &str_, bool prefix_=true)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot_:  The value number to return from operator().\n"
		"\n"
		"str_:  A string to look for to recognise values as belonging to this\n"
		"range.\n"
		"\n"
		"prefix_:  Flag specifying whether to check for str_ as a prefix or a\n"
		"suffix. \n"
		""},
	 { (char *)"delete_StringValueRangeProcessor", (PyCFunction)_wrap_delete_StringValueRangeProcessor, METH_O, NULL},
	 { (char *)"StringValueRangeProcessor_swigregister", StringValueRangeProcessor_swigregister, METH_VARARGS, NULL},
	 { (char *)"StringValueRangeProcessor_swiginit", StringValueRangeProcessor_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_DateValueRangeProcessor", _wrap_new_DateValueRangeProcessor, METH_VARARGS, (char *)"\n"
		"Constructor.\n"
		"\n"
		"Xapian::DateValueRangeProcessor::DateValueRangeProcessor(Xapian::valueno\n"
		"slot_, const std::string &str_, bool prefix_=true, bool\n"
		"prefer_mdy_=false, int epoch_year_=1970)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot_:  The value number to return from operator().\n"
		"\n"
		"str_:  A string to look for to recognise values as belonging to this\n"
		"date range.\n"
		"\n"
		"prefix_:  Whether to look for the string at the start or end of the\n"
		"values. If true, the string is a prefix; if false, the string is a\n"
		"suffix (default: true).\n"
		"\n"
		"prefer_mdy_:  Should ambiguous dates be interpreted as month/day/year\n"
		"rather than day/month/year? (default: false)\n"
		"\n"
		"epoch_year_:  Year to use as the epoch for dates with 2 digit years\n"
		"(default: 1970, so 1/1/69 is 2069 while 1/1/70 is 1970).\n"
		"\n"
		"The string supplied in str_ is used by operator() to decide whether\n"
		"the pair of strings supplied to it constitute a valid range. If\n"
		"prefix_ is true, the first value in a range must begin with str_ (and\n"
		"the second value may optionally begin with str_); if prefix_ is false,\n"
		"the second value in a range must end with str_ (and the first value\n"
		"may optionally end with str_).\n"
		"\n"
		"If str_ is empty, the setting of prefix_ is irrelevant, and no special\n"
		"strings are required at the start or end of the strings defining the\n"
		"range.\n"
		"\n"
		"The remainder of both strings defining the endpoints must be valid\n"
		"dates.\n"
		"\n"
		"For example, if str_ is \"created:\" and prefix_ is true, and the\n"
		"range processor has been added to the queryparser, the queryparser\n"
		"will accept \"created:1/1/2000..31/12/2001\". \n"
		""},
	 { (char *)"delete_DateValueRangeProcessor", (PyCFunction)_wrap_delete_DateValueRangeProcessor, METH_O, NULL},
	 { (char *)"DateValueRangeProcessor_swigregister", DateValueRangeProcessor_swigregister, METH_VARARGS, NULL},
	 { (char *)"DateValueRangeProcessor_swiginit", DateValueRangeProcessor_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_NumberValueRangeProcessor", _wrap_new_NumberValueRangeProcessor, METH_VARARGS, (char *)"\n"
		"Constructor.\n"
		"\n"
		"Xapian::NumberValueRangeProcessor::NumberValueRangeProcessor(Xapian::valueno\n"
		"slot_, const std::string &str_, bool prefix_=true)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot_:  The value number to return from operator().\n"
		"\n"
		"str_:  A string to look for to recognise values as belonging to this\n"
		"numeric range.\n"
		"\n"
		"prefix_:  Whether to look for the string at the start or end of the\n"
		"values. If true, the string is a prefix; if false, the string is a\n"
		"suffix (default: true).\n"
		"\n"
		"The string supplied in str_ is used by operator() to decide whether\n"
		"the pair of strings supplied to it constitute a valid range. If\n"
		"prefix_ is true, the first value in a range must begin with str_ (and\n"
		"the second value may optionally begin with str_); if prefix_ is false,\n"
		"the second value in a range must end with str_ (and the first value\n"
		"may optionally end with str_).\n"
		"\n"
		"If str_ is empty, the setting of prefix_ is irrelevant, and no special\n"
		"strings are required at the start or end of the strings defining the\n"
		"range.\n"
		"\n"
		"The remainder of both strings defining the endpoints must be valid\n"
		"floating point numbers. (FIXME: define format recognised).\n"
		"\n"
		"For example, if str_ is \"$\" and prefix_ is true, and the range\n"
		"processor has been added to the queryparser, the queryparser will\n"
		"accept \"$10..50\" or \"$10..$50\", but not \"10..50\" or \"10..$50\"\n"
		"as valid ranges. If str_ is \"kg\" and prefix_ is false, the\n"
		"queryparser will accept \"10..50kg\" or \"10kg..50kg\", but not\n"
		"\"10..50\" or \"10kg..50\" as valid ranges. \n"
		""},
	 { (char *)"delete_NumberValueRangeProcessor", (PyCFunction)_wrap_delete_NumberValueRangeProcessor, METH_O, NULL},
	 { (char *)"NumberValueRangeProcessor_swigregister", NumberValueRangeProcessor_swigregister, METH_VARARGS, NULL},
	 { (char *)"NumberValueRangeProcessor_swiginit", NumberValueRangeProcessor_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_QueryParser", (PyCFunction)_wrap_new_QueryParser, METH_NOARGS, (char *)"\n"
		"Default constructor.\n"
		"\n"
		"Xapian::QueryParser::QueryParser() \n"
		""},
	 { (char *)"delete_QueryParser", (PyCFunction)_wrap_delete_QueryParser, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::QueryParser::~QueryParser() \n"
		""},
	 { (char *)"QueryParser_set_stemmer", _wrap_QueryParser_set_stemmer, METH_VARARGS, (char *)"\n"
		"Set the stemmer.\n"
		"\n"
		"void Xapian::QueryParser::set_stemmer(const Xapian::Stem &stemmer)\n"
		"\n"
		"This sets the stemming algorithm which will be used by the query\n"
		"parser. Note that the stemming algorithm will only be used according\n"
		"to the stemming strategy set by set_stemming_strategy(), which\n"
		"defaults to STEM_NONE. Therefore, to use a stemming algorithm, you\n"
		"will also need to call set_stemming_strategy() with a value other than\n"
		"STEM_NONE.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"stemmer:  The Xapian::Stem object to set. \n"
		""},
	 { (char *)"QueryParser_set_stemming_strategy", _wrap_QueryParser_set_stemming_strategy, METH_VARARGS, (char *)"\n"
		"Set the stemming strategy.\n"
		"\n"
		"void Xapian::QueryParser::set_stemming_strategy(stem_strategy\n"
		"strategy)\n"
		"\n"
		"This controls how the query parser will apply the stemming algorithm.\n"
		"Note that the stemming algorithm is only applied to words in\n"
		"probabilistic fields - boolean filter terms are never stemmed.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"strategy:  The strategy to use - possible values are: STEM_NONE: Don't\n"
		"perform any stemming. (default in Xapian <= 1.3.0)\n"
		"\n"
		"STEM_SOME: Search for stemmed forms of terms except for those which\n"
		"start with a capital letter, or are followed by certain characters\n"
		"(currently: (/@<>=*[{\" ), or are used with operators which need\n"
		"positional information. Stemmed terms are prefixed with 'Z'. (default\n"
		"in Xapian >= 1.3.1)\n"
		"\n"
		"STEM_ALL: Search for stemmed forms of all words (note: no 'Z' prefix\n"
		"is added).\n"
		"\n"
		"STEM_ALL_Z: Search for stemmed forms of all words (note: 'Z' prefix is\n"
		"added). (new in Xapian 1.2.11 and 1.3.1) \n"
		""},
	 { (char *)"QueryParser_set_stopper", _wrap_QueryParser_set_stopper, METH_VARARGS, (char *)"\n"
		"Set the stopper.\n"
		"\n"
		"void Xapian::QueryParser::set_stopper(const Stopper *stop=NULL)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"stop:  The Stopper object to set (default NULL, which means no\n"
		"stopwords). \n"
		""},
	 { (char *)"QueryParser_set_default_op", _wrap_QueryParser_set_default_op, METH_VARARGS, (char *)"\n"
		"Set the default operator.\n"
		"\n"
		"void Xapian::QueryParser::set_default_op(Query::op default_op)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"default_op:  The operator to use to combine non-filter query items\n"
		"when no explicit operator is used.\n"
		"\n"
		"The most useful values for this are OP_OR (the default) and OP_AND.\n"
		"OP_NEAR and OP_PHRASE can also be useful.\n"
		"\n"
		"So for example, 'weather forecast' is parsed as if it were 'weather OR\n"
		"forecast' by default. \n"
		""},
	 { (char *)"QueryParser_get_default_op", (PyCFunction)_wrap_QueryParser_get_default_op, METH_O, (char *)"\n"
		"Get the current default operator.\n"
		"\n"
		"Query::op Xapian::QueryParser::get_default_op() const \n"
		""},
	 { (char *)"QueryParser_set_database", _wrap_QueryParser_set_database, METH_VARARGS, (char *)"\n"
		"Specify the database being searched.\n"
		"\n"
		"void Xapian::QueryParser::set_database(const Database &db)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"db:  The database to use for wildcard expansion (FLAG_WILDCARD and\n"
		"FLAG_PARTIAL), spelling correction (FLAG_SPELLING_CORRECTION), and\n"
		"synonyms (FLAG_SYNONYM, FLAG_AUTO_SYNONYMS, and\n"
		"FLAG_AUTO_MULTIWORD_SYNONYMS). \n"
		""},
	 { (char *)"QueryParser_set_max_wildcard_expansion", _wrap_QueryParser_set_max_wildcard_expansion, METH_VARARGS, (char *)"\n"
		"Specify the maximum expansion of a wildcard term.\n"
		"\n"
		"void Xapian::QueryParser::set_max_wildcard_expansion(Xapian::termcount\n"
		"limit)\n"
		"\n"
		"Note: you must also set FLAG_WILDCARD for wildcard expansion to\n"
		"happen.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"limit:  The maximum number of terms each wildcard in the query can\n"
		"expand to, or 0 for no limit (which is the default). \n"
		""},
	 { (char *)"QueryParser_parse_query", _wrap_QueryParser_parse_query, METH_VARARGS, (char *)"\n"
		"Parse a query.\n"
		"\n"
		"Query Xapian::QueryParser::parse_query(const std::string\n"
		"&query_string, unsigned flags=FLAG_DEFAULT, const std::string\n"
		"&default_prefix=std::string())\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"query_string:  A free-text query as entered by a user\n"
		"\n"
		"flags:  Zero or more Query::feature_flag specifying what features the\n"
		"QueryParser should support. Combine multiple values with bitwise-or\n"
		"(|) (default FLAG_DEFAULT).\n"
		"\n"
		"default_prefix:  The default term prefix to use (default none). For\n"
		"example, you can pass \"A\" when parsing an \"Author\" field.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"If:  the query string can't be parsed, then Xapian::QueryParserError\n"
		"is thrown. You can get an English error message to report to the user\n"
		"by catching it and calling get_msg() on the caught exception. The\n"
		"current possible values (in case you want to translate them) are:\n"
		"\n"
		"Unknown range operation\n"
		"\n"
		"parse error\n"
		"\n"
		"Syntax: <expression> AND <expression>\n"
		"\n"
		"Syntax: <expression> AND NOT <expression>\n"
		"\n"
		"Syntax: <expression> NOT <expression>\n"
		"\n"
		"Syntax: <expression> OR <expression>\n"
		"\n"
		"Syntax: <expression> XOR <expression> \n"
		""},
	 { (char *)"QueryParser_add_prefix", _wrap_QueryParser_add_prefix, METH_VARARGS, (char *)"\n"
		"Add a probabilistic term prefix.\n"
		"\n"
		"void Xapian::QueryParser::add_prefix(const std::string &field, const\n"
		"std::string &prefix)\n"
		"\n"
		"For example:\n"
		"\n"
		"This allows the user to search for author:Orwell which will be\n"
		"converted to a search for the term \"Aorwell\".\n"
		"\n"
		"Multiple fields can be mapped to the same prefix. For example, you can\n"
		"make title: and subject: aliases for each other.\n"
		"\n"
		"As of 1.0.4, you can call this method multiple times with the same\n"
		"value of field to allow a single field to be mapped to multiple\n"
		"prefixes. Multiple terms being generated for such a field, and\n"
		"combined with  Xapian::Query::OP_OR.\n"
		"\n"
		"If any prefixes are specified for the empty field name (i.e. you call\n"
		"this method with an empty string as the first parameter) these\n"
		"prefixes will be used for terms without a field specifier. If you do\n"
		"this and also specify the default_prefix parameter to  parse_query(),\n"
		"then the default_prefix parameter will override.\n"
		"\n"
		"If the prefix parameter is empty, then \"field:word\" will produce the\n"
		"term \"word\" (and this can be one of several prefixes for a\n"
		"particular field, or for terms without a field specifier).\n"
		"\n"
		"If you call  add_prefix() and  add_boolean_prefix() for the same value\n"
		"of field, a  Xapian::InvalidOperationError exception will be thrown.\n"
		"\n"
		"In 1.0.3 and earlier, subsequent calls to this method with the same\n"
		"value of field had no effect.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"field:  The user visible field name\n"
		"\n"
		"prefix:  The term prefix to map this to \n"
		""},
	 { (char *)"QueryParser_add_boolean_prefix", _wrap_QueryParser_add_boolean_prefix, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::QueryParser::add_boolean_prefix(const std::string &field,\n"
		"const std::string &prefix) \n"
		""},
	 { (char *)"QueryParser_stoplist_begin", (PyCFunction)_wrap_QueryParser_stoplist_begin, METH_O, (char *)"\n"
		"Iterate over terms omitted from the query as stopwords.\n"
		"\n"
		"TermIterator Xapian::QueryParser::stoplist_begin() const \n"
		""},
	 { (char *)"QueryParser_stoplist_end", (PyCFunction)_wrap_QueryParser_stoplist_end, METH_O, (char *)"TermIterator Xapian::QueryParser::stoplist_end() const "},
	 { (char *)"QueryParser_unstem_begin", _wrap_QueryParser_unstem_begin, METH_VARARGS, (char *)"\n"
		"Iterate over unstemmed forms of the given (stemmed) term used in the\n"
		"query.\n"
		"\n"
		"TermIterator Xapian::QueryParser::unstem_begin(const std::string\n"
		"&term) const \n"
		""},
	 { (char *)"QueryParser_unstem_end", _wrap_QueryParser_unstem_end, METH_VARARGS, (char *)"\n"
		"TermIterator\n"
		"Xapian::QueryParser::unstem_end(const std::string &) const \n"
		""},
	 { (char *)"QueryParser_add_valuerangeprocessor", _wrap_QueryParser_add_valuerangeprocessor, METH_VARARGS, (char *)"\n"
		"Register a ValueRangeProcessor.\n"
		"\n"
		"void\n"
		"Xapian::QueryParser::add_valuerangeprocessor(Xapian::ValueRangeProcessor\n"
		"*vrproc) \n"
		""},
	 { (char *)"QueryParser_get_corrected_query_string", (PyCFunction)_wrap_QueryParser_get_corrected_query_string, METH_O, (char *)"\n"
		"Get the spelling-corrected query string.\n"
		"\n"
		"std::string Xapian::QueryParser::get_corrected_query_string() const\n"
		"\n"
		"This will only be set if FLAG_SPELLING_CORRECTION is specified when\n"
		"QueryParser::parse_query() was last called.\n"
		"\n"
		"If there were no corrections, an empty string is returned. \n"
		""},
	 { (char *)"QueryParser___str__", (PyCFunction)_wrap_QueryParser___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::QueryParser::get_description() const \n"
		""},
	 { (char *)"QueryParser_swigregister", QueryParser_swigregister, METH_VARARGS, NULL},
	 { (char *)"QueryParser_swiginit", QueryParser_swiginit, METH_VARARGS, NULL},
	 { (char *)"sortable_serialise", (PyCFunction)_wrap_sortable_serialise, METH_O, NULL},
	 { (char *)"sortable_unserialise", (PyCFunction)_wrap_sortable_unserialise, METH_O, NULL},
	 { (char *)"delete_StemImplementation", (PyCFunction)_wrap_delete_StemImplementation, METH_O, (char *)"\n"
		"Virtual destructor.\n"
		"\n"
		"virtual Xapian::StemImplementation::~StemImplementation() \n"
		""},
	 { (char *)"StemImplementation___call__", _wrap_StemImplementation___call__, METH_VARARGS, NULL},
	 { (char *)"StemImplementation___str__", (PyCFunction)_wrap_StemImplementation___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"virtual std::string Xapian::StemImplementation::get_description()\n"
		"const =0 \n"
		""},
	 { (char *)"new_StemImplementation", (PyCFunction)_wrap_new_StemImplementation, METH_O, NULL},
	 { (char *)"disown_StemImplementation", (PyCFunction)_wrap_disown_StemImplementation, METH_O, NULL},
	 { (char *)"StemImplementation_swigregister", StemImplementation_swigregister, METH_VARARGS, NULL},
	 { (char *)"StemImplementation_swiginit", StemImplementation_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_Stem", _wrap_new_Stem, METH_VARARGS, (char *)"\n"
		"Construct a Xapian::Stem object with a user-provided stemming\n"
		"algorithm.\n"
		"\n"
		"Xapian::Stem::Stem(StemImplementation *p)\n"
		"\n"
		"You can subclass Xapian::StemImplementation to implement your own\n"
		"stemming algorithm (or to wrap a third-party algorithm) and then wrap\n"
		"your implementation in a Xapian::Stem object to pass to the Xapian\n"
		"API.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"p:  The user-subclassed StemImplementation object. This is reference\n"
		"counted, and so will be automatically deleted by the Xapian::Stem\n"
		"wrapper when no longer required. \n"
		""},
	 { (char *)"delete_Stem", (PyCFunction)_wrap_delete_Stem, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::Stem::~Stem() \n"
		""},
	 { (char *)"Stem___call__", _wrap_Stem___call__, METH_VARARGS, NULL},
	 { (char *)"Stem___str__", (PyCFunction)_wrap_Stem___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::Stem::get_description() const \n"
		""},
	 { (char *)"Stem_get_available_languages", (PyCFunction)_wrap_Stem_get_available_languages, METH_NOARGS, NULL},
	 { (char *)"Stem_swigregister", Stem_swigregister, METH_VARARGS, NULL},
	 { (char *)"Stem_swiginit", Stem_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_TermGenerator", (PyCFunction)_wrap_new_TermGenerator, METH_NOARGS, (char *)"\n"
		"Default constructor.\n"
		"\n"
		"Xapian::TermGenerator::TermGenerator() \n"
		""},
	 { (char *)"delete_TermGenerator", (PyCFunction)_wrap_delete_TermGenerator, METH_O, (char *)"\n"
		"Destructor.\n"
		"\n"
		"Xapian::TermGenerator::~TermGenerator() \n"
		""},
	 { (char *)"TermGenerator_set_stemmer", _wrap_TermGenerator_set_stemmer, METH_VARARGS, (char *)"\n"
		"Set the Xapian::Stem object to be used for generating stemmed terms.\n"
		"\n"
		"void Xapian::TermGenerator::set_stemmer(const Xapian::Stem &stemmer)\n"
		"\n"
		""},
	 { (char *)"TermGenerator_set_stopper", _wrap_TermGenerator_set_stopper, METH_VARARGS, (char *)"\n"
		"Set the Xapian::Stopper object to be used for identifying stopwords.\n"
		"\n"
		"void Xapian::TermGenerator::set_stopper(const Xapian::Stopper\n"
		"*stop=NULL)\n"
		"\n"
		"Stemmed forms of stopwords aren't indexed, but unstemmed forms still\n"
		"are so that searches for phrases including stop words still work.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"stop:  The Stopper object to set (default NULL, which means no\n"
		"stopwords). \n"
		""},
	 { (char *)"TermGenerator_set_document", _wrap_TermGenerator_set_document, METH_VARARGS, (char *)"\n"
		"Set the current document.\n"
		"\n"
		"void Xapian::TermGenerator::set_document(const Xapian::Document &doc)\n"
		"\n"
		""},
	 { (char *)"TermGenerator_get_document", (PyCFunction)_wrap_TermGenerator_get_document, METH_O, (char *)"\n"
		"Get the current document.\n"
		"\n"
		"const Xapian::Document& Xapian::TermGenerator::get_document() const \n"
		""},
	 { (char *)"TermGenerator_set_database", _wrap_TermGenerator_set_database, METH_VARARGS, (char *)"\n"
		"Set the database to index spelling data to.\n"
		"\n"
		"void Xapian::TermGenerator::set_database(const\n"
		"Xapian::WritableDatabase &db) \n"
		""},
	 { (char *)"TermGenerator_set_flags", _wrap_TermGenerator_set_flags, METH_VARARGS, (char *)"\n"
		"Set flags.\n"
		"\n"
		"flags Xapian::TermGenerator::set_flags(flags toggle, flags\n"
		"mask=flags(0))\n"
		"\n"
		"The new value of flags is: (flags & mask) ^ toggle\n"
		"\n"
		"To just set the flags, pass the new flags in toggle and the default\n"
		"value for mask.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"toggle:  Flags to XOR.\n"
		"\n"
		"mask:  Flags to AND with first.\n"
		"\n"
		"The old flags setting. \n"
		""},
	 { (char *)"TermGenerator_set_stemming_strategy", _wrap_TermGenerator_set_stemming_strategy, METH_VARARGS, (char *)"\n"
		"Set the stemming strategy.\n"
		"\n"
		"void Xapian::TermGenerator::set_stemming_strategy(stem_strategy\n"
		"strategy)\n"
		"\n"
		"This method controls how the stemming algorithm is applied. It was new\n"
		"in Xapian 1.3.1.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"strategy:  The strategy to use - possible values are: STEM_NONE: Don't\n"
		"perform any stemming - only unstemmed terms are generated.\n"
		"\n"
		"STEM_SOME: Generate both stemmed (with a \"Z\" prefix) and unstemmed\n"
		"terms. This is the default strategy.\n"
		"\n"
		"STEM_ALL: Generate only stemmed terms (but without a \"Z\" prefix).\n"
		"\n"
		"STEM_ALL_Z: Generate only stemmed terms (with a \"Z\" prefix). \n"
		""},
	 { (char *)"TermGenerator_index_text", _wrap_TermGenerator_index_text, METH_VARARGS, (char *)"\n"
		"Index some text in a std::string.\n"
		"\n"
		"void Xapian::TermGenerator::index_text(const std::string &text,\n"
		"Xapian::termcount wdf_inc=1, const std::string &prefix=std::string())\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"text:  The text to index.\n"
		"\n"
		"wdf_inc:  The wdf increment (default 1).\n"
		"\n"
		"prefix:  The term prefix to use (default is no prefix). \n"
		""},
	 { (char *)"TermGenerator_index_text_without_positions", _wrap_TermGenerator_index_text_without_positions, METH_VARARGS, (char *)"\n"
		"Index some text in a std::string without positional information.\n"
		"\n"
		"void Xapian::TermGenerator::index_text_without_positions(const\n"
		"std::string &text, Xapian::termcount wdf_inc=1, const std::string\n"
		"&prefix=std::string())\n"
		"\n"
		"Just like index_text, but no positional information is generated. This\n"
		"means that the database will be significantly smaller, but that phrase\n"
		"searching and NEAR won't be supported.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"text:  The text to index.\n"
		"\n"
		"wdf_inc:  The wdf increment (default 1).\n"
		"\n"
		"prefix:  The term prefix to use (default is no prefix). \n"
		""},
	 { (char *)"TermGenerator_increase_termpos", _wrap_TermGenerator_increase_termpos, METH_VARARGS, (char *)"\n"
		"Increase the term position used by index_text.\n"
		"\n"
		"void Xapian::TermGenerator::increase_termpos(Xapian::termcount\n"
		"delta=100)\n"
		"\n"
		"This can be used between indexing text from different fields or other\n"
		"places to prevent phrase searches from spanning between them (e.g.\n"
		"between the title and body text, or between two chapters in a book).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"delta:  Amount to increase the term position by (default: 100). \n"
		""},
	 { (char *)"TermGenerator_get_termpos", (PyCFunction)_wrap_TermGenerator_get_termpos, METH_O, (char *)"\n"
		"Get the current term position.\n"
		"\n"
		"Xapian::termcount Xapian::TermGenerator::get_termpos() const \n"
		""},
	 { (char *)"TermGenerator_set_termpos", _wrap_TermGenerator_set_termpos, METH_VARARGS, (char *)"\n"
		"Set the current term position.\n"
		"\n"
		"void Xapian::TermGenerator::set_termpos(Xapian::termcount termpos)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"termpos:  The new term position to set. \n"
		""},
	 { (char *)"TermGenerator___str__", (PyCFunction)_wrap_TermGenerator___str__, METH_O, (char *)"\n"
		"Return a string describing this object.\n"
		"\n"
		"std::string Xapian::TermGenerator::get_description() const \n"
		""},
	 { (char *)"TermGenerator_swigregister", TermGenerator_swigregister, METH_VARARGS, NULL},
	 { (char *)"TermGenerator_swiginit", TermGenerator_swiginit, METH_VARARGS, NULL},
	 { (char *)"KeyMaker___call__", _wrap_KeyMaker___call__, METH_VARARGS, NULL},
	 { (char *)"delete_KeyMaker", (PyCFunction)_wrap_delete_KeyMaker, METH_O, (char *)"\n"
		"Virtual destructor, because we have virtual methods.\n"
		"\n"
		"virtual Xapian::KeyMaker::~KeyMaker() \n"
		""},
	 { (char *)"new_KeyMaker", (PyCFunction)_wrap_new_KeyMaker, METH_O, NULL},
	 { (char *)"disown_KeyMaker", (PyCFunction)_wrap_disown_KeyMaker, METH_O, NULL},
	 { (char *)"KeyMaker_swigregister", KeyMaker_swigregister, METH_VARARGS, NULL},
	 { (char *)"KeyMaker_swiginit", KeyMaker_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_MultiValueKeyMaker", (PyCFunction)_wrap_new_MultiValueKeyMaker, METH_NOARGS, (char *)"\n"
		"Xapian::MultiValueKeyMaker::MultiValueKeyMaker(Iterator begin,\n"
		"Iterator end) \n"
		""},
	 { (char *)"MultiValueKeyMaker_add_value", _wrap_MultiValueKeyMaker_add_value, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::MultiValueKeyMaker::add_value(Xapian::valueno slot, bool\n"
		"reverse=false) \n"
		""},
	 { (char *)"delete_MultiValueKeyMaker", (PyCFunction)_wrap_delete_MultiValueKeyMaker, METH_O, NULL},
	 { (char *)"MultiValueKeyMaker_swigregister", MultiValueKeyMaker_swigregister, METH_VARARGS, NULL},
	 { (char *)"MultiValueKeyMaker_swiginit", MultiValueKeyMaker_swiginit, METH_VARARGS, NULL},
	 { (char *)"delete_Sorter", (PyCFunction)_wrap_delete_Sorter, METH_O, NULL},
	 { (char *)"Sorter_swigregister", Sorter_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_MultiValueSorter", (PyCFunction)_wrap_new_MultiValueSorter, METH_NOARGS, (char *)"\n"
		"Xapian::MultiValueSorter::MultiValueSorter(Iterator begin, Iterator\n"
		"end) \n"
		""},
	 { (char *)"MultiValueSorter_add", _wrap_MultiValueSorter_add, METH_VARARGS, (char *)"\n"
		"void\n"
		"Xapian::MultiValueSorter::add(Xapian::valueno slot, bool forward=true)\n"
		"\n"
		""},
	 { (char *)"delete_MultiValueSorter", (PyCFunction)_wrap_delete_MultiValueSorter, METH_O, NULL},
	 { (char *)"MultiValueSorter_swigregister", MultiValueSorter_swigregister, METH_VARARGS, NULL},
	 { (char *)"MultiValueSorter_swiginit", MultiValueSorter_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_ValueSetMatchDecider", _wrap_new_ValueSetMatchDecider, METH_VARARGS, (char *)"\n"
		"Construct a ValueSetMatchDecider.\n"
		"\n"
		"Xapian::ValueSetMatchDecider::ValueSetMatchDecider(Xapian::valueno\n"
		"slot, bool inclusive_)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"slot:  The value slot number to look in.\n"
		"\n"
		"inclusive_:  If true, match decider accepts documents which have a\n"
		"value in the specified slot which is a member of the test set; if\n"
		"false, match decider accepts documents which do not have a value in\n"
		"the specified slot. \n"
		""},
	 { (char *)"ValueSetMatchDecider_add_value", _wrap_ValueSetMatchDecider_add_value, METH_VARARGS, (char *)"\n"
		"Add a value to the test set.\n"
		"\n"
		"void Xapian::ValueSetMatchDecider::add_value(const std::string &value)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"value:  The value to add to the test set. \n"
		""},
	 { (char *)"ValueSetMatchDecider_remove_value", _wrap_ValueSetMatchDecider_remove_value, METH_VARARGS, (char *)"\n"
		"Remove a value from the test set.\n"
		"\n"
		"void Xapian::ValueSetMatchDecider::remove_value(const std::string\n"
		"&value)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"value:  The value to remove from the test set. \n"
		""},
	 { (char *)"delete_ValueSetMatchDecider", (PyCFunction)_wrap_delete_ValueSetMatchDecider, METH_O, NULL},
	 { (char *)"ValueSetMatchDecider_swigregister", ValueSetMatchDecider_swigregister, METH_VARARGS, NULL},
	 { (char *)"ValueSetMatchDecider_swiginit", ValueSetMatchDecider_swiginit, METH_VARARGS, NULL},
	 { (char *)"new_Compactor", (PyCFunction)_wrap_new_Compactor, METH_O, (char *)"Xapian::Compactor::Compactor() "},
	 { (char *)"delete_Compactor", (PyCFunction)_wrap_delete_Compactor, METH_O, (char *)"\n"
		"virtual\n"
		"Xapian::Compactor::~Compactor() \n"
		""},
	 { (char *)"Compactor_set_block_size", _wrap_Compactor_set_block_size, METH_VARARGS, (char *)"\n"
		"Set the block size to use for tables in the output database.\n"
		"\n"
		"void Xapian::Compactor::set_block_size(size_t block_size)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"block_size:  The block size to use. Valid block sizes are currently\n"
		"powers of two between 2048 and 65536, with the default being 8192, but\n"
		"the valid sizes and default may change in the future. \n"
		""},
	 { (char *)"Compactor_set_renumber", _wrap_Compactor_set_renumber, METH_VARARGS, (char *)"\n"
		"Set whether to preserve existing document id values.\n"
		"\n"
		"void Xapian::Compactor::set_renumber(bool renumber)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"renumber:  The default is true, which means that document ids will be\n"
		"renumbered - currently by applying the same offset to all the document\n"
		"ids in a particular source database.\n"
		"\n"
		"If false, then the document ids must be unique over all source\n"
		"databases. Currently the ranges of document ids in each source must\n"
		"not overlap either, though this restriction may be removed in the\n"
		"future. \n"
		""},
	 { (char *)"Compactor_set_multipass", _wrap_Compactor_set_multipass, METH_VARARGS, (char *)"\n"
		"Set whether to merge postlists in multiple passes.\n"
		"\n"
		"void Xapian::Compactor::set_multipass(bool multipass)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"multipass:  If true and merging more than 3 databases, merge the\n"
		"postlists in multiple passes, which is generally faster but requires\n"
		"more disk space for temporary files. By default we don't do this. \n"
		""},
	 { (char *)"Compactor_set_compaction_level", _wrap_Compactor_set_compaction_level, METH_VARARGS, (char *)"\n"
		"Set the compaction level.\n"
		"\n"
		"void Xapian::Compactor::set_compaction_level(compaction_level\n"
		"compaction)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"compaction:  Available values are: - Xapian::Compactor::STANDARD -\n"
		"Don't split items unnecessarily. - Xapian::Compactor::FULL - Split\n"
		"items whenever it saves space (the default). -\n"
		"Xapian::Compactor::FULLER - Allow oversize items to save more space\n"
		"(not recommended if you ever plan to update the compacted database).\n"
		"\n"
		""},
	 { (char *)"Compactor_set_destdir", _wrap_Compactor_set_destdir, METH_VARARGS, (char *)"\n"
		"Set where to write the output.\n"
		"\n"
		"void Xapian::Compactor::set_destdir(const std::string &destdir)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"destdir:  Output path. This can be the same as an input if that input\n"
		"is a stub database (in which case the database(s) listed in the stub\n"
		"will be compacted to a new database and then the stub will be\n"
		"atomically updated to point to this new database). \n"
		""},
	 { (char *)"Compactor_add_source", _wrap_Compactor_add_source, METH_VARARGS, (char *)"\n"
		"Add a source database.\n"
		"\n"
		"void Xapian::Compactor::add_source(const std::string &srcdir)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"srcdir:  The path to the source database to add. \n"
		""},
	 { (char *)"Compactor_compact", (PyCFunction)_wrap_Compactor_compact, METH_O, (char *)"\n"
		"Perform the actual compaction/merging operation.\n"
		"\n"
		"void Xapian::Compactor::compact() \n"
		""},
	 { (char *)"Compactor_set_status", _wrap_Compactor_set_status, METH_VARARGS, (char *)"\n"
		"Update progress.\n"
		"\n"
		"virtual void Xapian::Compactor::set_status(const std::string &table,\n"
		"const std::string &status)\n"
		"\n"
		"Subclass this method if you want to get progress updates during\n"
		"compaction. This is called for each table first with empty status, And\n"
		"then one or more times with non-empty status.\n"
		"\n"
		"The default implementation does nothing.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"table:  The table currently being compacted.\n"
		"\n"
		"status:  A status message. \n"
		""},
	 { (char *)"Compactor_resolve_duplicate_metadata", _wrap_Compactor_resolve_duplicate_metadata, METH_VARARGS, (char *)"\n"
		"Resolve multiple user metadata entries with the same key.\n"
		"\n"
		"virtual std::string\n"
		"Xapian::Compactor::resolve_duplicate_metadata(const std::string &key,\n"
		"size_t num_tags, const std::string tags[])\n"
		"\n"
		"When merging, if the same user metadata key is set in more than one\n"
		"input, then this method is called to allow this to be resolving in an\n"
		"appropriate way.\n"
		"\n"
		"The default implementation just returns tags[0].\n"
		"\n"
		"For multipass this will currently get called multiple times for the\n"
		"same key if there are duplicates to resolve in each pass, but this may\n"
		"change in the future.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"key:  The metadata key with duplicate entries.\n"
		"\n"
		"num_tags:  How many tags there are.\n"
		"\n"
		"tags:  An array of num_tags strings containing the tags to merge. \n"
		""},
	 { (char *)"disown_Compactor", (PyCFunction)_wrap_disown_Compactor, METH_O, NULL},
	 { (char *)"Compactor_swigregister", Compactor_swigregister, METH_VARARGS, NULL},
	 { (char *)"Compactor_swiginit", Compactor_swiginit, METH_VARARGS, NULL},
	 { NULL, NULL, 0, NULL }
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_Xapian__WritableDatabaseTo_p_Xapian__Database(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Database *)  ((Xapian::WritableDatabase *) x));
}
static void *_p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchDecider *)  ((Xapian::ValueSetMatchDecider *) x));
}
static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__NetworkError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::NetworkError *)  ((Xapian::NetworkTimeoutError *) x));
}
static void *_p_Xapian__MultiValueSorterTo_p_Xapian__Sorter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Sorter *)  ((Xapian::MultiValueSorter *) x));
}
static void *_p_Xapian__SorterTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *)  ((Xapian::Sorter *) x));
}
static void *_p_Xapian__MultiValueSorterTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *) (Xapian::Sorter *) ((Xapian::MultiValueSorter *) x));
}
static void *_p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::KeyMaker *)  ((Xapian::MultiValueKeyMaker *) x));
}
static void *_p_Xapian__AssertionErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::AssertionError *) x));
}
static void *_p_Xapian__InvalidOperationErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::InvalidOperationError *) x));
}
static void *_p_Xapian__UnimplementedErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::UnimplementedError *) x));
}
static void *_p_Xapian__InvalidArgumentErrorTo_p_Xapian__LogicError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::LogicError *)  ((Xapian::InvalidArgumentError *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueWeightPostingSource *)  ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueWeightPostingSource *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *) (Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueMapPostingSource *) x));
}
static void *_p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::ValuePostingSource *) x));
}
static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueWeightPostingSource *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *)(Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueMapPostingSource *) x));
}
static void *_p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::FixedWeightPostingSource *) x));
}
static void *_p_Xapian__BoolWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BoolWeight *) x));
}
static void *_p_Xapian__TradWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TradWeight *) x));
}
static void *_p_Xapian__BM25WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BM25Weight *) x));
}
static void *_p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchSpy *)  ((Xapian::ValueCountMatchSpy *) x));
}
static void *_p_Xapian__SimpleStopperTo_p_Xapian__Stopper(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Stopper *)  ((Xapian::SimpleStopper *) x));
}
static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseOpeningError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseOpeningError *)  ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *) (Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseLockError *) x));
}
static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseModifiedError *) x));
}
static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseOpeningError *) x));
}
static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseCreateError *) x));
}
static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__DatabaseError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::DatabaseError *)  ((Xapian::DatabaseCorruptError *) x));
}
static void *_p_Xapian__DocNotFoundErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::DocNotFoundError *) x));
}
static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) x));
}
static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::NetworkError *) ((Xapian::NetworkTimeoutError *) x));
}
static void *_p_Xapian__FeatureUnavailableErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::FeatureUnavailableError *) x));
}
static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) x));
}
static void *_p_Xapian__InternalErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::InternalError *) x));
}
static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseModifiedError *) x));
}
static void *_p_Xapian__DatabaseErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::DatabaseError *) x));
}
static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseOpeningError *) x));
}
static void *_p_Xapian__RangeErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::RangeError *) x));
}
static void *_p_Xapian__SerialisationErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::SerialisationError *) x));
}
static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__NetworkErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::NetworkError *) x));
}
static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *) (Xapian::DatabaseError *) ((Xapian::DatabaseCorruptError *) x));
}
static void *_p_Xapian__QueryParserErrorTo_p_Xapian__RuntimeError(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::RuntimeError *)  ((Xapian::QueryParserError *) x));
}
static void *_p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *)  ((Xapian::StringValueRangeProcessor *) x));
}
static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::DateValueRangeProcessor *) x));
}
static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueRangeProcessor *) (Xapian::StringValueRangeProcessor *) ((Xapian::NumberValueRangeProcessor *) x));
}
static void *_p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::StringValueRangeProcessor *)  ((Xapian::DateValueRangeProcessor *) x));
}
static void *_p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::StringValueRangeProcessor *)  ((Xapian::NumberValueRangeProcessor *) x));
}
static void *_p_Xapian__DocNotFoundErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::DocNotFoundError *) x));
}
static void *_p_Xapian__DatabaseLockErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseLockError *) x));
}
static void *_p_Xapian__LogicErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *)  ((Xapian::LogicError *) x));
}
static void *_p_Xapian__DatabaseCreateErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseCreateError *) x));
}
static void *_p_Xapian__FeatureUnavailableErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::FeatureUnavailableError *) x));
}
static void *_p_Xapian__NetworkTimeoutErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::NetworkError *) ((Xapian::NetworkTimeoutError *) x));
}
static void *_p_Xapian__InternalErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::InternalError *) x));
}
static void *_p_Xapian__DatabaseModifiedErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseModifiedError *) x));
}
static void *_p_Xapian__UnimplementedErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::UnimplementedError *) x));
}
static void *_p_Xapian__DatabaseErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::DatabaseError *) x));
}
static void *_p_Xapian__RuntimeErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *)  ((Xapian::RuntimeError *) x));
}
static void *_p_Xapian__DatabaseOpeningErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseOpeningError *) x));
}
static void *_p_Xapian__RangeErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::RangeError *) x));
}
static void *_p_Xapian__DatabaseVersionErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *)(Xapian::DatabaseOpeningError *) ((Xapian::DatabaseVersionError *) x));
}
static void *_p_Xapian__InvalidOperationErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::InvalidOperationError *) x));
}
static void *_p_Xapian__AssertionErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::AssertionError *) x));
}
static void *_p_Xapian__SerialisationErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::SerialisationError *) x));
}
static void *_p_Xapian__NetworkErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::NetworkError *) x));
}
static void *_p_Xapian__DatabaseCorruptErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *)(Xapian::DatabaseError *) ((Xapian::DatabaseCorruptError *) x));
}
static void *_p_Xapian__InvalidArgumentErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::LogicError *) ((Xapian::InvalidArgumentError *) x));
}
static void *_p_Xapian__QueryParserErrorTo_p_Xapian__Error(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Error *) (Xapian::RuntimeError *) ((Xapian::QueryParserError *) x));
}
static swig_type_info _swigt__p_Xapian__AssertionError = {"_p_Xapian__AssertionError", "Xapian::AssertionError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__BM25Weight = {"_p_Xapian__BM25Weight", "Xapian::BM25Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__BoolWeight = {"_p_Xapian__BoolWeight", "Xapian::BoolWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Compactor = {"_p_Xapian__Compactor", "Xapian::Compactor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Database = {"_p_Xapian__Database", "Xapian::Database *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DatabaseCorruptError = {"_p_Xapian__DatabaseCorruptError", "Xapian::DatabaseCorruptError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DatabaseCreateError = {"_p_Xapian__DatabaseCreateError", "Xapian::DatabaseCreateError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DatabaseError = {"_p_Xapian__DatabaseError", "Xapian::DatabaseError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DatabaseLockError = {"_p_Xapian__DatabaseLockError", "Xapian::DatabaseLockError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DatabaseModifiedError = {"_p_Xapian__DatabaseModifiedError", "Xapian::DatabaseModifiedError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DatabaseOpeningError = {"_p_Xapian__DatabaseOpeningError", "Xapian::DatabaseOpeningError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DatabaseVersionError = {"_p_Xapian__DatabaseVersionError", "Xapian::DatabaseVersionError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DateValueRangeProcessor = {"_p_Xapian__DateValueRangeProcessor", "Xapian::DateValueRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DecreasingValueWeightPostingSource = {"_p_Xapian__DecreasingValueWeightPostingSource", "Xapian::DecreasingValueWeightPostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__DocNotFoundError = {"_p_Xapian__DocNotFoundError", "Xapian::DocNotFoundError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Document = {"_p_Xapian__Document", "Xapian::Document *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ESet = {"_p_Xapian__ESet", "Xapian::ESet *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ESetIterator = {"_p_Xapian__ESetIterator", "Xapian::ESetIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Enquire = {"_p_Xapian__Enquire", "Xapian::Enquire *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Error = {"_p_Xapian__Error", "Xapian::Error *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ExpandDecider = {"_p_Xapian__ExpandDecider", "Xapian::ExpandDecider *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__FeatureUnavailableError = {"_p_Xapian__FeatureUnavailableError", "Xapian::FeatureUnavailableError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__FixedWeightPostingSource = {"_p_Xapian__FixedWeightPostingSource", "Xapian::FixedWeightPostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__InternalError = {"_p_Xapian__InternalError", "Xapian::InternalError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__InvalidArgumentError = {"_p_Xapian__InvalidArgumentError", "Xapian::InvalidArgumentError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__InvalidOperationError = {"_p_Xapian__InvalidOperationError", "Xapian::InvalidOperationError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__KeyMaker = {"_p_Xapian__KeyMaker", "Xapian::KeyMaker *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__LogicError = {"_p_Xapian__LogicError", "Xapian::LogicError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MSet = {"_p_Xapian__MSet", "Xapian::MSet *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MSetIterator = {"_p_Xapian__MSetIterator", "Xapian::MSetIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MatchDecider = {"_p_Xapian__MatchDecider", "Xapian::MatchDecider *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MatchSpy = {"_p_Xapian__MatchSpy", "Xapian::MatchSpy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MultiValueKeyMaker = {"_p_Xapian__MultiValueKeyMaker", "Xapian::MultiValueKeyMaker *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__MultiValueSorter = {"_p_Xapian__MultiValueSorter", "Xapian::MultiValueSorter *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__NetworkError = {"_p_Xapian__NetworkError", "Xapian::NetworkError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__NetworkTimeoutError = {"_p_Xapian__NetworkTimeoutError", "Xapian::NetworkTimeoutError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__NumberValueRangeProcessor = {"_p_Xapian__NumberValueRangeProcessor", "Xapian::NumberValueRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__PositionIterator = {"_p_Xapian__PositionIterator", "Xapian::PositionIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__PostingIterator = {"_p_Xapian__PostingIterator", "Xapian::PostingIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__PostingSource = {"_p_Xapian__PostingSource", "Xapian::PostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Query = {"_p_Xapian__Query", "Xapian::Query *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__QueryParser = {"_p_Xapian__QueryParser", "Xapian::QueryParser *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__QueryParserError = {"_p_Xapian__QueryParserError", "Xapian::QueryParserError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__RSet = {"_p_Xapian__RSet", "Xapian::RSet *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__RangeError = {"_p_Xapian__RangeError", "Xapian::RangeError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Registry = {"_p_Xapian__Registry", "Xapian::Registry *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__RuntimeError = {"_p_Xapian__RuntimeError", "Xapian::RuntimeError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__SerialisationError = {"_p_Xapian__SerialisationError", "Xapian::SerialisationError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__SimpleStopper = {"_p_Xapian__SimpleStopper", "Xapian::SimpleStopper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Sorter = {"_p_Xapian__Sorter", "Xapian::Sorter *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Stem = {"_p_Xapian__Stem", "Xapian::Stem *", 0, 0, (void*)0, 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*)0, 0};
static swig_type_info _swigt__p_Xapian__StringValueRangeProcessor = {"_p_Xapian__StringValueRangeProcessor", "Xapian::StringValueRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__TermGenerator = {"_p_Xapian__TermGenerator", "Xapian::TermGenerator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__TermIterator = {"_p_Xapian__TermIterator", "Xapian::TermIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__TradWeight = {"_p_Xapian__TradWeight", "Xapian::TradWeight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__UnimplementedError = {"_p_Xapian__UnimplementedError", "Xapian::UnimplementedError *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueCountMatchSpy = {"_p_Xapian__ValueCountMatchSpy", "Xapian::ValueCountMatchSpy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueIterator = {"_p_Xapian__ValueIterator", "Xapian::ValueIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueMapPostingSource = {"_p_Xapian__ValueMapPostingSource", "Xapian::ValueMapPostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValuePostingSource = {"_p_Xapian__ValuePostingSource", "Xapian::ValuePostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueRangeProcessor = {"_p_Xapian__ValueRangeProcessor", "Xapian::ValueRangeProcessor *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueSetMatchDecider = {"_p_Xapian__ValueSetMatchDecider", "Xapian::ValueSetMatchDecider *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__ValueWeightPostingSource = {"_p_Xapian__ValueWeightPostingSource", "Xapian::ValueWeightPostingSource *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Weight = {"_p_Xapian__Weight", "Xapian::Weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__WritableDatabase = {"_p_Xapian__WritableDatabase", "Xapian::WritableDatabase *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_compaction_level = {"_p_compaction_level", "compaction_level *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_docid_order = {"_p_docid_order", "docid_order *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "Xapian::doclength *|double *|Xapian::weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_feature_flag = {"_p_feature_flag", "feature_flag *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_first_type = {"_p_first_type", "first_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|Xapian::doccount_diff *|Xapian::termcount_diff *|Xapian::termpos_diff *|Xapian::valueno_diff *|Xapian::percent *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_op = {"_p_op", "op *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__invalid_argument = {"_p_std__invalid_argument", "std::invalid_argument *", 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_swig__SwigPyIterator = {"_p_swig__SwigPyIterator", "swig::SwigPyIterator *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "Xapian::timeout *|unsigned int *|Xapian::doccount *|Xapian::termcount *|Xapian::valueno *|Xapian::docid *|Xapian::termpos *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_Xapian__AssertionError,
  &_swigt__p_Xapian__BM25Weight,
  &_swigt__p_Xapian__BoolWeight,
  &_swigt__p_Xapian__Compactor,
  &_swigt__p_Xapian__Database,
  &_swigt__p_Xapian__DatabaseCorruptError,
  &_swigt__p_Xapian__DatabaseCreateError,
  &_swigt__p_Xapian__DatabaseError,
  &_swigt__p_Xapian__DatabaseLockError,
  &_swigt__p_Xapian__DatabaseModifiedError,
  &_swigt__p_Xapian__DatabaseOpeningError,
  &_swigt__p_Xapian__DatabaseVersionError,
  &_swigt__p_Xapian__DateValueRangeProcessor,
  &_swigt__p_Xapian__DecreasingValueWeightPostingSource,
  &_swigt__p_Xapian__DocNotFoundError,
  &_swigt__p_Xapian__Document,
  &_swigt__p_Xapian__ESet,
  &_swigt__p_Xapian__ESetIterator,
  &_swigt__p_Xapian__Enquire,
  &_swigt__p_Xapian__Error,
  &_swigt__p_Xapian__ExpandDecider,
  &_swigt__p_Xapian__FeatureUnavailableError,
  &_swigt__p_Xapian__FixedWeightPostingSource,
  &_swigt__p_Xapian__InternalError,
  &_swigt__p_Xapian__InvalidArgumentError,
  &_swigt__p_Xapian__InvalidOperationError,
  &_swigt__p_Xapian__KeyMaker,
  &_swigt__p_Xapian__LogicError,
  &_swigt__p_Xapian__MSet,
  &_swigt__p_Xapian__MSetIterator,
  &_swigt__p_Xapian__MatchDecider,
  &_swigt__p_Xapian__MatchSpy,
  &_swigt__p_Xapian__MultiValueKeyMaker,
  &_swigt__p_Xapian__MultiValueSorter,
  &_swigt__p_Xapian__NetworkError,
  &_swigt__p_Xapian__NetworkTimeoutError,
  &_swigt__p_Xapian__NumberValueRangeProcessor,
  &_swigt__p_Xapian__PositionIterator,
  &_swigt__p_Xapian__PostingIterator,
  &_swigt__p_Xapian__PostingSource,
  &_swigt__p_Xapian__Query,
  &_swigt__p_Xapian__QueryParser,
  &_swigt__p_Xapian__QueryParserError,
  &_swigt__p_Xapian__RSet,
  &_swigt__p_Xapian__RangeError,
  &_swigt__p_Xapian__Registry,
  &_swigt__p_Xapian__RuntimeError,
  &_swigt__p_Xapian__SerialisationError,
  &_swigt__p_Xapian__SimpleStopper,
  &_swigt__p_Xapian__Sorter,
  &_swigt__p_Xapian__Stem,
  &_swigt__p_Xapian__StemImplementation,
  &_swigt__p_Xapian__Stopper,
  &_swigt__p_Xapian__StringValueRangeProcessor,
  &_swigt__p_Xapian__TermGenerator,
  &_swigt__p_Xapian__TermIterator,
  &_swigt__p_Xapian__TradWeight,
  &_swigt__p_Xapian__UnimplementedError,
  &_swigt__p_Xapian__ValueCountMatchSpy,
  &_swigt__p_Xapian__ValueIterator,
  &_swigt__p_Xapian__ValueMapPostingSource,
  &_swigt__p_Xapian__ValuePostingSource,
  &_swigt__p_Xapian__ValueRangeProcessor,
  &_swigt__p_Xapian__ValueSetMatchDecider,
  &_swigt__p_Xapian__ValueWeightPostingSource,
  &_swigt__p_Xapian__Weight,
  &_swigt__p_Xapian__WritableDatabase,
  &_swigt__p_char,
  &_swigt__p_compaction_level,
  &_swigt__p_docid_order,
  &_swigt__p_double,
  &_swigt__p_feature_flag,
  &_swigt__p_first_type,
  &_swigt__p_int,
  &_swigt__p_op,
  &_swigt__p_second_type,
  &_swigt__p_std__invalid_argument,
  &_swigt__p_std__string,
  &_swigt__p_stem_strategy,
  &_swigt__p_swig__SwigPyIterator,
  &_swigt__p_unsigned_int,
};

static swig_cast_info _swigc__p_Xapian__AssertionError[] = {  {&_swigt__p_Xapian__AssertionError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BM25Weight[] = {  {&_swigt__p_Xapian__BM25Weight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__BoolWeight[] = {  {&_swigt__p_Xapian__BoolWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Compactor[] = {  {&_swigt__p_Xapian__Compactor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Database[] = {  {&_swigt__p_Xapian__Database, 0, 0, 0},  {&_swigt__p_Xapian__WritableDatabase, _p_Xapian__WritableDatabaseTo_p_Xapian__Database, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseCorruptError[] = {  {&_swigt__p_Xapian__DatabaseCorruptError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseCreateError[] = {  {&_swigt__p_Xapian__DatabaseCreateError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseError[] = {  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseError, 0, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__DatabaseError, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__DatabaseError, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseLockError[] = {  {&_swigt__p_Xapian__DatabaseLockError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseModifiedError[] = {  {&_swigt__p_Xapian__DatabaseModifiedError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseOpeningError[] = {  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__DatabaseOpeningError, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DatabaseVersionError[] = {  {&_swigt__p_Xapian__DatabaseVersionError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DateValueRangeProcessor[] = {  {&_swigt__p_Xapian__DateValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DecreasingValueWeightPostingSource[] = {  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__DocNotFoundError[] = {  {&_swigt__p_Xapian__DocNotFoundError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Document[] = {  {&_swigt__p_Xapian__Document, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ESet[] = {  {&_swigt__p_Xapian__ESet, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ESetIterator[] = {  {&_swigt__p_Xapian__ESetIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Enquire[] = {  {&_swigt__p_Xapian__Enquire, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Error[] = {  {&_swigt__p_Xapian__DocNotFoundError, _p_Xapian__DocNotFoundErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__LogicError, _p_Xapian__LogicErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__FeatureUnavailableError, _p_Xapian__FeatureUnavailableErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__InternalError, _p_Xapian__InternalErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__UnimplementedError, _p_Xapian__UnimplementedErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__RangeError, _p_Xapian__RangeErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__RuntimeError, _p_Xapian__RuntimeErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseError, _p_Xapian__DatabaseErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__InvalidOperationError, _p_Xapian__InvalidOperationErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__AssertionError, _p_Xapian__AssertionErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__SerialisationError, _p_Xapian__SerialisationErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__Error, 0, 0, 0},  {&_swigt__p_Xapian__NetworkError, _p_Xapian__NetworkErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__InvalidArgumentError, _p_Xapian__InvalidArgumentErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__Error, 0, 0},  {&_swigt__p_Xapian__QueryParserError, _p_Xapian__QueryParserErrorTo_p_Xapian__Error, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ExpandDecider[] = {  {&_swigt__p_Xapian__ExpandDecider, 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__FixedWeightPostingSource[] = {  {&_swigt__p_Xapian__FixedWeightPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__InternalError[] = {  {&_swigt__p_Xapian__InternalError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__InvalidArgumentError[] = {  {&_swigt__p_Xapian__InvalidArgumentError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__InvalidOperationError[] = {  {&_swigt__p_Xapian__InvalidOperationError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__KeyMaker[] = {  {&_swigt__p_Xapian__Sorter, _p_Xapian__SorterTo_p_Xapian__KeyMaker, 0, 0},  {&_swigt__p_Xapian__MultiValueSorter, _p_Xapian__MultiValueSorterTo_p_Xapian__KeyMaker, 0, 0},  {&_swigt__p_Xapian__KeyMaker, 0, 0, 0},  {&_swigt__p_Xapian__MultiValueKeyMaker, _p_Xapian__MultiValueKeyMakerTo_p_Xapian__KeyMaker, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__LogicError[] = {  {&_swigt__p_Xapian__AssertionError, _p_Xapian__AssertionErrorTo_p_Xapian__LogicError, 0, 0},  {&_swigt__p_Xapian__InvalidOperationError, _p_Xapian__InvalidOperationErrorTo_p_Xapian__LogicError, 0, 0},  {&_swigt__p_Xapian__UnimplementedError, _p_Xapian__UnimplementedErrorTo_p_Xapian__LogicError, 0, 0},  {&_swigt__p_Xapian__LogicError, 0, 0, 0},  {&_swigt__p_Xapian__InvalidArgumentError, _p_Xapian__InvalidArgumentErrorTo_p_Xapian__LogicError, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MSet[] = {  {&_swigt__p_Xapian__MSet, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MSetIterator[] = {  {&_swigt__p_Xapian__MSetIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MatchDecider[] = {  {&_swigt__p_Xapian__MatchDecider, 0, 0, 0},  {&_swigt__p_Xapian__ValueSetMatchDecider, _p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MatchSpy[] = {  {&_swigt__p_Xapian__MatchSpy, 0, 0, 0},  {&_swigt__p_Xapian__ValueCountMatchSpy, _p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MultiValueKeyMaker[] = {  {&_swigt__p_Xapian__MultiValueKeyMaker, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__MultiValueSorter[] = {  {&_swigt__p_Xapian__MultiValueSorter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__NetworkError[] = {  {&_swigt__p_Xapian__NetworkError, 0, 0, 0},  {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__NetworkError, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__NetworkTimeoutError[] = {  {&_swigt__p_Xapian__NetworkTimeoutError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__NumberValueRangeProcessor[] = {  {&_swigt__p_Xapian__NumberValueRangeProcessor, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PositionIterator[] = {  {&_swigt__p_Xapian__PositionIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PostingIterator[] = {  {&_swigt__p_Xapian__PostingIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__PostingSource[] = {  {&_swigt__p_Xapian__PostingSource, 0, 0, 0},  {&_swigt__p_Xapian__ValuePostingSource, _p_Xapian__ValuePostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource, 0, 0},  {&_swigt__p_Xapian__FixedWeightPostingSource, _p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Query[] = {  {&_swigt__p_Xapian__Query, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__QueryParser[] = {  {&_swigt__p_Xapian__QueryParser, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__QueryParserError[] = {  {&_swigt__p_Xapian__QueryParserError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__RSet[] = {  {&_swigt__p_Xapian__RSet, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__RangeError[] = {  {&_swigt__p_Xapian__RangeError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Registry[] = {  {&_swigt__p_Xapian__Registry, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__RuntimeError[] = {  {&_swigt__p_Xapian__DocNotFoundError, _p_Xapian__DocNotFoundErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseLockError, _p_Xapian__DatabaseLockErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__NetworkTimeoutError, _p_Xapian__NetworkTimeoutErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__FeatureUnavailableError, _p_Xapian__FeatureUnavailableErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseCreateError, _p_Xapian__DatabaseCreateErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__InternalError, _p_Xapian__InternalErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseModifiedError, _p_Xapian__DatabaseModifiedErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseError, _p_Xapian__DatabaseErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__RangeError, _p_Xapian__RangeErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__RuntimeError, 0, 0, 0},  {&_swigt__p_Xapian__DatabaseOpeningError, _p_Xapian__DatabaseOpeningErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__SerialisationError, _p_Xapian__SerialisationErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseVersionError, _p_Xapian__DatabaseVersionErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__NetworkError, _p_Xapian__NetworkErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__DatabaseCorruptError, _p_Xapian__DatabaseCorruptErrorTo_p_Xapian__RuntimeError, 0, 0},  {&_swigt__p_Xapian__QueryParserError, _p_Xapian__QueryParserErrorTo_p_Xapian__RuntimeError, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__SerialisationError[] = {  {&_swigt__p_Xapian__SerialisationError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__SimpleStopper[] = {  {&_swigt__p_Xapian__SimpleStopper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Sorter[] = {  {&_swigt__p_Xapian__Sorter, 0, 0, 0},  {&_swigt__p_Xapian__MultiValueSorter, _p_Xapian__MultiValueSorterTo_p_Xapian__Sorter, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Stem[] = {  {&_swigt__p_Xapian__Stem, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__StemImplementation[] = {  {&_swigt__p_Xapian__StemImplementation, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Stopper[] = {  {&_swigt__p_Xapian__Stopper, 0, 0, 0},  {&_swigt__p_Xapian__SimpleStopper, _p_Xapian__SimpleStopperTo_p_Xapian__Stopper, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__StringValueRangeProcessor[] = {  {&_swigt__p_Xapian__StringValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__StringValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TermGenerator[] = {  {&_swigt__p_Xapian__TermGenerator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TermIterator[] = {  {&_swigt__p_Xapian__TermIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__TradWeight[] = {  {&_swigt__p_Xapian__TradWeight, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__UnimplementedError[] = {  {&_swigt__p_Xapian__UnimplementedError, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueCountMatchSpy[] = {  {&_swigt__p_Xapian__ValueCountMatchSpy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueIterator[] = {  {&_swigt__p_Xapian__ValueIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueMapPostingSource[] = {  {&_swigt__p_Xapian__ValueMapPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValuePostingSource[] = {  {&_swigt__p_Xapian__ValuePostingSource, 0, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueRangeProcessor[] = {  {&_swigt__p_Xapian__ValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__StringValueRangeProcessor, _p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueSetMatchDecider[] = {  {&_swigt__p_Xapian__ValueSetMatchDecider, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueWeightPostingSource[] = {  {&_swigt__p_Xapian__ValueWeightPostingSource, 0, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Weight[] = {  {&_swigt__p_Xapian__BoolWeight, _p_Xapian__BoolWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TradWeight, _p_Xapian__TradWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__Weight, 0, 0, 0},  {&_swigt__p_Xapian__BM25Weight, _p_Xapian__BM25WeightTo_p_Xapian__Weight, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__WritableDatabase[] = {  {&_swigt__p_Xapian__WritableDatabase, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_compaction_level[] = {  {&_swigt__p_compaction_level, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_docid_order[] = {  {&_swigt__p_docid_order, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_feature_flag[] = {  {&_swigt__p_feature_flag, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_first_type[] = {  {&_swigt__p_first_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_op[] = {  {&_swigt__p_op, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_second_type[] = {  {&_swigt__p_second_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__invalid_argument[] = {  {&_swigt__p_std__invalid_argument, 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_swig__SwigPyIterator[] = {  {&_swigt__p_swig__SwigPyIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_Xapian__AssertionError,
  _swigc__p_Xapian__BM25Weight,
  _swigc__p_Xapian__BoolWeight,
  _swigc__p_Xapian__Compactor,
  _swigc__p_Xapian__Database,
  _swigc__p_Xapian__DatabaseCorruptError,
  _swigc__p_Xapian__DatabaseCreateError,
  _swigc__p_Xapian__DatabaseError,
  _swigc__p_Xapian__DatabaseLockError,
  _swigc__p_Xapian__DatabaseModifiedError,
  _swigc__p_Xapian__DatabaseOpeningError,
  _swigc__p_Xapian__DatabaseVersionError,
  _swigc__p_Xapian__DateValueRangeProcessor,
  _swigc__p_Xapian__DecreasingValueWeightPostingSource,
  _swigc__p_Xapian__DocNotFoundError,
  _swigc__p_Xapian__Document,
  _swigc__p_Xapian__ESet,
  _swigc__p_Xapian__ESetIterator,
  _swigc__p_Xapian__Enquire,
  _swigc__p_Xapian__Error,
  _swigc__p_Xapian__ExpandDecider,
  _swigc__p_Xapian__FeatureUnavailableError,
  _swigc__p_Xapian__FixedWeightPostingSource,
  _swigc__p_Xapian__InternalError,
  _swigc__p_Xapian__InvalidArgumentError,
  _swigc__p_Xapian__InvalidOperationError,
  _swigc__p_Xapian__KeyMaker,
  _swigc__p_Xapian__LogicError,
  _swigc__p_Xapian__MSet,
  _swigc__p_Xapian__MSetIterator,
  _swigc__p_Xapian__MatchDecider,
  _swigc__p_Xapian__MatchSpy,
  _swigc__p_Xapian__MultiValueKeyMaker,
  _swigc__p_Xapian__MultiValueSorter,
  _swigc__p_Xapian__NetworkError,
  _swigc__p_Xapian__NetworkTimeoutError,
  _swigc__p_Xapian__NumberValueRangeProcessor,
  _swigc__p_Xapian__PositionIterator,
  _swigc__p_Xapian__PostingIterator,
  _swigc__p_Xapian__PostingSource,
  _swigc__p_Xapian__Query,
  _swigc__p_Xapian__QueryParser,
  _swigc__p_Xapian__QueryParserError,
  _swigc__p_Xapian__RSet,
  _swigc__p_Xapian__RangeError,
  _swigc__p_Xapian__Registry,
  _swigc__p_Xapian__RuntimeError,
  _swigc__p_Xapian__SerialisationError,
  _swigc__p_Xapian__SimpleStopper,
  _swigc__p_Xapian__Sorter,
  _swigc__p_Xapian__Stem,
  _swigc__p_Xapian__StemImplementation,
  _swigc__p_Xapian__Stopper,
  _swigc__p_Xapian__StringValueRangeProcessor,
  _swigc__p_Xapian__TermGenerator,
  _swigc__p_Xapian__TermIterator,
  _swigc__p_Xapian__TradWeight,
  _swigc__p_Xapian__UnimplementedError,
  _swigc__p_Xapian__ValueCountMatchSpy,
  _swigc__p_Xapian__ValueIterator,
  _swigc__p_Xapian__ValueMapPostingSource,
  _swigc__p_Xapian__ValuePostingSource,
  _swigc__p_Xapian__ValueRangeProcessor,
  _swigc__p_Xapian__ValueSetMatchDecider,
  _swigc__p_Xapian__ValueWeightPostingSource,
  _swigc__p_Xapian__Weight,
  _swigc__p_Xapian__WritableDatabase,
  _swigc__p_char,
  _swigc__p_compaction_level,
  _swigc__p_docid_order,
  _swigc__p_double,
  _swigc__p_feature_flag,
  _swigc__p_first_type,
  _swigc__p_int,
  _swigc__p_op,
  _swigc__p_second_type,
  _swigc__p_std__invalid_argument,
  _swigc__p_std__string,
  _swigc__p_stem_strategy,
  _swigc__p_swig__SwigPyIterator,
  _swigc__p_unsigned_int,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic 
 * memory is used. Also, since swig_type_info structures store pointers to 
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization. 
 * The idea is that swig generates all the structures that are needed. 
 * The runtime then collects these partially filled structures. 
 * The SWIG_InitializeModule function takes these initial arrays out of 
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial 
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded. 
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the 
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int found, init;
  
  clientdata = clientdata;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpeters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif



#ifdef __cplusplus
extern "C" {
#endif
  
  /* Python-specific SWIG API */
#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
  
  /* -----------------------------------------------------------------------------
   * global variable support code.
   * ----------------------------------------------------------------------------- */
  
  typedef struct swig_globalvar {
    char       *name;                  /* Name of global variable */
    PyObject *(*get_attr)(void);       /* Return the current value */
    int       (*set_attr)(PyObject *); /* Set the value */
    struct swig_globalvar *next;
  } swig_globalvar;
  
  typedef struct swig_varlinkobject {
    PyObject_HEAD
    swig_globalvar *vars;
  } swig_varlinkobject;
  
  SWIGINTERN PyObject *
  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
#if PY_VERSION_HEX >= 0x03000000
    return PyUnicode_InternFromString("<Swig global variables>");
#else
    return PyString_FromString("<Swig global variables>");
#endif
  }
  
  SWIGINTERN PyObject *
  swig_varlink_str(swig_varlinkobject *v) {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *str = PyUnicode_InternFromString("(");
    PyObject *tail;
    PyObject *joined;
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      tail = PyUnicode_FromString(var->name);
      joined = PyUnicode_Concat(str, tail);
      Py_DecRef(str);
      Py_DecRef(tail);
      str = joined;
      if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        Py_DecRef(str);
        Py_DecRef(tail);
        str = joined;
      }
    }
    tail = PyUnicode_InternFromString(")");
    joined = PyUnicode_Concat(str, tail);
    Py_DecRef(str);
    Py_DecRef(tail);
    str = joined;
#else
    PyObject *str = PyString_FromString("(");
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
    }
    PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
    return str;
  }
  
  SWIGINTERN int
  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
    char *tmp;
    PyObject *str = swig_varlink_str(v);
    fprintf(fp,"Swig global variables ");
    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(str);
    return 0;
  }
  
  SWIGINTERN void
  swig_varlink_dealloc(swig_varlinkobject *v) {
    swig_globalvar *var = v->vars;
    while (var) {
      swig_globalvar *n = var->next;
      free(var->name);
      free(var);
      var = n;
    }
  }
  
  SWIGINTERN PyObject *
  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
    PyObject *res = NULL;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->get_attr)();
        break;
      }
      var = var->next;
    }
    if (res == NULL && !PyErr_Occurred()) {
      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
    }
    return res;
  }
  
  SWIGINTERN int
  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
    int res = 1;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->set_attr)(p);
        break;
      }
      var = var->next;
    }
    if (res == 1 && !PyErr_Occurred()) {
      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
    }
    return res;
  }
  
  SWIGINTERN PyTypeObject*
  swig_varlink_type(void) {
    static char varlink__doc__[] = "Swig var link object";
    static PyTypeObject varlink_type;
    static int type_init = 0;
    if (!type_init) {
      const PyTypeObject tmp = {
        /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000
        PyVarObject_HEAD_INIT(NULL, 0)
#else
        PyObject_HEAD_INIT(NULL)
        0,                                  /* ob_size */
#endif
        (char *)"swigvarlink",              /* tp_name */
        sizeof(swig_varlinkobject),         /* tp_basicsize */
        0,                                  /* tp_itemsize */
        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
        (printfunc) swig_varlink_print,     /* tp_print */
        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
        0,                                  /* tp_compare */
        (reprfunc) swig_varlink_repr,       /* tp_repr */
        0,                                  /* tp_as_number */
        0,                                  /* tp_as_sequence */
        0,                                  /* tp_as_mapping */
        0,                                  /* tp_hash */
        0,                                  /* tp_call */
        (reprfunc) swig_varlink_str,        /* tp_str */
        0,                                  /* tp_getattro */
        0,                                  /* tp_setattro */
        0,                                  /* tp_as_buffer */
        0,                                  /* tp_flags */
        varlink__doc__,                     /* tp_doc */
        0,                                  /* tp_traverse */
        0,                                  /* tp_clear */
        0,                                  /* tp_richcompare */
        0,                                  /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
        0,                                  /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
        0,                                  /* tp_version */
#endif
#ifdef COUNT_ALLOCS
        0,0,0,0                             /* tp_alloc -> tp_next */
#endif
      };
      varlink_type = tmp;
      type_init = 1;
#if PY_VERSION_HEX < 0x02020000
      varlink_type.ob_type = &PyType_Type;
#else
      if (PyType_Ready(&varlink_type) < 0)
      return NULL;
#endif
    }
    return &varlink_type;
  }
  
  /* Create a variable linking object for use later */
  SWIGINTERN PyObject *
  SWIG_Python_newvarlink(void) {
    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
    if (result) {
      result->vars = 0;
    }
    return ((PyObject*) result);
  }
  
  SWIGINTERN void 
  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
    swig_varlinkobject *v = (swig_varlinkobject *) p;
    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
    if (gv) {
      size_t size = strlen(name)+1;
      gv->name = (char *)malloc(size);
      if (gv->name) {
        strncpy(gv->name,name,size);
        gv->get_attr = get_attr;
        gv->set_attr = set_attr;
        gv->next = v->vars;
      }
    }
    v->vars = gv;
  }
  
  SWIGINTERN PyObject *
  SWIG_globals(void) {
    static PyObject *_SWIG_globals = 0; 
    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
    return _SWIG_globals;
  }
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_PY_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        PyDict_SetItemString(d, constants[i].name, obj);
        Py_DECREF(obj);
      }
    }
  }
  
  /* -----------------------------------------------------------------------------*/
  /* Fix SwigMethods to carry the callback ptrs when needed */
  /* -----------------------------------------------------------------------------*/
  
  SWIGINTERN void
  SWIG_Python_FixMethods(PyMethodDef *methods,
    swig_const_info *const_table,
    swig_type_info **types,
    swig_type_info **types_initial) {
    size_t i;
    for (i = 0; methods[i].ml_name; ++i) {
      const char *c = methods[i].ml_doc;
      if (c && (c = strstr(c, "swig_ptr: "))) {
        int j;
        swig_const_info *ci = 0;
        const char *name = c + 10;
        for (j = 0; const_table[j].type; ++j) {
          if (strncmp(const_table[j].name, name, 
              strlen(const_table[j].name)) == 0) {
            ci = &(const_table[j]);
            break;
          }
        }
        if (ci) {
          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
          if (ptr) {
            size_t shift = (ci->ptype) - types;
            swig_type_info *ty = types_initial[shift];
            size_t ldoc = (c - methods[i].ml_doc);
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
            char *ndoc = (char*)malloc(ldoc + lptr + 10);
            if (ndoc) {
              char *buff = ndoc;
              strncpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              strncpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
  PyObject *m, *d, *md;
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
# if PY_VERSION_HEX >= 0x03020000
    PyModuleDef_HEAD_INIT,
# else
    {
      PyObject_HEAD_INIT(NULL)
      NULL, /* m_init */
      0,    /* m_index */
      NULL, /* m_copy */
    },
# endif
    (char *) SWIG_name,
    NULL,
    -1,
    SwigMethods,
    NULL,
    NULL,
    NULL,
    NULL
  };
#endif
  
#if defined(SWIGPYTHON_BUILTIN)
  static SwigPyClientData SwigPyObject_clientdata = {
    0, 0, 0, 0, 0, 0, 0
  };
  static PyGetSetDef this_getset_def = {
    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  };
  static SwigPyGetSet thisown_getset_closure = {
    (PyCFunction) SwigPyObject_own,
    (PyCFunction) SwigPyObject_own
  };
  static PyGetSetDef thisown_getset_def = {
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  };
  PyObject *metatype_args;
  PyTypeObject *builtin_pytype;
  int builtin_base_count;
  swig_type_info *builtin_basetype;
  PyObject *tuple;
  PyGetSetDescrObject *static_getset;
  PyTypeObject *metatype;
  SwigPyClientData *cd;
  PyObject *public_interface, *public_symbol;
  PyObject *this_descr;
  PyObject *thisown_descr;
  int i;
  
  (void)builtin_pytype;
  (void)builtin_base_count;
  (void)builtin_basetype;
  (void)tuple;
  (void)static_getset;
  
  /* metatype is used to implement static member variables. */
  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
  assert(metatype_args);
  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
  assert(metatype);
  Py_DECREF(metatype_args);
  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
  assert(PyType_Ready(metatype) >= 0);
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#if PY_VERSION_HEX >= 0x03000000
  m = PyModule_Create(&SWIG_module);
#else
  m = Py_InitModule((char *) SWIG_name, SwigMethods);
#endif
  md = d = PyModule_GetDict(m);
  
  SWIG_InitializeModule(0);
  
#ifdef SWIGPYTHON_BUILTIN
  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  assert(SwigPyObject_stype);
  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  if (!cd) {
    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000
    return NULL;
# else
    return;
# endif
  }
  
  /* All objects have a 'this' attribute */
  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  (void)this_descr;
  
  /* All objects have a 'thisown' attribute */
  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  (void)thisown_descr;
  
  public_interface = PyList_New(0);
  public_symbol = 0;
  (void)public_symbol;
  
  PyDict_SetItemString(md, "__all__", public_interface);
  Py_DECREF(public_interface);
  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  for (i = 0; swig_const_table[i].name != 0; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
#endif
  
  SWIG_InstallConstants(d,swig_const_table);
  
  SWIG_Python_SetConstant(d, "BAD_VALUENO",SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Xapian::BAD_VALUENO)));
  SWIG_Python_SetConstant(d, "MSET_DID",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "MSET_WT",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "MSET_RANK",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "MSET_PERCENT",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "MSET_DOCUMENT",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "ESET_TNAME",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "ESET_WT",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "Enquire_ASCENDING",SWIG_From_int(static_cast< int >(Xapian::Enquire::ASCENDING)));
  SWIG_Python_SetConstant(d, "Enquire_DESCENDING",SWIG_From_int(static_cast< int >(Xapian::Enquire::DESCENDING)));
  SWIG_Python_SetConstant(d, "Enquire_DONT_CARE",SWIG_From_int(static_cast< int >(Xapian::Enquire::DONT_CARE)));
  SWIG_Python_SetConstant(d, "Enquire_INCLUDE_QUERY_TERMS",SWIG_From_int(static_cast< int >(Xapian::Enquire::INCLUDE_QUERY_TERMS)));
  SWIG_Python_SetConstant(d, "Enquire_USE_EXACT_TERMFREQ",SWIG_From_int(static_cast< int >(Xapian::Enquire::USE_EXACT_TERMFREQ)));
  SWIG_Python_SetConstant(d, "DB_CREATE_OR_OPEN",SWIG_From_int(static_cast< int >(Xapian::DB_CREATE_OR_OPEN)));
  SWIG_Python_SetConstant(d, "DB_CREATE",SWIG_From_int(static_cast< int >(Xapian::DB_CREATE)));
  SWIG_Python_SetConstant(d, "DB_CREATE_OR_OVERWRITE",SWIG_From_int(static_cast< int >(Xapian::DB_CREATE_OR_OVERWRITE)));
  SWIG_Python_SetConstant(d, "DB_OPEN",SWIG_From_int(static_cast< int >(Xapian::DB_OPEN)));
  SWIG_Python_SetConstant(d, "Query_OP_AND",SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND)));
  SWIG_Python_SetConstant(d, "Query_OP_OR",SWIG_From_int(static_cast< int >(Xapian::Query::OP_OR)));
  SWIG_Python_SetConstant(d, "Query_OP_AND_NOT",SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND_NOT)));
  SWIG_Python_SetConstant(d, "Query_OP_XOR",SWIG_From_int(static_cast< int >(Xapian::Query::OP_XOR)));
  SWIG_Python_SetConstant(d, "Query_OP_AND_MAYBE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND_MAYBE)));
  SWIG_Python_SetConstant(d, "Query_OP_FILTER",SWIG_From_int(static_cast< int >(Xapian::Query::OP_FILTER)));
  SWIG_Python_SetConstant(d, "Query_OP_NEAR",SWIG_From_int(static_cast< int >(Xapian::Query::OP_NEAR)));
  SWIG_Python_SetConstant(d, "Query_OP_PHRASE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_PHRASE)));
  SWIG_Python_SetConstant(d, "Query_OP_VALUE_RANGE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_RANGE)));
  SWIG_Python_SetConstant(d, "Query_OP_SCALE_WEIGHT",SWIG_From_int(static_cast< int >(Xapian::Query::OP_SCALE_WEIGHT)));
  SWIG_Python_SetConstant(d, "Query_OP_ELITE_SET",SWIG_From_int(static_cast< int >(Xapian::Query::OP_ELITE_SET)));
  SWIG_Python_SetConstant(d, "Query_OP_VALUE_GE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_GE)));
  SWIG_Python_SetConstant(d, "Query_OP_VALUE_LE",SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_LE)));
  SWIG_Python_SetConstant(d, "Query_OP_SYNONYM",SWIG_From_int(static_cast< int >(Xapian::Query::OP_SYNONYM)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_BOOLEAN",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_PHRASE",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PHRASE)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_LOVEHATE",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_LOVEHATE)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_BOOLEAN_ANY_CASE",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_WILDCARD",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_WILDCARD)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_PURE_NOT",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PURE_NOT)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_PARTIAL",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PARTIAL)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_SPELLING_CORRECTION",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SPELLING_CORRECTION)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_SYNONYM",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SYNONYM)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_AUTO_SYNONYMS",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_SYNONYMS)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_AUTO_MULTIWORD_SYNONYMS",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS)));
  SWIG_Python_SetConstant(d, "QueryParser_FLAG_DEFAULT",SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_DEFAULT)));
  SWIG_Python_SetConstant(d, "QueryParser_STEM_NONE",SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_NONE)));
  SWIG_Python_SetConstant(d, "QueryParser_STEM_SOME",SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_SOME)));
  SWIG_Python_SetConstant(d, "QueryParser_STEM_ALL",SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_ALL)));
  SWIG_Python_SetConstant(d, "QueryParser_STEM_ALL_Z",SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_ALL_Z)));
  SWIG_Python_SetConstant(d, "TermGenerator_FLAG_SPELLING",SWIG_From_int(static_cast< int >(Xapian::TermGenerator::FLAG_SPELLING)));
  SWIG_Python_SetConstant(d, "TermGenerator_STEM_NONE",SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_NONE)));
  SWIG_Python_SetConstant(d, "TermGenerator_STEM_SOME",SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_SOME)));
  SWIG_Python_SetConstant(d, "TermGenerator_STEM_ALL",SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_ALL)));
  SWIG_Python_SetConstant(d, "TermGenerator_STEM_ALL_Z",SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_ALL_Z)));
  SWIG_Python_SetConstant(d, "Compactor_STANDARD",SWIG_From_int(static_cast< int >(Xapian::Compactor::STANDARD)));
  SWIG_Python_SetConstant(d, "Compactor_FULL",SWIG_From_int(static_cast< int >(Xapian::Compactor::FULL)));
  SWIG_Python_SetConstant(d, "Compactor_FULLER",SWIG_From_int(static_cast< int >(Xapian::Compactor::FULLER)));
  
  /* Initialize threading */
  SWIG_PYTHON_INITIALIZE_THREADS;
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

