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


#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



#include <stdio.h>
#include <tcl.h>
#include <errno.h>
#include <stdlib.h>
#include <stdarg.h>
#include <ctype.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



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

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


SWIGINTERN void
SWIG_Tcl_SetErrorObj(Tcl_Interp *interp, const char *ctype, Tcl_Obj *obj)
{
  Tcl_ResetResult(interp);
  Tcl_SetObjResult(interp, obj);
  Tcl_SetErrorCode(interp, "SWIG", ctype, NULL);
}

SWIGINTERN void
SWIG_Tcl_SetErrorMsg(Tcl_Interp *interp, const char *ctype, const char *mesg)
{
  Tcl_ResetResult(interp);
  Tcl_SetErrorCode(interp, "SWIG", ctype, NULL);
  Tcl_AppendResult(interp, ctype, " ", mesg, NULL);
  /*
  Tcl_AddErrorInfo(interp, ctype);
  Tcl_AddErrorInfo(interp, " ");
  Tcl_AddErrorInfo(interp, mesg);
  */
}

SWIGINTERNINLINE void
SWIG_Tcl_AddErrorMsg(Tcl_Interp *interp, const char* mesg)
{
  Tcl_AddErrorInfo(interp, mesg);
}



/* -----------------------------------------------------------------------------
 * SWIG API. Portion that goes into the runtime
 * ----------------------------------------------------------------------------- */
#ifdef __cplusplus
extern "C" {
#endif

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

/* Constant Types */
#define SWIG_TCL_POINTER 4
#define SWIG_TCL_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;

typedef int   (*swig_wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
typedef int   (*swig_wrapper_func)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
typedef char *(*swig_variable_func)(ClientData, Tcl_Interp *, char *, char *, int);
typedef void  (*swig_delete_func)(ClientData);

typedef struct swig_method {
  const char     *name;
  swig_wrapper   method;
} swig_method;

typedef struct swig_attribute {
  const char     *name;
  swig_wrapper   getmethod;
  swig_wrapper   setmethod;
} swig_attribute;

typedef struct swig_class {
  const char         *name;
  swig_type_info   **type;
  swig_wrapper       constructor;
  void              (*destructor)(void *);
  swig_method        *methods;
  swig_attribute     *attributes;
  struct swig_class **bases;
  const char              **base_names;
  swig_module_info   *module;
  Tcl_HashTable       hashtable;
} swig_class;

typedef struct swig_instance {
  Tcl_Obj       *thisptr;
  void          *thisvalue;
  swig_class   *classptr;
  int            destroy;
  Tcl_Command    cmdtok;
} swig_instance;

/* Structure for command table */
typedef struct {
  const char *name;
  int       (*wrapper)(ClientData, Tcl_Interp *, int, Tcl_Obj *CONST []);
  ClientData  clientdata;
} swig_command_info;

/* Structure for variable linking table */
typedef struct {
  const char *name;
  void *addr;
  char * (*get)(ClientData, Tcl_Interp *, char *, char *, int);
  char * (*set)(ClientData, Tcl_Interp *, char *, char *, int);
} swig_var_info;


/* -----------------------------------------------------------------------------*
 *  Install a constant object 
 * -----------------------------------------------------------------------------*/

static Tcl_HashTable   swigconstTable;
static int             swigconstTableinit = 0;

SWIGINTERN void
SWIG_Tcl_SetConstantObj(Tcl_Interp *interp, const char* name, Tcl_Obj *obj) {
  int newobj;
  Tcl_ObjSetVar2(interp,Tcl_NewStringObj(name,-1), NULL, obj, TCL_GLOBAL_ONLY);
  Tcl_SetHashValue(Tcl_CreateHashEntry(&swigconstTable, name, &newobj), (ClientData) obj);
}

SWIGINTERN Tcl_Obj *
SWIG_Tcl_GetConstantObj(const char *key) {
  Tcl_HashEntry *entryPtr;
  if (!swigconstTableinit) return 0;
  entryPtr = Tcl_FindHashEntry(&swigconstTable, key);
  if (entryPtr) {
    return (Tcl_Obj *) Tcl_GetHashValue(entryPtr);
  }
  return 0;
}

#ifdef __cplusplus
}
#endif



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

/* Common SWIG API */

/* for raw pointers */
#define SWIG_ConvertPtr(oc, ptr, ty, flags)             SWIG_Tcl_ConvertPtr(interp, oc, ptr, ty, flags)
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Tcl_NewPointerObj(ptr, type, flags)

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Tcl_ConvertPacked(interp, obj, ptr, sz, ty)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Tcl_NewPackedObj(ptr, sz, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_Tcl_ConvertPtr(interp, obj, pptr, type, flags)
#define SWIG_NewInstanceObj(thisvalue, type, flags)     SWIG_Tcl_NewInstanceObj(interp, thisvalue, type, flags)

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

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


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Tcl_GetModule((Tcl_Interp *) (clientdata))	     
#define SWIG_SetModule(clientdata, pointer)          	SWIG_Tcl_SetModule((Tcl_Interp *) (clientdata), pointer)


/* Error manipulation */

#define SWIG_ErrorType(code)                            SWIG_Tcl_ErrorType(code)                                      
#define SWIG_Error(code, msg)            		SWIG_Tcl_SetErrorMsg(interp, SWIG_Tcl_ErrorType(code), msg)
#define SWIG_fail                        		goto fail						    


/* Tcl-specific SWIG API */

#define SWIG_Acquire(ptr)                               SWIG_Tcl_Acquire(ptr)                                     
#define SWIG_MethodCommand                           	SWIG_Tcl_MethodCommand				       
#define SWIG_Disown(ptr)                             	SWIG_Tcl_Disown(ptr)				       
#define SWIG_ConvertPtrFromString(c, ptr, ty, flags) 	SWIG_Tcl_ConvertPtrFromString(interp, c, ptr, ty, flags)  
#define SWIG_MakePtr(c, ptr, ty, flags)              	SWIG_Tcl_MakePtr(c, ptr, ty, flags)		       
#define SWIG_PointerTypeFromString(c)                	SWIG_Tcl_PointerTypeFromString(c)			       
#define SWIG_GetArgs                                 	SWIG_Tcl_GetArgs					       
#define SWIG_GetConstantObj(key)                     	SWIG_Tcl_GetConstantObj(key)			       
#define SWIG_ObjectConstructor                       	SWIG_Tcl_ObjectConstructor				       
#define SWIG_Thisown(ptr)                            	SWIG_Tcl_Thisown(ptr)				       
#define SWIG_ObjectDelete                            	SWIG_Tcl_ObjectDelete				       


#define SWIG_TCL_DECL_ARGS_2(arg1, arg2)                (Tcl_Interp *interp SWIGUNUSED, arg1, arg2)
#define SWIG_TCL_CALL_ARGS_2(arg1, arg2)                (interp, arg1, arg2)
/* -----------------------------------------------------------------------------
 * pointers/data manipulation
 * ----------------------------------------------------------------------------- */

/* For backward compatibility only */
#define SWIG_POINTER_EXCEPTION  0
#define SWIG_GetConstant        SWIG_GetConstantObj
#define SWIG_Tcl_GetConstant    SWIG_Tcl_GetConstantObj

#include "assert.h"

#ifdef __cplusplus
extern "C" {
#endif

/* Object support */

SWIGRUNTIME Tcl_HashTable*
SWIG_Tcl_ObjectTable(void) {
  static Tcl_HashTable  swigobjectTable;
  static int            swigobjectTableinit = 0;
  if (!swigobjectTableinit) {
    Tcl_InitHashTable(&swigobjectTable, TCL_ONE_WORD_KEYS);
    swigobjectTableinit = 1;
  }
  return &swigobjectTable;
}

/* Acquire ownership of a pointer */
SWIGRUNTIME void
SWIG_Tcl_Acquire(void *ptr) {
  int newobj;
  Tcl_CreateHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr, &newobj);
}

SWIGRUNTIME int
SWIG_Tcl_Thisown(void *ptr) {
  if (Tcl_FindHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr)) {
    return 1;
  }
  return 0;
}

/* Disown a pointer.  Returns 1 if we owned it to begin with */
SWIGRUNTIME int
SWIG_Tcl_Disown(void *ptr) {
  Tcl_HashEntry *entryPtr = Tcl_FindHashEntry(SWIG_Tcl_ObjectTable(), (char *) ptr);
  if (entryPtr) {
    Tcl_DeleteHashEntry(entryPtr);
    return 1;
  }
  return 0;
}

/* Convert a pointer value */
SWIGRUNTIME int
SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *interp, const char *c, void **ptr, swig_type_info *ty, int flags) {
  swig_cast_info *tc;
  /* Pointer values must start with leading underscore */
  while (*c != '_') {
    *ptr = (void *) 0;
    if (strcmp(c,"NULL") == 0) return SWIG_OK;

    /* Empty string: not a pointer */
    if (*c == 0) return SWIG_ERROR; 

    /* Hmmm. It could be an object name. */

    /* Check if this is a command at all. Prevents <c> cget -this         */
    /* from being called when c is not a command, firing the unknown proc */
    if (Tcl_VarEval(interp,"info commands ", c, (char *) NULL) == TCL_OK) {
      Tcl_Obj *result = Tcl_GetObjResult(interp);
      if (*(Tcl_GetStringFromObj(result, NULL)) == 0) {
        /* It's not a command, so it can't be a pointer */
        Tcl_ResetResult(interp);
        return SWIG_ERROR;
      }
    } else {
      /* This will only fail if the argument is multiple words. */
      /* Multiple words are also not commands.                  */
      Tcl_ResetResult(interp);
      return SWIG_ERROR;
    }

    /* Check if this is really a SWIG pointer */
    if (Tcl_VarEval(interp,c," cget -this", (char *) NULL) != TCL_OK) {
      Tcl_ResetResult(interp);
      return SWIG_ERROR;
    }

    c = Tcl_GetStringFromObj(Tcl_GetObjResult(interp), NULL);
  }

  c++;
  c = SWIG_UnpackData(c,ptr,sizeof(void *));
  if (ty) {
    tc = c ? SWIG_TypeCheck(c,ty) : 0;
    if (!tc) {
      return SWIG_ERROR;
    }
    if (flags & SWIG_POINTER_DISOWN) {
      SWIG_Disown((void *) *ptr);
    }
    {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc,(void *) *ptr,&newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
    }
  }
  return SWIG_OK;
}

/* Convert a pointer value */
SWIGRUNTIMEINLINE int
SWIG_Tcl_ConvertPtr(Tcl_Interp *interp, Tcl_Obj *oc, void **ptr, swig_type_info *ty, int flags) {
  return SWIG_Tcl_ConvertPtrFromString(interp, Tcl_GetStringFromObj(oc,NULL), ptr, ty, flags);
}

/* Convert a pointer value */
SWIGRUNTIME char *
SWIG_Tcl_PointerTypeFromString(char *c) {
  char d;
  /* Pointer values must start with leading underscore. NULL has no type */
  if (*c != '_') {
    return 0;
  }
  c++;
  /* Extract hex value from pointer */
  while ((d = *c)) {
    if (!(((d >= '0') && (d <= '9')) || ((d >= 'a') && (d <= 'f')))) break;
    c++;
  }
  return c;
}

/* Convert a packed value value */
SWIGRUNTIME int
SWIG_Tcl_ConvertPacked(Tcl_Interp *SWIGUNUSEDPARM(interp) , Tcl_Obj *obj, void *ptr, int sz, swig_type_info *ty) {
  swig_cast_info *tc;
  const char  *c;

  if (!obj) goto type_error;
  c = Tcl_GetStringFromObj(obj,NULL);
  /* Pointer values must start with leading underscore */
  if (*c != '_') goto type_error;
  c++;
  c = SWIG_UnpackData(c,ptr,sz);
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) goto type_error;
  }
  return SWIG_OK;

 type_error:

  return SWIG_ERROR;
}


/* Take a pointer and convert it to a string */
SWIGRUNTIME void
SWIG_Tcl_MakePtr(char *c, void *ptr, swig_type_info *ty, int flags) {
  if (ptr) {
    *(c++) = '_';
    c = SWIG_PackData(c,&ptr,sizeof(void *));
    strcpy(c,ty->name);
  } else {
    strcpy(c,(char *)"NULL");
  }
  flags = 0;
}

/* Create a new pointer object */
SWIGRUNTIMEINLINE Tcl_Obj *
SWIG_Tcl_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
  Tcl_Obj *robj;
  char result[SWIG_BUFFER_SIZE];
  SWIG_MakePtr(result,ptr,type,flags);
  robj = Tcl_NewStringObj(result,-1);
  return robj;
}

SWIGRUNTIME Tcl_Obj *
SWIG_Tcl_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
  char result[1024];
  char *r = result;
  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  strcpy(r,type->name);
  return Tcl_NewStringObj(result,-1);
}

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

SWIGRUNTIME swig_module_info * 
SWIG_Tcl_GetModule(Tcl_Interp *interp) {
  const char *data;
  swig_module_info *ret = 0;
  
  /* first check if pointer already created */
  data = Tcl_GetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TCL_GLOBAL_ONLY);
  if (data) {
    SWIG_UnpackData(data, &ret, sizeof(swig_type_info **));
  }

  return ret;
}

SWIGRUNTIME void
SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) {
  char buf[SWIG_BUFFER_SIZE];
  char *data;

  /* create a new pointer */
  data = SWIG_PackData(buf, &module, sizeof(swig_type_info **));
  *data = 0;
  Tcl_SetVar(interp, (char *)"swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, buf, TCL_GLOBAL_ONLY);
}

/* -----------------------------------------------------------------------------*
 *  Object auxiliars
 * -----------------------------------------------------------------------------*/


SWIGRUNTIME void
SWIG_Tcl_ObjectDelete(ClientData clientData) {
  swig_instance *si = (swig_instance *) clientData;
  if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) {
    if (si->classptr->destructor) {
      (si->classptr->destructor)(si->thisvalue);
    }
  }
  Tcl_DecrRefCount(si->thisptr);
  free(si);
}

/* Function to invoke object methods given an instance */
SWIGRUNTIME int
SWIG_Tcl_MethodCommand(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST _objv[]) {
  char *method,   *attrname;
  swig_instance   *inst = (swig_instance *) clientData;
  swig_method     *meth;
  swig_attribute  *attr;
  Tcl_Obj         *oldarg;
  Tcl_Obj         **objv;
  int              rcode;
  swig_class      *cls;
  swig_class      *cls_stack[64];
  int              cls_stack_bi[64];
  int              cls_stack_top = 0;
  int              numconf = 2;
  int              bi;

  objv = (Tcl_Obj **) _objv;
  if (objc < 2) {
    Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
    return TCL_ERROR;
  }
  method = Tcl_GetStringFromObj(objv[1],NULL);
  if (strcmp(method,"-acquire") == 0) {
    inst->destroy = 1;
    SWIG_Acquire(inst->thisvalue);
    return TCL_OK;
  }
  if (strcmp(method,"-disown") == 0) {
    if (inst->destroy) {
      SWIG_Disown(inst->thisvalue);
    }
    inst->destroy = 0;
    return TCL_OK;
  }
  if (strcmp(method,"-delete") == 0) {
    Tcl_DeleteCommandFromToken(interp,inst->cmdtok);
    return TCL_OK;
  }
  cls_stack[cls_stack_top] = inst->classptr;
  cls_stack_bi[cls_stack_top] = -1;
  cls = inst->classptr;
  while (1) {
    Tcl_HashEntry* hashentry;
    bi = cls_stack_bi[cls_stack_top];
    cls = cls_stack[cls_stack_top];
    if (bi != -1) {
      if (!cls->bases[bi] && cls->base_names[bi]) {
        /* lookup and cache the base class */
	swig_type_info *info = SWIG_TypeQueryModule(cls->module, cls->module, cls->base_names[bi]);
	if (info) cls->bases[bi] = (swig_class *) info->clientdata;
      }
      cls = cls->bases[bi];
      if (cls) {
        cls_stack_bi[cls_stack_top]++;
        cls_stack_top++;
        cls_stack[cls_stack_top] = cls;
        cls_stack_bi[cls_stack_top] = -1;
        continue;
      }
    }
    if (!cls) {
      cls_stack_top--;
      if (cls_stack_top < 0) break;
      else continue;
    }
    cls_stack_bi[cls_stack_top]++;

    hashentry = Tcl_FindHashEntry(&(cls->hashtable), method);
    if (hashentry) {
        ClientData cd = Tcl_GetHashValue(hashentry);
        swig_wrapper method_wrapper = (swig_wrapper)cd;
        oldarg = objv[1];
        objv[1] = inst->thisptr;
        Tcl_IncrRefCount(inst->thisptr);
        rcode = (method_wrapper)(clientData,interp,objc,objv);
        objv[1] = oldarg;
        Tcl_DecrRefCount(inst->thisptr);
        return rcode;
    }
    /* Check class methods for a match */
    if (strcmp(method,"cget") == 0) {
      if (objc < 3) {
        Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
        return TCL_ERROR;
      }
      attrname = Tcl_GetStringFromObj(objv[2],NULL);
      attr = cls->attributes;
      while (attr && attr->name) {
        if ((strcmp(attr->name, attrname) == 0) && (attr->getmethod)) {
          oldarg = objv[1];
          objv[1] = inst->thisptr;
          Tcl_IncrRefCount(inst->thisptr);
          rcode = (*attr->getmethod)(clientData,interp,2, objv);
          objv[1] = oldarg;
          Tcl_DecrRefCount(inst->thisptr);
          return rcode;
        }
        attr++;
      }
      if (strcmp(attrname, "-this") == 0) {
        Tcl_SetObjResult(interp, Tcl_DuplicateObj(inst->thisptr));
        return TCL_OK;
      }
      if (strcmp(attrname, "-thisown") == 0) {
        if (SWIG_Thisown(inst->thisvalue)) {
          Tcl_SetResult(interp,(char*)"1",TCL_STATIC);
        } else {
          Tcl_SetResult(interp,(char*)"0",TCL_STATIC);
        }
        return TCL_OK;
      }
    } else if (strcmp(method, "configure") == 0) {
      int i;
      if (objc < 4) {
        Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
        return TCL_ERROR;
      }
      i = 2;
      while (i < objc) {
        attrname = Tcl_GetStringFromObj(objv[i],NULL);
        attr = cls->attributes;
        while (attr && attr->name) {
          if ((strcmp(attr->name, attrname) == 0) && (attr->setmethod)) {
            oldarg = objv[i];
            objv[i] = inst->thisptr;
            Tcl_IncrRefCount(inst->thisptr);
            rcode = (*attr->setmethod)(clientData,interp,3, &objv[i-1]);
            objv[i] = oldarg;
            Tcl_DecrRefCount(inst->thisptr);
            if (rcode != TCL_OK) return rcode;
            numconf += 2;
          }
          attr++;
        }
        i+=2;
      }
    }
  }
  if (strcmp(method,"configure") == 0) {
    if (numconf >= objc) {
      return TCL_OK;
    } else {
      Tcl_SetResult(interp,(char *) "Invalid attribute name.", TCL_STATIC);
      return TCL_ERROR;
    }
  }
  if (strcmp(method,"cget") == 0) {
    Tcl_SetResult(interp,(char *) "Invalid attribute name.", TCL_STATIC);
    return TCL_ERROR;
  }
  Tcl_SetResult(interp, (char *) "Invalid method. Must be one of: configure cget -acquire -disown -delete", TCL_STATIC);
  cls = inst->classptr;
  bi = 0;
  while (cls) {
    meth = cls->methods;
    while (meth && meth->name) {
      char *cr = (char *) Tcl_GetStringResult(interp);
      size_t meth_len = strlen(meth->name);
      char* where = strchr(cr,':');
      while(where) {
        where = strstr(where, meth->name);
        if(where) {
          if(where[-1] == ' ' && (where[meth_len] == ' ' || where[meth_len]==0)) {
            break;
          } else {
            where++;
          }
        }
      }

      if (!where)
        Tcl_AppendElement(interp, (char *) meth->name);
      meth++;
    }
    cls = inst->classptr->bases[bi++];
  }
  return TCL_ERROR;
}

/* This function takes the current result and turns it into an object command */
SWIGRUNTIME Tcl_Obj *
SWIG_Tcl_NewInstanceObj(Tcl_Interp *interp, void *thisvalue, swig_type_info *type, int flags) {
  Tcl_Obj *robj = SWIG_NewPointerObj(thisvalue, type,0);
  /* Check to see if this pointer belongs to a class or not */
  if (thisvalue && (type->clientdata) && (interp)) {
    Tcl_CmdInfo    ci;
    char          *name;
    name = Tcl_GetStringFromObj(robj,NULL);
    if (!Tcl_GetCommandInfo(interp,name, &ci) || (flags)) {
      swig_instance *newinst = (swig_instance *) malloc(sizeof(swig_instance));
      newinst->thisptr = Tcl_DuplicateObj(robj);
      Tcl_IncrRefCount(newinst->thisptr);
      newinst->thisvalue = thisvalue;
      newinst->classptr = (swig_class *) type->clientdata;
      newinst->destroy = flags;
      newinst->cmdtok = Tcl_CreateObjCommand(interp, Tcl_GetStringFromObj(robj,NULL), (swig_wrapper_func) SWIG_MethodCommand, (ClientData) newinst, (swig_delete_func) SWIG_ObjectDelete);
      if (flags) {
        SWIG_Acquire(thisvalue);
      }
    }
  }
  return robj;
}

/* Function to create objects */
SWIGRUNTIME int
SWIG_Tcl_ObjectConstructor(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj          *newObj = 0;
  void             *thisvalue = 0;
  swig_instance   *newinst = 0;
  swig_class      *classptr = (swig_class *) clientData;
  swig_wrapper     cons = 0;
  char             *name = 0;
  int               firstarg = 0;
  int               thisarg = 0;
  int               destroy = 1;

  if (!classptr) {
    Tcl_SetResult(interp, (char *) "swig: internal runtime error. No class object defined.", TCL_STATIC);
    return TCL_ERROR;
  }
  cons = classptr->constructor;
  if (objc > 1) {
    char *s = Tcl_GetStringFromObj(objv[1],NULL);
    if (strcmp(s,"-this") == 0) {
      thisarg = 2;
      cons = 0;
    } else if (strcmp(s,"-args") == 0) {
      firstarg = 1;
    } else if (objc == 2) {
      firstarg = 1;
      name = s;
    } else if (objc >= 3) {
      char *s1;
      name = s;
      s1 = Tcl_GetStringFromObj(objv[2],NULL);
      if (strcmp(s1,"-this") == 0) {
	thisarg = 3;
	cons = 0;
      } else {
	firstarg = 1;
      }
    }
  }
  if (cons) {
    int result;
    result = (*cons)(0, interp, objc-firstarg, &objv[firstarg]);
    if (result != TCL_OK) {
      return result;
    }
    newObj = Tcl_DuplicateObj(Tcl_GetObjResult(interp));
    if (!name) name = Tcl_GetStringFromObj(newObj,NULL);
  } else if (thisarg > 0) {
    if (thisarg < objc) {
      destroy = 0;
      newObj = Tcl_DuplicateObj(objv[thisarg]);
      if (!name) name = Tcl_GetStringFromObj(newObj,NULL);
    } else {
      Tcl_SetResult(interp, (char *) "wrong # args.", TCL_STATIC);
      return TCL_ERROR;
    }
  } else {
    Tcl_SetResult(interp, (char *) "No constructor available.", TCL_STATIC);
    return TCL_ERROR;
  }
  if (SWIG_Tcl_ConvertPtr(interp,newObj, (void **) &thisvalue, *(classptr->type), 0) != SWIG_OK) {
    Tcl_DecrRefCount(newObj);
    return TCL_ERROR;
  }
  newinst = (swig_instance *) malloc(sizeof(swig_instance));
  newinst->thisptr = newObj;
  Tcl_IncrRefCount(newObj);
  newinst->thisvalue = thisvalue;
  newinst->classptr = classptr;
  newinst->destroy = destroy;
  if (destroy) {
    SWIG_Acquire(thisvalue);
  }
  newinst->cmdtok = Tcl_CreateObjCommand(interp,name, (swig_wrapper) SWIG_MethodCommand, (ClientData) newinst, (swig_delete_func) SWIG_ObjectDelete);
  return TCL_OK;
}

/* -----------------------------------------------------------------------------*
 *   Get arguments 
 * -----------------------------------------------------------------------------*/
SWIGRUNTIME int
SWIG_Tcl_GetArgs(Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[], const char *fmt, ...) {
  int        argno = 0, opt = 0;
  long       tempi;
  double     tempd;
  const char *c;
  va_list    ap;
  void      *vptr;
  Tcl_Obj   *obj = 0;
  swig_type_info *ty;

  va_start(ap,fmt);
  for (c = fmt; (*c && (*c != ':') && (*c != ';')); c++,argno++) {
    if (*c == '|') {
      opt = 1;
      c++;
    }
    if (argno >= (objc-1)) {
      if (!opt) {
        Tcl_SetResult(interp, (char *) "Wrong number of arguments ", TCL_STATIC);
        goto argerror;
      } else {
        va_end(ap);
        return TCL_OK;
      }
    }

    vptr = va_arg(ap,void *);
    if (vptr) {
      if (isupper(*c)) {
        obj = SWIG_Tcl_GetConstantObj(Tcl_GetStringFromObj(objv[argno+1],0));
        if (!obj) obj = objv[argno+1];
      } else {
        obj = objv[argno+1];
      }
      switch(*c) {
      case 'i': case 'I':
      case 'l': case 'L':
      case 'h': case 'H':
      case 'b': case 'B':
        if (Tcl_GetLongFromObj(interp,obj,&tempi) != TCL_OK) goto argerror;
        if ((*c == 'i') || (*c == 'I')) *((int *)vptr) = (int)tempi;
        else if ((*c == 'l') || (*c == 'L')) *((long *)vptr) = (long)tempi;
        else if ((*c == 'h') || (*c == 'H')) *((short*)vptr) = (short)tempi;
        else if ((*c == 'b') || (*c == 'B')) *((unsigned char *)vptr) = (unsigned char)tempi;
        break;
      case 'f': case 'F':
      case 'd': case 'D':
        if (Tcl_GetDoubleFromObj(interp,obj,&tempd) != TCL_OK) goto argerror;
        if ((*c == 'f') || (*c == 'F')) *((float *) vptr) = (float)tempd;
        else if ((*c == 'd') || (*c == 'D')) *((double*) vptr) = tempd;
        break;
      case 's': case 'S':
        if (*(c+1) == '#') {
          int *vlptr = (int *) va_arg(ap, void *);
          *((char **) vptr) = Tcl_GetStringFromObj(obj, vlptr);
          c++;
        } else {
          *((char **)vptr) = Tcl_GetStringFromObj(obj,NULL);
        }
        break;
      case 'c': case 'C':
        *((char *)vptr) = *(Tcl_GetStringFromObj(obj,NULL));
        break;
      case 'p': case 'P':
        ty = (swig_type_info *) va_arg(ap, void *);
        if (SWIG_Tcl_ConvertPtr(interp, obj, (void **) vptr, ty, 0) != SWIG_OK) goto argerror;
        break;
      case 'o': case 'O':
        *((Tcl_Obj **)vptr) = objv[argno+1];
        break;
      default:
        break;
      }
    }
  }

  if ((*c != ';') && ((objc-1) > argno)) {
    Tcl_SetResult(interp, (char *) "Wrong # args.", TCL_STATIC);
    goto argerror;
  }
  va_end(ap);
  return TCL_OK;

 argerror:
  {
    char temp[32];
    sprintf(temp,"%d", argno+1);
    c = strchr(fmt,':');
    if (!c) c = strchr(fmt,';');
    if (!c) c = (char *)"";
    Tcl_AppendResult(interp,c," argument ", temp, NULL);
    va_end(ap);
    return TCL_ERROR;
  }
}

#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); return TCL_ERROR;; } while(0) 


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

#define SWIGTYPE_p_Xapian__BM25Weight swig_types[0]
#define SWIGTYPE_p_Xapian__BoolWeight swig_types[1]
#define SWIGTYPE_p_Xapian__Compactor swig_types[2]
#define SWIGTYPE_p_Xapian__Database swig_types[3]
#define SWIGTYPE_p_Xapian__DateValueRangeProcessor swig_types[4]
#define SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource swig_types[5]
#define SWIGTYPE_p_Xapian__Document swig_types[6]
#define SWIGTYPE_p_Xapian__ESet swig_types[7]
#define SWIGTYPE_p_Xapian__ESetIterator swig_types[8]
#define SWIGTYPE_p_Xapian__Enquire swig_types[9]
#define SWIGTYPE_p_Xapian__FixedWeightPostingSource swig_types[10]
#define SWIGTYPE_p_Xapian__KeyMaker swig_types[11]
#define SWIGTYPE_p_Xapian__MSet swig_types[12]
#define SWIGTYPE_p_Xapian__MSetIterator swig_types[13]
#define SWIGTYPE_p_Xapian__MatchDecider swig_types[14]
#define SWIGTYPE_p_Xapian__MatchSpy swig_types[15]
#define SWIGTYPE_p_Xapian__MultiValueKeyMaker swig_types[16]
#define SWIGTYPE_p_Xapian__MultiValueSorter swig_types[17]
#define SWIGTYPE_p_Xapian__NumberValueRangeProcessor swig_types[18]
#define SWIGTYPE_p_Xapian__PositionIterator swig_types[19]
#define SWIGTYPE_p_Xapian__PostingIterator swig_types[20]
#define SWIGTYPE_p_Xapian__PostingSource swig_types[21]
#define SWIGTYPE_p_Xapian__Query swig_types[22]
#define SWIGTYPE_p_Xapian__QueryParser swig_types[23]
#define SWIGTYPE_p_Xapian__RSet swig_types[24]
#define SWIGTYPE_p_Xapian__Registry swig_types[25]
#define SWIGTYPE_p_Xapian__SimpleStopper swig_types[26]
#define SWIGTYPE_p_Xapian__Sorter swig_types[27]
#define SWIGTYPE_p_Xapian__Stem swig_types[28]
#define SWIGTYPE_p_Xapian__StemImplementation swig_types[29]
#define SWIGTYPE_p_Xapian__Stopper swig_types[30]
#define SWIGTYPE_p_Xapian__StringValueRangeProcessor swig_types[31]
#define SWIGTYPE_p_Xapian__TermGenerator swig_types[32]
#define SWIGTYPE_p_Xapian__TermIterator swig_types[33]
#define SWIGTYPE_p_Xapian__TradWeight swig_types[34]
#define SWIGTYPE_p_Xapian__ValueCountMatchSpy swig_types[35]
#define SWIGTYPE_p_Xapian__ValueIterator swig_types[36]
#define SWIGTYPE_p_Xapian__ValueMapPostingSource swig_types[37]
#define SWIGTYPE_p_Xapian__ValuePostingSource swig_types[38]
#define SWIGTYPE_p_Xapian__ValueRangeProcessor swig_types[39]
#define SWIGTYPE_p_Xapian__ValueSetMatchDecider swig_types[40]
#define SWIGTYPE_p_Xapian__ValueWeightPostingSource swig_types[41]
#define SWIGTYPE_p_Xapian__Weight swig_types[42]
#define SWIGTYPE_p_Xapian__WritableDatabase swig_types[43]
#define SWIGTYPE_p_char swig_types[44]
#define SWIGTYPE_p_compaction_level swig_types[45]
#define SWIGTYPE_p_docid_order swig_types[46]
#define SWIGTYPE_p_double swig_types[47]
#define SWIGTYPE_p_feature_flag swig_types[48]
#define SWIGTYPE_p_int swig_types[49]
#define SWIGTYPE_p_op swig_types[50]
#define SWIGTYPE_p_std__string swig_types[51]
#define SWIGTYPE_p_stem_strategy swig_types[52]
#define SWIGTYPE_p_unsigned_int swig_types[53]
#define SWIGTYPE_std__ptrdiff_t swig_types[54]
#define SWIGTYPE_std__size_t swig_types[55]
static swig_type_info *swig_types[57];
static swig_module_info swig_module = {swig_types, 56, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

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

#define SWIG_init    Xapian_Init
#define SWIG_name    "xapian"
#define SWIG_prefix  "xapian::"
#define SWIG_namespace "xapian"

#define SWIG_version "1.2.12"

#define SWIGVERSION 0x020005 
#define SWIG_VERSION SWIGVERSION


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


#include <stdexcept>



#ifdef __cplusplus
extern "C" {
#endif
#ifdef MAC_TCL
#pragma export on
#endif
SWIGEXPORT int SWIG_init(Tcl_Interp *);
#ifdef MAC_TCL
#pragma export off
#endif
#ifdef __cplusplus
}
#endif

/* Compatibility version for TCL stubs */
#ifndef SWIG_TCL_STUBS_VERSION
#define SWIG_TCL_STUBS_VERSION "8.1"
#endif



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


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

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

#include <xapian.h>

#include <string>
#include <vector>

using namespace std;

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

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

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

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

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

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

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

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


#include <stdexcept>


#include <string>


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

Tcl_Obj* SwigString_FromString(const std::string &s) {
    return Tcl_NewStringObj(s.data(), (int)s.length());
}

int Tcl_GetBoolFromObj(Tcl_Interp *interp, Tcl_Obj *o, bool *val) {
  int v;
  int res = Tcl_GetBooleanFromObj(interp, o, &v);
  if (res == TCL_OK) {
    *val = v ? true : false;
  }
  return res;  
}
 
int SwigString_AsString(Tcl_Interp *interp, Tcl_Obj *o, std::string *val) {
    int len;
    const char* temp = Tcl_GetStringFromObj(o, &len);
    if (temp == NULL)
        return TCL_ERROR;
    val->assign(temp, len);
    return TCL_OK;
}

// behaviour of this is such as the real Tcl_GetIntFromObj
template <typename Type>
int SwigInt_As(Tcl_Interp *interp, Tcl_Obj *o, Type *val) {
    int temp_val, return_val;
    return_val = Tcl_GetIntFromObj(interp, o, &temp_val);
    *val = (Type) temp_val;
    return return_val;
}

// behaviour of this is such as the real Tcl_GetDoubleFromObj
template <typename Type>
int SwigDouble_As(Tcl_Interp *interp, Tcl_Obj *o, Type *val) {
    int return_val;
    double temp_val;
    return_val = Tcl_GetDoubleFromObj(interp, o, &temp_val);
    *val = (Type) temp_val;
    return return_val;
}



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


#include <utility>


namespace Xapian {
    Query *get_tcl8_query(Tcl_Interp *interp, Tcl_Obj *obj) {
	Query * retval = 0;
	if (SWIG_ConvertPtr(obj, (void **)&retval,
			    SWIGTYPE_p_Xapian__Query, 0) != TCL_OK) {
	    retval = 0;
	}
	return retval;
    }
}


/* tcl8/except.i: Custom tcl8 exception handling.
 *
 * Copyright (c) 2006,2007 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
 */

static int XapianTclHandleError(Tcl_Interp * interp, const Xapian::Error &e) {
    Tcl_ResetResult(interp);
    Tcl_SetErrorCode(interp, "XAPIAN", e.get_type(), NULL);
    Tcl_AppendResult(interp, e.get_msg().c_str(), NULL);
    return TCL_ERROR;
}

static int XapianTclHandleError(Tcl_Interp * interp) {
    Tcl_ResetResult(interp);
    Tcl_SetErrorCode(interp, "XAPIAN ?", NULL);
    Tcl_AppendResult(interp, "Unknown Error", NULL);
    return TCL_ERROR;
}



#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


SWIGINTERNINLINE Tcl_Obj* 
SWIG_From_long  (long value)
{
  if (((long) INT_MIN <= value) && (value <= (long) INT_MAX)) {
    return Tcl_NewIntObj(static_cast< int >(value));
  } else {
    return Tcl_NewLongObj(value);
  }
}


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


SWIGINTERNINLINE Tcl_Obj* 
SWIG_From_unsigned_SS_long  (unsigned long value)
{
  if (value < (unsigned long) LONG_MAX) {
    return SWIG_From_long  (static_cast< long >(value));
  } else {
    char temp[256]; 
    sprintf(temp, "%lu", value);
    return Tcl_NewStringObj(temp,-1);
  }
}


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


SWIGINTERNINLINE Tcl_Obj *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  return (size < INT_MAX) ? Tcl_NewStringObj(carray, static_cast< int >(size)) : NULL;
}


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


SWIGINTERNINLINE Tcl_Obj *
SWIG_From_int  (int value)
{    
  return SWIG_From_long  (value);
}

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

  #define SWIG_From_bool   Tcl_NewBooleanObj 


SWIGINTERN int
SWIG_AsVal_unsigned_SS_long SWIG_TCL_DECL_ARGS_2(Tcl_Obj *obj, unsigned long *val) {
  long v;
  if (Tcl_GetLongFromObj(0,obj, &v) == TCL_OK) {
    if (v >= 0) {
      if (val) *val = (unsigned long) v;
      return SWIG_OK;
    }
    /* If v is negative, then this could be a negative number, or an
       unsigned value which doesn't fit in a signed long, so try to
       get it as a string so we can distinguish these cases. */
  }
  {
    int len = 0;
    const char *nptr = Tcl_GetStringFromObj(obj, &len);
    if (nptr && len > 0) {
      char *endptr;
      unsigned long v;
      if (*nptr == '-') return SWIG_OverflowError;
      errno = 0;
      v = strtoul(nptr, &endptr,0);
      if (nptr[0] == '\0' || *endptr != '\0')
	return SWIG_TypeError;
      if (v == ULONG_MAX && errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_OK;
	}
      }
    }
  }
  
  return SWIG_TypeError;
}


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


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

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 int
SWIG_AsCharPtrAndSize(Tcl_Obj *obj, char** cptr, size_t* psize, int *alloc)
{ 
  int len = 0;
  char *cstr = Tcl_GetStringFromObj(obj, &len);
  if (cstr) {
    if (cptr)  *cptr = cstr;
    if (psize) *psize = len + 1;
    if (alloc) *alloc = SWIG_OLDOBJ;
    return SWIG_OK;
  }
  return SWIG_TypeError;
}


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

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

  #define SWIG_From_double   Tcl_NewDoubleObj 


SWIGINTERN int
SWIG_AsVal_double SWIG_TCL_DECL_ARGS_2(Tcl_Obj *obj, double *val)
{
  double v;
  if (Tcl_GetDoubleFromObj(0, obj, &v) == TCL_OK) {
    if (val) *val = v;
    return SWIG_OK;
  }
  return SWIG_TypeError;
}

SWIGINTERN Xapian::MSetIterator Xapian_MSet_get_hit(Xapian::MSet const *self,Xapian::doccount i){
	    return ((*self)[i]);
	}
SWIGINTERN int Xapian_MSet_get_document_percentage(Xapian::MSet const *self,Xapian::doccount i){
	    return (*self).convert_to_percent( ((*self)[i]) );
	}
SWIGINTERN Xapian::Document const Xapian_MSet_get_document(Xapian::MSet const *self,Xapian::doccount i){
	    return ((*self)[i]).get_document();
	}
SWIGINTERN Xapian::docid Xapian_MSet_get_docid(Xapian::MSet const *self,Xapian::doccount i){
	    return *((*self)[i]);
	}
SWIGINTERN Xapian::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 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 int
SWIG_AsVal_long SWIG_TCL_DECL_ARGS_2(Tcl_Obj *obj, long* val)
{
  long v;
  if (Tcl_GetLongFromObj(0,obj, &v) == TCL_OK) {
    if (val) *val = (long) v;
    return SWIG_OK;
  }
  return SWIG_TypeError;
}


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


SWIGINTERN int
SWIG_AsVal_bool SWIG_TCL_DECL_ARGS_2(Tcl_Obj *obj, bool *val)
{
  int v;
  if (Tcl_GetBooleanFromObj(0, obj, &v) == TCL_OK) {
    if (val) *val = v ? true : false;
    return SWIG_OK;
  }
  return SWIG_TypeError;
}

SWIGINTERN std::pair< Xapian::TermIterator,Xapian::TermIterator > Xapian_Enquire_get_matching_terms(Xapian::Enquire const *self,Xapian::MSetIterator const &hit){
	    return make_pair(self->get_matching_terms_begin(hit),
			     self->get_matching_terms_end(hit));
	}

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


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

SWIGINTERN Xapian::Query *new_Xapian_Query__SWIG_13(Xapian::Query::op op,std::vector< Xapian::Query > const &subqs,Xapian::termcount param=0){
		return new Xapian::Query(op, subqs.begin(), subqs.end(), param);
	    }
#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN const char *_wrap_BAD_VALUENO_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2, int flags) {
  Tcl_Obj *value = 0;
  
  value = SWIG_From_unsigned_SS_int(static_cast< unsigned int >(Xapian::BAD_VALUENO));
  if (value) {
    Tcl_SetVar2(interp,name1,name2,Tcl_GetStringFromObj(value,NULL), flags);
    Tcl_DecrRefCount(value);
  }
  return NULL;
}


SWIGINTERN const char *swig_readonly(ClientData clientData SWIGUNUSED, Tcl_Interp *interp SWIGUNUSED, char *name1 SWIGUNUSED, char *name2 SWIGUNUSED, int flags SWIGUNUSED) {
  return "Variable is read-only";
}


SWIGINTERN int
_wrap_version_string(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  char *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::version_string ") == TCL_ERROR) SWIG_fail;
  result = (char *)Xapian::version_string();
  Tcl_SetObjResult(interp,SWIG_FromCharPtr((const char *)result));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_major_version(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  int result;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::major_version ") == TCL_ERROR) SWIG_fail;
  result = (int)Xapian::major_version();
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_minor_version(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  int result;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::minor_version ") == TCL_ERROR) SWIG_fail;
  result = (int)Xapian::minor_version();
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_revision(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  int result;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::revision ") == TCL_ERROR) SWIG_fail;
  result = (int)Xapian::revision();
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_PositionIterator__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PositionIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_PositionIterator ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::PositionIterator *)new Xapian::PositionIterator();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PositionIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_PositionIterator__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PositionIterator *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::PositionIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_PositionIterator other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__PositionIterator,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  {
    try {
      result = (Xapian::PositionIterator *)new Xapian::PositionIterator((Xapian::PositionIterator const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PositionIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_PositionIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_PositionIterator__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__PositionIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_PositionIterator__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_PositionIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_PositionIterator self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PositionIterator" "', argument " "1"" of type '" "Xapian::PositionIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PositionIterator_get_termpos(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termpos result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PositionIterator_get_termpos self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_get_termpos" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  {
    try {
      result = (Xapian::termpos)Xapian_PositionIterator_get_termpos((Xapian::PositionIterator const *)arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PositionIterator_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PositionIterator_next self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 {
      Xapian_PositionIterator_next(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PositionIterator_equals(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::PositionIterator_equals self other ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__PositionIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PositionIterator_equals" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PositionIterator_equals" "', argument " "2"" of type '" "Xapian::PositionIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PositionIterator * >(argp2);
  {
    try {
      result = (bool)Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1,(Xapian::PositionIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PositionIterator_skip_to(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::termpos arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::PositionIterator_skip_to self pos ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PositionIterator_skip_to" "', argument " "2"" of type '" "Xapian::termpos""'");
  } 
  arg2 = static_cast< Xapian::termpos >(val2);
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PositionIterator_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PositionIterator_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PositionIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PositionIterator_get_description" "', argument " "1"" of type '" "Xapian::PositionIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PositionIterator * >(argp1);
  {
    try {
      result = ((Xapian::PositionIterator const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_PositionIterator(void *obj) {
Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) obj;
delete arg1;
}
static swig_method swig_Xapian_PositionIterator_methods[] = {
    {"get_termpos", _wrap_PositionIterator_get_termpos}, 
    {"next", _wrap_PositionIterator_next}, 
    {"equals", _wrap_PositionIterator_equals}, 
    {"skip_to", _wrap_PositionIterator_skip_to}, 
    {"get_description", _wrap_PositionIterator_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_PositionIterator_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_PositionIterator_bases[] = {0};
static const char * swig_Xapian_PositionIterator_base_names[] = {0};
static swig_class _wrap_class_Xapian_PositionIterator = { "PositionIterator", &SWIGTYPE_p_Xapian__PositionIterator,_wrap_new_PositionIterator, swig_delete_PositionIterator, swig_Xapian_PositionIterator_methods, swig_Xapian_PositionIterator_attributes, swig_Xapian_PositionIterator_bases,swig_Xapian_PositionIterator_base_names, &swig_module };
SWIGINTERN int
_wrap_new_PostingIterator__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_PostingIterator ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::PostingIterator *)new Xapian::PostingIterator();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_PostingIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_PostingIterator self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_PostingIterator__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::PostingIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_PostingIterator other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__PostingIterator,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_PostingIterator" "', argument " "1"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      result = (Xapian::PostingIterator *)new Xapian::PostingIterator((Xapian::PostingIterator const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_PostingIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_PostingIterator__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__PostingIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_PostingIterator__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_skip_to(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::PostingIterator_skip_to self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PostingIterator_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_get_doclength(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingIterator_get_doclength self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_get_doclength" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_doclength();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_get_wdf(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingIterator_get_wdf self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_get_wdf" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_wdf();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_positionlist_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::PositionIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingIterator_positionlist_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_positionlist_begin" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->positionlist_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_positionlist_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::PositionIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingIterator_positionlist_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_positionlist_end" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->positionlist_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingIterator_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_get_description" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_get_docid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingIterator_get_docid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingIterator_get_docid" "', argument " "1"" of type '" "Xapian::PostingIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingIterator * >(argp1);
  {
    try {
      result = (Xapian::docid)Xapian_PostingIterator_get_docid((Xapian::PostingIterator const *)arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingIterator_next self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 {
      Xapian_PostingIterator_next(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingIterator_equals(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::PostingIterator_equals self other ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__PostingIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostingIterator_equals" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingIterator_equals" "', argument " "2"" of type '" "Xapian::PostingIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PostingIterator * >(argp2);
  {
    try {
      result = (bool)Xapian_PostingIterator_equals((Xapian::PostingIterator const *)arg1,(Xapian::PostingIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_PostingIterator(void *obj) {
Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) obj;
delete arg1;
}
static swig_method swig_Xapian_PostingIterator_methods[] = {
    {"skip_to", _wrap_PostingIterator_skip_to}, 
    {"get_doclength", _wrap_PostingIterator_get_doclength}, 
    {"get_wdf", _wrap_PostingIterator_get_wdf}, 
    {"positionlist_begin", _wrap_PostingIterator_positionlist_begin}, 
    {"positionlist_end", _wrap_PostingIterator_positionlist_end}, 
    {"get_description", _wrap_PostingIterator_get_description}, 
    {"get_docid", _wrap_PostingIterator_get_docid}, 
    {"next", _wrap_PostingIterator_next}, 
    {"equals", _wrap_PostingIterator_equals}, 
    {0,0}
};
static swig_attribute swig_Xapian_PostingIterator_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_PostingIterator_bases[] = {0};
static const char * swig_Xapian_PostingIterator_base_names[] = {0};
static swig_class _wrap_class_Xapian_PostingIterator = { "PostingIterator", &SWIGTYPE_p_Xapian__PostingIterator,_wrap_new_PostingIterator, swig_delete_PostingIterator, swig_Xapian_PostingIterator_methods, swig_Xapian_PostingIterator_attributes, swig_Xapian_PostingIterator_bases,swig_Xapian_PostingIterator_base_names, &swig_module };
SWIGINTERN int
_wrap_new_TermIterator__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_TermIterator ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::TermIterator *)new Xapian::TermIterator();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_TermIterator__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::TermIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_TermIterator other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__TermIterator,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      result = (Xapian::TermIterator *)new Xapian::TermIterator((Xapian::TermIterator const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_TermIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_TermIterator__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_TermIterator__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_TermIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_TermIterator self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TermIterator" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_get_term(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermIterator_get_term self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 {
      result = Xapian_TermIterator_get_term((Xapian::TermIterator const *)arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermIterator_next self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 {
      Xapian_TermIterator_next(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_equals(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermIterator_equals self other ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__TermIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator_equals" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator_equals" "', argument " "2"" of type '" "Xapian::TermIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::TermIterator * >(argp2);
  {
    try {
      result = (bool)Xapian_TermIterator_equals((Xapian::TermIterator const *)arg1,(Xapian::TermIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_skip_to(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermIterator_skip_to self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_skip_to" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermIterator_skip_to" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermIterator_skip_to" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->skip_to((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_get_wdf(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermIterator_get_wdf self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_get_wdf" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->get_wdf();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_get_termfreq(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermIterator_get_termfreq self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_get_termfreq" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::TermIterator const *)arg1)->get_termfreq();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_positionlist_count(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermIterator_positionlist_count self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_positionlist_count" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->positionlist_count();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_positionlist_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::PositionIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermIterator_positionlist_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_positionlist_begin" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      result = (arg1)->positionlist_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_positionlist_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::PositionIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermIterator_positionlist_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_positionlist_end" "', argument " "1"" of type '" "Xapian::TermIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      result = (arg1)->positionlist_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermIterator_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermIterator_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermIterator_get_description" "', argument " "1"" of type '" "Xapian::TermIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermIterator * >(argp1);
  {
    try {
      result = ((Xapian::TermIterator const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_TermIterator(void *obj) {
Xapian::TermIterator *arg1 = (Xapian::TermIterator *) obj;
delete arg1;
}
static swig_method swig_Xapian_TermIterator_methods[] = {
    {"get_term", _wrap_TermIterator_get_term}, 
    {"next", _wrap_TermIterator_next}, 
    {"equals", _wrap_TermIterator_equals}, 
    {"skip_to", _wrap_TermIterator_skip_to}, 
    {"get_wdf", _wrap_TermIterator_get_wdf}, 
    {"get_termfreq", _wrap_TermIterator_get_termfreq}, 
    {"positionlist_count", _wrap_TermIterator_positionlist_count}, 
    {"positionlist_begin", _wrap_TermIterator_positionlist_begin}, 
    {"positionlist_end", _wrap_TermIterator_positionlist_end}, 
    {"get_description", _wrap_TermIterator_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_TermIterator_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_TermIterator_bases[] = {0};
static const char * swig_Xapian_TermIterator_base_names[] = {0};
static swig_class _wrap_class_Xapian_TermIterator = { "TermIterator", &SWIGTYPE_p_Xapian__TermIterator,_wrap_new_TermIterator, swig_delete_TermIterator, swig_Xapian_TermIterator_methods, swig_Xapian_TermIterator_attributes, swig_Xapian_TermIterator_bases,swig_Xapian_TermIterator_base_names, &swig_module };
SWIGINTERN int
_wrap_new_ValueIterator__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_ValueIterator ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::ValueIterator *)new Xapian::ValueIterator();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_ValueIterator__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::ValueIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_ValueIterator other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__ValueIterator,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      result = (Xapian::ValueIterator *)new Xapian::ValueIterator((Xapian::ValueIterator const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_ValueIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_ValueIterator__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ValueIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_ValueIterator__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_ValueIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ValueIterator self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueIterator" "', argument " "1"" of type '" "Xapian::ValueIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueIterator_get_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueIterator_get_value self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_get_value" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      result = Xapian_ValueIterator_get_value((Xapian::ValueIterator const *)arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueIterator_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueIterator_next self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 {
      Xapian_ValueIterator_next(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueIterator_equals(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueIterator_equals self other ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__ValueIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueIterator_equals" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueIterator_equals" "', argument " "2"" of type '" "Xapian::ValueIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ValueIterator * >(argp2);
  {
    try {
      result = (bool)Xapian_ValueIterator_equals((Xapian::ValueIterator const *)arg1,(Xapian::ValueIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueIterator_get_docid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueIterator_get_docid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_get_docid" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      result = (Xapian::docid)((Xapian::ValueIterator const *)arg1)->get_docid();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueIterator_get_valueno(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::valueno result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueIterator_get_valueno self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_get_valueno" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      result = (Xapian::valueno)((Xapian::ValueIterator const *)arg1)->get_valueno();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueIterator_skip_to(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueIterator_skip_to self docid_or_slot ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueIterator_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueIterator_check(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueIterator_check self docid ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueIterator_check" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = (bool)(arg1)->check(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueIterator_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueIterator_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueIterator_get_description" "', argument " "1"" of type '" "Xapian::ValueIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueIterator * >(argp1);
  {
    try {
      result = ((Xapian::ValueIterator const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ValueIterator(void *obj) {
Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) obj;
delete arg1;
}
static swig_method swig_Xapian_ValueIterator_methods[] = {
    {"get_value", _wrap_ValueIterator_get_value}, 
    {"next", _wrap_ValueIterator_next}, 
    {"equals", _wrap_ValueIterator_equals}, 
    {"get_docid", _wrap_ValueIterator_get_docid}, 
    {"get_valueno", _wrap_ValueIterator_get_valueno}, 
    {"skip_to", _wrap_ValueIterator_skip_to}, 
    {"check", _wrap_ValueIterator_check}, 
    {"get_description", _wrap_ValueIterator_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_ValueIterator_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ValueIterator_bases[] = {0};
static const char * swig_Xapian_ValueIterator_base_names[] = {0};
static swig_class _wrap_class_Xapian_ValueIterator = { "ValueIterator", &SWIGTYPE_p_Xapian__ValueIterator,_wrap_new_ValueIterator, swig_delete_ValueIterator, swig_Xapian_ValueIterator_methods, swig_Xapian_ValueIterator_attributes, swig_Xapian_ValueIterator_bases,swig_Xapian_ValueIterator_base_names, &swig_module };
SWIGINTERN int
_wrap_new_Document__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::Document *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Document other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Document" "', argument " "1"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Document" "', argument " "1"" of type '" "Xapian::Document const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = (Xapian::Document *)new Xapian::Document((Xapian::Document const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Document__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_Document ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::Document *)new Xapian::Document();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_Document__SWIG_1(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Document__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_Document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Document self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Document" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_get_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Document_get_value self slot ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_get_value" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_value(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_add_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Document_add_value self slot value ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_add_value" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Document_add_value" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_value" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->add_value(arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_remove_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Document_remove_value self slot ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Document_remove_value" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      (arg1)->remove_value(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_clear_values(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_clear_values self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_clear_values" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      (arg1)->clear_values();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_get_data(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_get_data self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_get_data" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_data();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_set_data(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Document_set_data self data ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_set_data" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_set_data" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_set_data" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->set_data((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_add_posting__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::Document_add_posting self tname tpos wdfinc ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Document_add_posting" "', argument " "4"" of type '" "Xapian::termcount""'");
  } 
  arg4 = static_cast< Xapian::termcount >(val4);
  {
    try {
      (arg1)->add_posting((std::string const &)*arg2,arg3,arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_add_posting__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Document_add_posting self tname tpos ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_add_posting" "', argument " "3"" of type '" "Xapian::termpos""'");
  } 
  arg3 = static_cast< Xapian::termpos >(val3);
  {
    try {
      (arg1)->add_posting((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_add_posting(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Document_add_posting__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_Document_add_posting__SWIG_0(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_add_term__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Document_add_term self tname wdfinc ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_term" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_add_term" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      (arg1)->add_term((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_add_term__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Document_add_term self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_term" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_term" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->add_term((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_add_term(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Document_add_term__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Document_add_term__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_add_boolean_term(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Document_add_boolean_term self term ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_add_boolean_term" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_add_boolean_term" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_add_boolean_term" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->add_boolean_term((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_remove_posting__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::Document_remove_posting self tname tpos wdfdec ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_remove_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Document_remove_posting" "', argument " "4"" of type '" "Xapian::termcount""'");
  } 
  arg4 = static_cast< Xapian::termcount >(val4);
  {
    try {
      (arg1)->remove_posting((std::string const &)*arg2,arg3,arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_remove_posting__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Document_remove_posting self tname tpos ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_remove_posting" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Document_remove_posting" "', argument " "3"" of type '" "Xapian::termpos""'");
  } 
  arg3 = static_cast< Xapian::termpos >(val3);
  {
    try {
      (arg1)->remove_posting((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_remove_posting(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Document_remove_posting__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Document, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_Document_remove_posting__SWIG_0(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_remove_term(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Document_remove_term self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_remove_term" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Document_remove_term" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_remove_term" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->remove_term((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_clear_terms(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_clear_terms self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_clear_terms" "', argument " "1"" of type '" "Xapian::Document *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      (arg1)->clear_terms();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_termlist_count(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_termlist_count self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_termlist_count" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::Document const *)arg1)->termlist_count();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_termlist_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_termlist_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_termlist_begin" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = ((Xapian::Document const *)arg1)->termlist_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_termlist_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_termlist_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_termlist_end" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = ((Xapian::Document const *)arg1)->termlist_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_values_count(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_values_count self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_values_count" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::Document const *)arg1)->values_count();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_values_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::ValueIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_values_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_values_begin" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = ((Xapian::Document const *)arg1)->values_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_values_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::ValueIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_values_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_values_end" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = ((Xapian::Document const *)arg1)->values_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_get_docid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_get_docid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_get_docid" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = (Xapian::docid)((Xapian::Document const *)arg1)->get_docid();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_serialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_serialise self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_serialise" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = ((Xapian::Document const *)arg1)->serialise();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_unserialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Document result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_unserialise s ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Document_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = Xapian::Document::unserialise((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Document_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Document_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Document, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Document_get_description" "', argument " "1"" of type '" "Xapian::Document const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Document * >(argp1);
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Document(void *obj) {
Xapian::Document *arg1 = (Xapian::Document *) obj;
delete arg1;
}
static swig_method swig_Xapian_Document_methods[] = {
    {"get_value", _wrap_Document_get_value}, 
    {"add_value", _wrap_Document_add_value}, 
    {"remove_value", _wrap_Document_remove_value}, 
    {"clear_values", _wrap_Document_clear_values}, 
    {"get_data", _wrap_Document_get_data}, 
    {"set_data", _wrap_Document_set_data}, 
    {"add_posting", _wrap_Document_add_posting}, 
    {"add_term", _wrap_Document_add_term}, 
    {"add_boolean_term", _wrap_Document_add_boolean_term}, 
    {"remove_posting", _wrap_Document_remove_posting}, 
    {"remove_term", _wrap_Document_remove_term}, 
    {"clear_terms", _wrap_Document_clear_terms}, 
    {"termlist_count", _wrap_Document_termlist_count}, 
    {"termlist_begin", _wrap_Document_termlist_begin}, 
    {"termlist_end", _wrap_Document_termlist_end}, 
    {"values_count", _wrap_Document_values_count}, 
    {"values_begin", _wrap_Document_values_begin}, 
    {"values_end", _wrap_Document_values_end}, 
    {"get_docid", _wrap_Document_get_docid}, 
    {"serialise", _wrap_Document_serialise}, 
    {"get_description", _wrap_Document_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_Document_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Document_bases[] = {0};
static const char * swig_Xapian_Document_base_names[] = {0};
static swig_class _wrap_class_Xapian_Document = { "Document", &SWIGTYPE_p_Xapian__Document,_wrap_new_Document, swig_delete_Document, swig_Xapian_Document_methods, swig_Xapian_Document_attributes, swig_Xapian_Document_bases,swig_Xapian_Document_base_names, &swig_module };
SWIGINTERN int
_wrap_delete_PostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_PostingSource self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PostingSource" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_get_termfreq_min(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_get_termfreq_min self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_termfreq_min" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_min();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_get_termfreq_est(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_get_termfreq_est self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_termfreq_est" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_est();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_get_termfreq_max(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_get_termfreq_max self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_termfreq_max" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_max();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_get_maxweight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_get_maxweight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_maxweight" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_maxweight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_get_weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_get_weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_weight" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_weight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_get_docid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_get_docid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_docid" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = (Xapian::docid)((Xapian::PostingSource const *)arg1)->get_docid();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::weight arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::PostingSource_next self min_wt ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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);
  {
    try {
      (arg1)->next(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_skip_to(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::PostingSource_skip_to self did min_wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_check(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::PostingSource_check self did min_wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_at_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_at_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_at_end" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = (bool)((Xapian::PostingSource const *)arg1)->at_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_name" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = ((Xapian::PostingSource const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_init(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::PostingSource_init self db ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Database * >(argp2);
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_PostingSource_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::PostingSource_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PostingSource_get_description" "', argument " "1"" of type '" "Xapian::PostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = ((Xapian::PostingSource const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_PostingSource(void *obj) {
Xapian::PostingSource *arg1 = (Xapian::PostingSource *) obj;
delete arg1;
}
static swig_method swig_Xapian_PostingSource_methods[] = {
    {"get_termfreq_min", _wrap_PostingSource_get_termfreq_min}, 
    {"get_termfreq_est", _wrap_PostingSource_get_termfreq_est}, 
    {"get_termfreq_max", _wrap_PostingSource_get_termfreq_max}, 
    {"get_maxweight", _wrap_PostingSource_get_maxweight}, 
    {"get_weight", _wrap_PostingSource_get_weight}, 
    {"get_docid", _wrap_PostingSource_get_docid}, 
    {"next", _wrap_PostingSource_next}, 
    {"skip_to", _wrap_PostingSource_skip_to}, 
    {"check", _wrap_PostingSource_check}, 
    {"at_end", _wrap_PostingSource_at_end}, 
    {"name", _wrap_PostingSource_name}, 
    {"init", _wrap_PostingSource_init}, 
    {"get_description", _wrap_PostingSource_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_PostingSource_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_PostingSource_bases[] = {0};
static const char * swig_Xapian_PostingSource_base_names[] = {0};
static swig_class _wrap_class_Xapian_PostingSource = { "PostingSource", &SWIGTYPE_p_Xapian__PostingSource,0, swig_delete_PostingSource, swig_Xapian_PostingSource_methods, swig_Xapian_PostingSource_attributes, swig_Xapian_PostingSource_bases,swig_Xapian_PostingSource_base_names, &swig_module };
SWIGINTERN int
_wrap_new_ValuePostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::ValuePostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_ValuePostingSource slot_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValuePostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    try {
      result = (Xapian::ValuePostingSource *)new Xapian::ValuePostingSource(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValuePostingSource,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_get_termfreq_min(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValuePostingSource_get_termfreq_min self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_get_termfreq_min" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_min();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_get_termfreq_est(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValuePostingSource_get_termfreq_est self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_get_termfreq_est" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_est();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_get_termfreq_max(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValuePostingSource_get_termfreq_max self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_get_termfreq_max" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_max();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::weight arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValuePostingSource_next self min_wt ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_next" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  ecode2 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValuePostingSource_next" "', argument " "2"" of type '" "Xapian::weight""'");
  } 
  arg2 = static_cast< Xapian::weight >(val2);
  {
    try {
      (arg1)->next(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_skip_to(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::ValuePostingSource_skip_to self min_docid min_wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_skip_to" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValuePostingSource_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ValuePostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_check(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::ValuePostingSource_check self min_docid min_wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_check" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValuePostingSource_check" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ValuePostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_at_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValuePostingSource_at_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_at_end" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  {
    try {
      result = (bool)((Xapian::ValuePostingSource const *)arg1)->at_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_get_docid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValuePostingSource_get_docid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_get_docid" "', argument " "1"" of type '" "Xapian::ValuePostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  {
    try {
      result = (Xapian::docid)((Xapian::ValuePostingSource const *)arg1)->get_docid();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValuePostingSource_init(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValuePostingSource_init self db_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValuePostingSource_init" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValuePostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValuePostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Database * >(argp2);
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_ValuePostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ValuePostingSource self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValuePostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValuePostingSource" "', argument " "1"" of type '" "Xapian::ValuePostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValuePostingSource * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ValuePostingSource(void *obj) {
Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) obj;
delete arg1;
}
static swig_method swig_Xapian_ValuePostingSource_methods[] = {
    {"get_termfreq_min", _wrap_ValuePostingSource_get_termfreq_min}, 
    {"get_termfreq_est", _wrap_ValuePostingSource_get_termfreq_est}, 
    {"get_termfreq_max", _wrap_ValuePostingSource_get_termfreq_max}, 
    {"next", _wrap_ValuePostingSource_next}, 
    {"skip_to", _wrap_ValuePostingSource_skip_to}, 
    {"check", _wrap_ValuePostingSource_check}, 
    {"at_end", _wrap_ValuePostingSource_at_end}, 
    {"get_docid", _wrap_ValuePostingSource_get_docid}, 
    {"init", _wrap_ValuePostingSource_init}, 
    {0,0}
};
static swig_attribute swig_Xapian_ValuePostingSource_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ValuePostingSource_bases[] = {0,0};
static const char * swig_Xapian_ValuePostingSource_base_names[] = {"Xapian::PostingSource *",0};
static swig_class _wrap_class_Xapian_ValuePostingSource = { "ValuePostingSource", &SWIGTYPE_p_Xapian__ValuePostingSource,_wrap_new_ValuePostingSource, swig_delete_ValuePostingSource, swig_Xapian_ValuePostingSource_methods, swig_Xapian_ValuePostingSource_attributes, swig_Xapian_ValuePostingSource_bases,swig_Xapian_ValuePostingSource_base_names, &swig_module };
SWIGINTERN int
_wrap_new_ValueWeightPostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::ValueWeightPostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_ValueWeightPostingSource slot_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    try {
      result = (Xapian::ValueWeightPostingSource *)new Xapian::ValueWeightPostingSource(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueWeightPostingSource,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueWeightPostingSource_get_weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueWeightPostingSource_get_weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_get_weight" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::ValueWeightPostingSource const *)arg1)->get_weight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueWeightPostingSource_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueWeightPostingSource_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_name" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::ValueWeightPostingSource const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueWeightPostingSource_serialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueWeightPostingSource_serialise self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_serialise" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::ValueWeightPostingSource const *)arg1)->serialise();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueWeightPostingSource_unserialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::ValueWeightPostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueWeightPostingSource_unserialise self s ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_unserialise" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueWeightPostingSource_unserialise" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueWeightPostingSource_unserialise" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::ValueWeightPostingSource *)((Xapian::ValueWeightPostingSource const *)arg1)->unserialise((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueWeightPostingSource,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueWeightPostingSource_init(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueWeightPostingSource_init self db_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_init" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Database * >(argp2);
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueWeightPostingSource_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueWeightPostingSource_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueWeightPostingSource_get_description" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::ValueWeightPostingSource const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_ValueWeightPostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ValueWeightPostingSource self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::ValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueWeightPostingSource * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ValueWeightPostingSource(void *obj) {
Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) obj;
delete arg1;
}
static swig_method swig_Xapian_ValueWeightPostingSource_methods[] = {
    {"get_weight", _wrap_ValueWeightPostingSource_get_weight}, 
    {"name", _wrap_ValueWeightPostingSource_name}, 
    {"serialise", _wrap_ValueWeightPostingSource_serialise}, 
    {"unserialise", _wrap_ValueWeightPostingSource_unserialise}, 
    {"init", _wrap_ValueWeightPostingSource_init}, 
    {"get_description", _wrap_ValueWeightPostingSource_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_ValueWeightPostingSource_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ValueWeightPostingSource_bases[] = {0,0};
static const char * swig_Xapian_ValueWeightPostingSource_base_names[] = {"Xapian::ValuePostingSource *",0};
static swig_class _wrap_class_Xapian_ValueWeightPostingSource = { "ValueWeightPostingSource", &SWIGTYPE_p_Xapian__ValueWeightPostingSource,_wrap_new_ValueWeightPostingSource, swig_delete_ValueWeightPostingSource, swig_Xapian_ValueWeightPostingSource_methods, swig_Xapian_ValueWeightPostingSource_attributes, swig_Xapian_ValueWeightPostingSource_bases,swig_Xapian_ValueWeightPostingSource_base_names, &swig_module };
SWIGINTERN int
_wrap_new_DecreasingValueWeightPostingSource__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_DecreasingValueWeightPostingSource slot_ range_start_ range_end_ ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "3"" of type '" "Xapian::docid""'");
  } 
  arg3 = static_cast< Xapian::docid >(val3);
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DecreasingValueWeightPostingSource__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  Xapian::docid arg2 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_DecreasingValueWeightPostingSource slot_ range_start_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DecreasingValueWeightPostingSource__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_DecreasingValueWeightPostingSource slot_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DecreasingValueWeightPostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_DecreasingValueWeightPostingSource__SWIG_2(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_DecreasingValueWeightPostingSource__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_DecreasingValueWeightPostingSource__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_get_weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::DecreasingValueWeightPostingSource_get_weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_get_weight" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_weight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::DecreasingValueWeightPostingSource_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_name" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_serialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::DecreasingValueWeightPostingSource_serialise self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_serialise" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->serialise();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_unserialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::DecreasingValueWeightPostingSource_unserialise self s ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_unserialise" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecreasingValueWeightPostingSource_unserialise" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DecreasingValueWeightPostingSource_unserialise" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)((Xapian::DecreasingValueWeightPostingSource const *)arg1)->unserialise((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_init(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::DecreasingValueWeightPostingSource_init self db_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_init" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DecreasingValueWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DecreasingValueWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Database * >(argp2);
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::weight arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::DecreasingValueWeightPostingSource_next self min_wt ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_next" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  ecode2 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DecreasingValueWeightPostingSource_next" "', argument " "2"" of type '" "Xapian::weight""'");
  } 
  arg2 = static_cast< Xapian::weight >(val2);
  {
    try {
      (arg1)->next(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_skip_to(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::DecreasingValueWeightPostingSource_skip_to self min_docid min_wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_skip_to" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DecreasingValueWeightPostingSource_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecreasingValueWeightPostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_check(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::DecreasingValueWeightPostingSource_check self min_docid min_wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_check" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DecreasingValueWeightPostingSource_check" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "DecreasingValueWeightPostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DecreasingValueWeightPostingSource_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::DecreasingValueWeightPostingSource_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DecreasingValueWeightPostingSource_get_description" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_DecreasingValueWeightPostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_DecreasingValueWeightPostingSource self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DecreasingValueWeightPostingSource" "', argument " "1"" of type '" "Xapian::DecreasingValueWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DecreasingValueWeightPostingSource * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_DecreasingValueWeightPostingSource(void *obj) {
Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) obj;
delete arg1;
}
static swig_method swig_Xapian_DecreasingValueWeightPostingSource_methods[] = {
    {"get_weight", _wrap_DecreasingValueWeightPostingSource_get_weight}, 
    {"name", _wrap_DecreasingValueWeightPostingSource_name}, 
    {"serialise", _wrap_DecreasingValueWeightPostingSource_serialise}, 
    {"unserialise", _wrap_DecreasingValueWeightPostingSource_unserialise}, 
    {"init", _wrap_DecreasingValueWeightPostingSource_init}, 
    {"next", _wrap_DecreasingValueWeightPostingSource_next}, 
    {"skip_to", _wrap_DecreasingValueWeightPostingSource_skip_to}, 
    {"check", _wrap_DecreasingValueWeightPostingSource_check}, 
    {"get_description", _wrap_DecreasingValueWeightPostingSource_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_DecreasingValueWeightPostingSource_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_DecreasingValueWeightPostingSource_bases[] = {0,0};
static const char * swig_Xapian_DecreasingValueWeightPostingSource_base_names[] = {"Xapian::ValueWeightPostingSource *",0};
static swig_class _wrap_class_Xapian_DecreasingValueWeightPostingSource = { "DecreasingValueWeightPostingSource", &SWIGTYPE_p_Xapian__DecreasingValueWeightPostingSource,_wrap_new_DecreasingValueWeightPostingSource, swig_delete_DecreasingValueWeightPostingSource, swig_Xapian_DecreasingValueWeightPostingSource_methods, swig_Xapian_DecreasingValueWeightPostingSource_attributes, swig_Xapian_DecreasingValueWeightPostingSource_bases,swig_Xapian_DecreasingValueWeightPostingSource_base_names, &swig_module };
SWIGINTERN int
_wrap_new_ValueMapPostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::ValueMapPostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_ValueMapPostingSource slot_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValueMapPostingSource" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    try {
      result = (Xapian::ValueMapPostingSource *)new Xapian::ValueMapPostingSource(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueMapPostingSource,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueMapPostingSource_add_mapping(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::ValueMapPostingSource_add_mapping self key wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_add_mapping" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ValueMapPostingSource_add_mapping" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      (arg1)->add_mapping((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueMapPostingSource_clear_mappings(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueMapPostingSource_clear_mappings self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_clear_mappings" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
  {
    try {
      (arg1)->clear_mappings();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueMapPostingSource_set_default_weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueMapPostingSource_set_default_weight self wt ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueMapPostingSource_set_default_weight" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    try {
      (arg1)->set_default_weight(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueMapPostingSource_get_weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueMapPostingSource_get_weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_get_weight" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::ValueMapPostingSource const *)arg1)->get_weight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueMapPostingSource_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueMapPostingSource_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_name" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::ValueMapPostingSource const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueMapPostingSource_init(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueMapPostingSource_init self db_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_init" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueMapPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueMapPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Database * >(argp2);
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueMapPostingSource_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueMapPostingSource_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueMapPostingSource_get_description" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::ValueMapPostingSource const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_ValueMapPostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ValueMapPostingSource self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueMapPostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueMapPostingSource" "', argument " "1"" of type '" "Xapian::ValueMapPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueMapPostingSource * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ValueMapPostingSource(void *obj) {
Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) obj;
delete arg1;
}
static swig_method swig_Xapian_ValueMapPostingSource_methods[] = {
    {"add_mapping", _wrap_ValueMapPostingSource_add_mapping}, 
    {"clear_mappings", _wrap_ValueMapPostingSource_clear_mappings}, 
    {"set_default_weight", _wrap_ValueMapPostingSource_set_default_weight}, 
    {"get_weight", _wrap_ValueMapPostingSource_get_weight}, 
    {"name", _wrap_ValueMapPostingSource_name}, 
    {"init", _wrap_ValueMapPostingSource_init}, 
    {"get_description", _wrap_ValueMapPostingSource_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_ValueMapPostingSource_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ValueMapPostingSource_bases[] = {0,0};
static const char * swig_Xapian_ValueMapPostingSource_base_names[] = {"Xapian::ValuePostingSource *",0};
static swig_class _wrap_class_Xapian_ValueMapPostingSource = { "ValueMapPostingSource", &SWIGTYPE_p_Xapian__ValueMapPostingSource,_wrap_new_ValueMapPostingSource, swig_delete_ValueMapPostingSource, swig_Xapian_ValueMapPostingSource_methods, swig_Xapian_ValueMapPostingSource_attributes, swig_Xapian_ValueMapPostingSource_bases,swig_Xapian_ValueMapPostingSource_base_names, &swig_module };
SWIGINTERN int
_wrap_new_FixedWeightPostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::weight arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  Xapian::FixedWeightPostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_FixedWeightPostingSource wt ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_FixedWeightPostingSource" "', argument " "1"" of type '" "Xapian::weight""'");
  } 
  arg1 = static_cast< Xapian::weight >(val1);
  {
    try {
      result = (Xapian::FixedWeightPostingSource *)new Xapian::FixedWeightPostingSource(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__FixedWeightPostingSource,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_get_termfreq_min(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::FixedWeightPostingSource_get_termfreq_min self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_termfreq_min" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_min();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_get_termfreq_est(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::FixedWeightPostingSource_get_termfreq_est self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_termfreq_est" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_est();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_get_termfreq_max(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::FixedWeightPostingSource_get_termfreq_max self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_termfreq_max" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_max();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_get_weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::FixedWeightPostingSource_get_weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_weight" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::FixedWeightPostingSource const *)arg1)->get_weight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::weight arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::FixedWeightPostingSource_next self min_wt ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_next" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  ecode2 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FixedWeightPostingSource_next" "', argument " "2"" of type '" "Xapian::weight""'");
  } 
  arg2 = static_cast< Xapian::weight >(val2);
  {
    try {
      (arg1)->next(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_skip_to(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::FixedWeightPostingSource_skip_to self min_docid min_wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_skip_to" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FixedWeightPostingSource_skip_to" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FixedWeightPostingSource_skip_to" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_check(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::FixedWeightPostingSource_check self min_docid min_wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_check" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FixedWeightPostingSource_check" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "FixedWeightPostingSource_check" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_at_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::FixedWeightPostingSource_at_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_at_end" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      result = (bool)((Xapian::FixedWeightPostingSource const *)arg1)->at_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_get_docid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::FixedWeightPostingSource_get_docid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_docid" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      result = (Xapian::docid)((Xapian::FixedWeightPostingSource const *)arg1)->get_docid();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::FixedWeightPostingSource_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_name" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::FixedWeightPostingSource const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_init(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::FixedWeightPostingSource_init self db_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_init" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FixedWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FixedWeightPostingSource_init" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Database * >(argp2);
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_FixedWeightPostingSource_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::FixedWeightPostingSource_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FixedWeightPostingSource_get_description" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      result = ((Xapian::FixedWeightPostingSource const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_FixedWeightPostingSource(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_FixedWeightPostingSource self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__FixedWeightPostingSource, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FixedWeightPostingSource" "', argument " "1"" of type '" "Xapian::FixedWeightPostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::FixedWeightPostingSource * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_FixedWeightPostingSource(void *obj) {
Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) obj;
delete arg1;
}
static swig_method swig_Xapian_FixedWeightPostingSource_methods[] = {
    {"get_termfreq_min", _wrap_FixedWeightPostingSource_get_termfreq_min}, 
    {"get_termfreq_est", _wrap_FixedWeightPostingSource_get_termfreq_est}, 
    {"get_termfreq_max", _wrap_FixedWeightPostingSource_get_termfreq_max}, 
    {"get_weight", _wrap_FixedWeightPostingSource_get_weight}, 
    {"next", _wrap_FixedWeightPostingSource_next}, 
    {"skip_to", _wrap_FixedWeightPostingSource_skip_to}, 
    {"check", _wrap_FixedWeightPostingSource_check}, 
    {"at_end", _wrap_FixedWeightPostingSource_at_end}, 
    {"get_docid", _wrap_FixedWeightPostingSource_get_docid}, 
    {"name", _wrap_FixedWeightPostingSource_name}, 
    {"init", _wrap_FixedWeightPostingSource_init}, 
    {"get_description", _wrap_FixedWeightPostingSource_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_FixedWeightPostingSource_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_FixedWeightPostingSource_bases[] = {0,0};
static const char * swig_Xapian_FixedWeightPostingSource_base_names[] = {"Xapian::PostingSource *",0};
static swig_class _wrap_class_Xapian_FixedWeightPostingSource = { "FixedWeightPostingSource", &SWIGTYPE_p_Xapian__FixedWeightPostingSource,_wrap_new_FixedWeightPostingSource, swig_delete_FixedWeightPostingSource, swig_Xapian_FixedWeightPostingSource_methods, swig_Xapian_FixedWeightPostingSource_attributes, swig_Xapian_FixedWeightPostingSource_bases,swig_Xapian_FixedWeightPostingSource_base_names, &swig_module };
SWIGINTERN int
_wrap_new_MSet__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_MSet ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::MSet *)new Xapian::MSet();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSet,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_MSet__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::MSet *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_MSet other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__MSet,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MSet" "', argument " "1"" of type '" "Xapian::MSet const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MSet" "', argument " "1"" of type '" "Xapian::MSet const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::MSet *)new Xapian::MSet((Xapian::MSet const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSet,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_MSet(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_MSet__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_MSet__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_MSet(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_MSet self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MSet" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_fetch__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::MSet_fetch self begin end ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &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(objv[3], &argp3, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "3"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg3 = reinterpret_cast< Xapian::MSetIterator * >(argp3);
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch(*arg2,*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_fetch__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_fetch self item ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_fetch" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch(*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_fetch__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_fetch self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_fetch" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_fetch(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_MSet_fetch__SWIG_2(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_MSet_fetch__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_MSet_fetch__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_convert_to_percent__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::weight arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  Xapian::percent result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_convert_to_percent self wt ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::weight""'");
  } 
  arg2 = static_cast< Xapian::weight >(val2);
  {
    try {
      result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_convert_to_percent__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  Xapian::percent result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_convert_to_percent self item ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSet_convert_to_percent" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent((Xapian::MSetIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_convert_to_percent(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_MSet_convert_to_percent__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_MSet_convert_to_percent__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_termfreq(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_get_termfreq self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_termfreq" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MSet_get_termfreq" "', argument " "2"" of type '" "std::string""'"); 
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_termfreq(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_termweight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_get_termweight self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_termweight" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res) || !ptr) {
      SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), "in method '" "MSet_get_termweight" "', argument " "2"" of type '" "std::string""'"); 
    }
    arg2 = *ptr;
    if (SWIG_IsNewObj(res)) delete ptr;
  }
  {
    try {
      result = (Xapian::weight)((Xapian::MSet const *)arg1)->get_termweight(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_firstitem(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_firstitem self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_firstitem" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_firstitem();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_matches_lower_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_matches_lower_bound self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_matches_lower_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_lower_bound();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_matches_estimated(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_matches_estimated self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_matches_estimated" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_estimated();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_matches_upper_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_matches_upper_bound self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_matches_upper_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_upper_bound();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_uncollapsed_matches_lower_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_uncollapsed_matches_lower_bound self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_uncollapsed_matches_lower_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_lower_bound();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_uncollapsed_matches_estimated(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_uncollapsed_matches_estimated self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_uncollapsed_matches_estimated" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_estimated();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_uncollapsed_matches_upper_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_uncollapsed_matches_upper_bound self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_uncollapsed_matches_upper_bound" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_upper_bound();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_max_possible(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_max_possible self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_max_possible" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::weight)(arg1)->get_max_possible();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_max_attained(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_max_attained self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_max_attained" "', argument " "1"" of type '" "Xapian::MSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::weight)(arg1)->get_max_attained();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_size(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_size self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_size" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->size();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_empty(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_empty self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_empty" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = (bool)((Xapian::MSet const *)arg1)->empty();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::MSetIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_begin" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = ((Xapian::MSet const *)arg1)->begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::MSetIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_end" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = ((Xapian::MSet const *)arg1)->end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_back(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::MSetIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_back self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_back" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = ((Xapian::MSet const *)arg1)->back();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_hit(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::MSetIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_get_hit self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_hit" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_get_hit" "', argument " "2"" of type '" "Xapian::doccount""'");
  } 
  arg2 = static_cast< Xapian::doccount >(val2);
  {
    try {
      result = Xapian_MSet_get_hit((Xapian::MSet const *)arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSetIterator(static_cast< const Xapian::MSetIterator& >(result))), SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_document_percentage(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  int result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_get_document_percentage self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_get_document_percentage" "', argument " "2"" of type '" "Xapian::doccount""'");
  } 
  arg2 = static_cast< Xapian::doccount >(val2);
  {
    try {
      result = (int)Xapian_MSet_get_document_percentage((Xapian::MSet const *)arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::Document result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_get_document self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_get_document" "', argument " "2"" of type '" "Xapian::doccount""'");
  } 
  arg2 = static_cast< Xapian::doccount >(val2);
  {
    try {
      result = Xapian_MSet_get_document((Xapian::MSet const *)arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_docid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSet_get_docid self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MSet_get_docid" "', argument " "2"" of type '" "Xapian::doccount""'");
  } 
  arg2 = static_cast< Xapian::doccount >(val2);
  {
    try {
      result = (Xapian::docid)Xapian_MSet_get_docid((Xapian::MSet const *)arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSet_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSet_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSet_get_description" "', argument " "1"" of type '" "Xapian::MSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSet * >(argp1);
  {
    try {
      result = ((Xapian::MSet const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_MSet(void *obj) {
Xapian::MSet *arg1 = (Xapian::MSet *) obj;
delete arg1;
}
static swig_method swig_Xapian_MSet_methods[] = {
    {"fetch", _wrap_MSet_fetch}, 
    {"convert_to_percent", _wrap_MSet_convert_to_percent}, 
    {"get_termfreq", _wrap_MSet_get_termfreq}, 
    {"get_termweight", _wrap_MSet_get_termweight}, 
    {"get_firstitem", _wrap_MSet_get_firstitem}, 
    {"get_matches_lower_bound", _wrap_MSet_get_matches_lower_bound}, 
    {"get_matches_estimated", _wrap_MSet_get_matches_estimated}, 
    {"get_matches_upper_bound", _wrap_MSet_get_matches_upper_bound}, 
    {"get_uncollapsed_matches_lower_bound", _wrap_MSet_get_uncollapsed_matches_lower_bound}, 
    {"get_uncollapsed_matches_estimated", _wrap_MSet_get_uncollapsed_matches_estimated}, 
    {"get_uncollapsed_matches_upper_bound", _wrap_MSet_get_uncollapsed_matches_upper_bound}, 
    {"get_max_possible", _wrap_MSet_get_max_possible}, 
    {"get_max_attained", _wrap_MSet_get_max_attained}, 
    {"size", _wrap_MSet_size}, 
    {"empty", _wrap_MSet_empty}, 
    {"begin", _wrap_MSet_begin}, 
    {"end", _wrap_MSet_end}, 
    {"back", _wrap_MSet_back}, 
    {"get_hit", _wrap_MSet_get_hit}, 
    {"get_document_percentage", _wrap_MSet_get_document_percentage}, 
    {"get_document", _wrap_MSet_get_document}, 
    {"get_docid", _wrap_MSet_get_docid}, 
    {"get_description", _wrap_MSet_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_MSet_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_MSet_bases[] = {0};
static const char * swig_Xapian_MSet_base_names[] = {0};
static swig_class _wrap_class_Xapian_MSet = { "MSet", &SWIGTYPE_p_Xapian__MSet,_wrap_new_MSet, swig_delete_MSet, swig_Xapian_MSet_methods, swig_Xapian_MSet_attributes, swig_Xapian_MSet_bases,swig_Xapian_MSet_base_names, &swig_module };
SWIGINTERN int
_wrap_new_MSetIterator__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_MSetIterator ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::MSetIterator *)new Xapian::MSetIterator();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSetIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_MSetIterator__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::MSetIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_MSetIterator other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = (Xapian::MSetIterator *)new Xapian::MSetIterator((Xapian::MSetIterator const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MSetIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_MSetIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_MSetIterator__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_MSetIterator__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_MSetIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_MSetIterator self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MSetIterator" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_get_docid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_get_docid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_docid" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = (Xapian::docid)Xapian_MSetIterator_get_docid((Xapian::MSetIterator const *)arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_next self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 {
      Xapian_MSetIterator_next(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_prev(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_prev self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_prev" "', argument " "1"" of type '" "Xapian::MSetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      Xapian_MSetIterator_prev(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_equals(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MSetIterator_equals self other ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MSetIterator_equals" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MSetIterator_equals" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      result = (bool)Xapian_MSetIterator_equals((Xapian::MSetIterator const *)arg1,(Xapian::MSetIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_get_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Document result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_get_document self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_document" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_document();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_get_rank(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_get_rank self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_rank" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_rank();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_get_weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_get_weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_weight" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::MSetIterator const *)arg1)->get_weight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_get_collapse_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_get_collapse_key self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_collapse_key" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_collapse_key();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_get_collapse_count(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_get_collapse_count self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_collapse_count" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_collapse_count();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_get_percent(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::percent result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_get_percent self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_percent" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = (Xapian::percent)((Xapian::MSetIterator const *)arg1)->get_percent();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MSetIterator_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MSetIterator_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MSetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MSetIterator_get_description" "', argument " "1"" of type '" "Xapian::MSetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MSetIterator * >(argp1);
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_MSetIterator(void *obj) {
Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) obj;
delete arg1;
}
static swig_method swig_Xapian_MSetIterator_methods[] = {
    {"get_docid", _wrap_MSetIterator_get_docid}, 
    {"next", _wrap_MSetIterator_next}, 
    {"prev", _wrap_MSetIterator_prev}, 
    {"equals", _wrap_MSetIterator_equals}, 
    {"get_document", _wrap_MSetIterator_get_document}, 
    {"get_rank", _wrap_MSetIterator_get_rank}, 
    {"get_weight", _wrap_MSetIterator_get_weight}, 
    {"get_collapse_key", _wrap_MSetIterator_get_collapse_key}, 
    {"get_collapse_count", _wrap_MSetIterator_get_collapse_count}, 
    {"get_percent", _wrap_MSetIterator_get_percent}, 
    {"get_description", _wrap_MSetIterator_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_MSetIterator_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_MSetIterator_bases[] = {0};
static const char * swig_Xapian_MSetIterator_base_names[] = {0};
static swig_class _wrap_class_Xapian_MSetIterator = { "MSetIterator", &SWIGTYPE_p_Xapian__MSetIterator,_wrap_new_MSetIterator, swig_delete_MSetIterator, swig_Xapian_MSetIterator_methods, swig_Xapian_MSetIterator_attributes, swig_Xapian_MSetIterator_bases,swig_Xapian_MSetIterator_base_names, &swig_module };
SWIGINTERN int
_wrap_new_ESet__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_ESet ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::ESet *)new Xapian::ESet();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESet,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_ESet__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::ESet *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_ESet other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__ESet,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESet" "', argument " "1"" of type '" "Xapian::ESet const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ESet" "', argument " "1"" of type '" "Xapian::ESet const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      result = (Xapian::ESet *)new Xapian::ESet((Xapian::ESet const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESet,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_ESet(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_ESet__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ESet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_ESet__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_ESet(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ESet self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESet" "', argument " "1"" of type '" "Xapian::ESet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESet_get_ebound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESet_get_ebound self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_get_ebound" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::ESet const *)arg1)->get_ebound();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESet_size(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESet_size self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_size" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::ESet const *)arg1)->size();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESet_empty(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESet_empty self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_empty" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      result = (bool)((Xapian::ESet const *)arg1)->empty();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESet_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::ESetIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESet_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_begin" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      result = ((Xapian::ESet const *)arg1)->begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESet_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::ESetIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESet_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_end" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      result = ((Xapian::ESet const *)arg1)->end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESet_back(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::ESetIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESet_back self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_back" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      result = ((Xapian::ESet const *)arg1)->back();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ESetIterator(static_cast< const Xapian::ESetIterator& >(result))), SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESet_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESet_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESet_get_description" "', argument " "1"" of type '" "Xapian::ESet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESet * >(argp1);
  {
    try {
      result = ((Xapian::ESet const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ESet(void *obj) {
Xapian::ESet *arg1 = (Xapian::ESet *) obj;
delete arg1;
}
static swig_method swig_Xapian_ESet_methods[] = {
    {"get_ebound", _wrap_ESet_get_ebound}, 
    {"size", _wrap_ESet_size}, 
    {"empty", _wrap_ESet_empty}, 
    {"begin", _wrap_ESet_begin}, 
    {"end", _wrap_ESet_end}, 
    {"back", _wrap_ESet_back}, 
    {"get_description", _wrap_ESet_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_ESet_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ESet_bases[] = {0};
static const char * swig_Xapian_ESet_base_names[] = {0};
static swig_class _wrap_class_Xapian_ESet = { "ESet", &SWIGTYPE_p_Xapian__ESet,_wrap_new_ESet, swig_delete_ESet, swig_Xapian_ESet_methods, swig_Xapian_ESet_attributes, swig_Xapian_ESet_bases,swig_Xapian_ESet_base_names, &swig_module };
SWIGINTERN int
_wrap_new_ESetIterator__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_ESetIterator ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::ESetIterator *)new Xapian::ESetIterator();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESetIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_ESetIterator__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::ESetIterator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_ESetIterator other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__ESetIterator,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      result = (Xapian::ESetIterator *)new Xapian::ESetIterator((Xapian::ESetIterator const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ESetIterator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_ESetIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_ESetIterator__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__ESetIterator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_ESetIterator__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_ESetIterator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ESetIterator self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESetIterator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ESetIterator" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESetIterator_get_term(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESetIterator_get_term self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_get_term" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      result = Xapian_ESetIterator_get_term((Xapian::ESetIterator const *)arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESetIterator_next(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESetIterator_next self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 {
      Xapian_ESetIterator_next(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESetIterator_prev(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESetIterator_prev self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_prev" "', argument " "1"" of type '" "Xapian::ESetIterator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      Xapian_ESetIterator_prev(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESetIterator_equals(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ESetIterator_equals self other ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__ESetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ESetIterator_equals" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ESetIterator_equals" "', argument " "2"" of type '" "Xapian::ESetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ESetIterator * >(argp2);
  {
    try {
      result = (bool)Xapian_ESetIterator_equals((Xapian::ESetIterator const *)arg1,(Xapian::ESetIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESetIterator_get_weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESetIterator_get_weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_get_weight" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::ESetIterator const *)arg1)->get_weight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ESetIterator_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ESetIterator_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ESetIterator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ESetIterator_get_description" "', argument " "1"" of type '" "Xapian::ESetIterator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ESetIterator * >(argp1);
  {
    try {
      result = ((Xapian::ESetIterator const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ESetIterator(void *obj) {
Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) obj;
delete arg1;
}
static swig_method swig_Xapian_ESetIterator_methods[] = {
    {"get_term", _wrap_ESetIterator_get_term}, 
    {"next", _wrap_ESetIterator_next}, 
    {"prev", _wrap_ESetIterator_prev}, 
    {"equals", _wrap_ESetIterator_equals}, 
    {"get_weight", _wrap_ESetIterator_get_weight}, 
    {"get_description", _wrap_ESetIterator_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_ESetIterator_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ESetIterator_bases[] = {0};
static const char * swig_Xapian_ESetIterator_base_names[] = {0};
static swig_class _wrap_class_Xapian_ESetIterator = { "ESetIterator", &SWIGTYPE_p_Xapian__ESetIterator,_wrap_new_ESetIterator, swig_delete_ESetIterator, swig_Xapian_ESetIterator_methods, swig_Xapian_ESetIterator_attributes, swig_Xapian_ESetIterator_bases,swig_Xapian_ESetIterator_base_names, &swig_module };
SWIGINTERN int
_wrap_new_RSet__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::RSet *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_RSet other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__RSet,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RSet" "', argument " "1"" of type '" "Xapian::RSet const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_RSet" "', argument " "1"" of type '" "Xapian::RSet const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  {
    try {
      result = (Xapian::RSet *)new Xapian::RSet((Xapian::RSet const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RSet,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_RSet__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_RSet ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::RSet *)new Xapian::RSet();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__RSet,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_RSet(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_RSet__SWIG_1(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_RSet__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_RSet(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_RSet self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__RSet, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RSet" "', argument " "1"" of type '" "Xapian::RSet *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_size(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::RSet_size self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_size" "', argument " "1"" of type '" "Xapian::RSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::RSet const *)arg1)->size();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_empty(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::RSet_empty self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_empty" "', argument " "1"" of type '" "Xapian::RSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  {
    try {
      result = (bool)((Xapian::RSet const *)arg1)->empty();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_add_document__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::RSet_add_document self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      (arg1)->add_document(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_add_document__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::RSet_add_document self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_add_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      (arg1)->add_document(*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_add_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_RSet_add_document__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_RSet_add_document__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_remove_document__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::RSet_remove_document self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      (arg1)->remove_document(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_remove_document__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::RSet_remove_document self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_remove_document" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      (arg1)->remove_document(*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_remove_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_RSet_remove_document__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_RSet_remove_document__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_contains__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::RSet_contains self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = (bool)(arg1)->contains(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_contains__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::RSet_contains self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RSet_contains" "', argument " "2"" of type '" "Xapian::MSetIterator &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      result = (bool)(arg1)->contains(*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_contains(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_RSet_contains__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_RSet_contains__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_RSet_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::RSet_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RSet_get_description" "', argument " "1"" of type '" "Xapian::RSet const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::RSet * >(argp1);
  {
    try {
      result = ((Xapian::RSet const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_RSet(void *obj) {
Xapian::RSet *arg1 = (Xapian::RSet *) obj;
delete arg1;
}
static swig_method swig_Xapian_RSet_methods[] = {
    {"size", _wrap_RSet_size}, 
    {"empty", _wrap_RSet_empty}, 
    {"add_document", _wrap_RSet_add_document}, 
    {"remove_document", _wrap_RSet_remove_document}, 
    {"contains", _wrap_RSet_contains}, 
    {"get_description", _wrap_RSet_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_RSet_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_RSet_bases[] = {0};
static const char * swig_Xapian_RSet_base_names[] = {0};
static swig_class _wrap_class_Xapian_RSet = { "RSet", &SWIGTYPE_p_Xapian__RSet,_wrap_new_RSet, swig_delete_RSet, swig_Xapian_RSet_methods, swig_Xapian_RSet_attributes, swig_Xapian_RSet_bases,swig_Xapian_RSet_base_names, &swig_module };
SWIGINTERN int
_wrap_MatchDecider_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MatchDecider_apply self doc ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchDecider_apply" "', argument " "1"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MatchDecider_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatchDecider_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  {
    try {
      result = (bool)((Xapian::MatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_MatchDecider(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_MatchDecider self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MatchDecider, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatchDecider" "', argument " "1"" of type '" "Xapian::MatchDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchDecider * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_MatchDecider(void *obj) {
Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) obj;
delete arg1;
}
static swig_method swig_Xapian_MatchDecider_methods[] = {
    {"apply", _wrap_MatchDecider_apply}, 
    {0,0}
};
static swig_attribute swig_Xapian_MatchDecider_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_MatchDecider_bases[] = {0};
static const char * swig_Xapian_MatchDecider_base_names[] = {0};
static swig_class _wrap_class_Xapian_MatchDecider = { "MatchDecider", &SWIGTYPE_p_Xapian__MatchDecider,0, swig_delete_MatchDecider, swig_Xapian_MatchDecider_methods, swig_Xapian_MatchDecider_attributes, swig_Xapian_MatchDecider_bases,swig_Xapian_MatchDecider_base_names, &swig_module };
SWIGINTERN int
_wrap_new_Enquire(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::Enquire *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Enquire databases ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Enquire" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Enquire" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = (Xapian::Enquire *)new Xapian::Enquire((Xapian::Database const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Enquire,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_Enquire(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Enquire self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Enquire, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Enquire" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_query__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  Xapian::termcount arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_query self query qlen ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Query * >(argp2);
  ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_query" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      (arg1)->set_query((Xapian::Query const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_query__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_query self query ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_set_query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Query * >(argp2);
  {
    try {
      (arg1)->set_query((Xapian::Query const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_query(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Query, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Enquire_set_query__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Query, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_query__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_query(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Query *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Enquire_get_query self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_query" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  {
    try {
      result = (Xapian::Query *) &(arg1)->get_query();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_add_matchspy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MatchSpy *arg2 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_add_matchspy self spy ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_add_matchspy" "', argument " "2"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2);
  {
    try {
      (arg1)->add_matchspy(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_clear_matchspies(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Enquire_clear_matchspies self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_clear_matchspies" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  {
    try {
      (arg1)->clear_matchspies();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_weighting_scheme(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_weighting_scheme self weight ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Weight,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_set_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Weight * >(argp2);
  {
    try {
      (arg1)->set_weighting_scheme((Xapian::Weight const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_collapse_key__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_collapse_key self collapse_key collapse_max ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_collapse_key" "', argument " "3"" of type '" "Xapian::doccount""'");
  } 
  arg3 = static_cast< Xapian::doccount >(val3);
  {
    try {
      (arg1)->set_collapse_key(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_collapse_key__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_collapse_key self collapse_key ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_collapse_key" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      (arg1)->set_collapse_key(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_collapse_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Enquire_set_collapse_key__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_collapse_key__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_docid_order(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Enquire::docid_order arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_docid_order self order ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_docid_order" "', argument " "2"" of type '" "Xapian::Enquire::docid_order""'");
  } 
  arg2 = static_cast< Xapian::Enquire::docid_order >(val2);
  {
    try {
      (arg1)->set_docid_order(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_cutoff__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_cutoff self percent_cutoff weight_cutoff ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_cutoff" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      (arg1)->set_cutoff(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_cutoff__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_cutoff self percent_cutoff ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_cutoff" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      (arg1)->set_cutoff(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_cutoff(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Enquire_set_cutoff__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_cutoff__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_relevance(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Enquire_set_sort_by_relevance self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_set_sort_by_relevance" "', argument " "1"" of type '" "Xapian::Enquire *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  {
    try {
      (arg1)->set_sort_by_relevance();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_value__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_sort_by_value self sort_key reverse ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_value" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_sort_by_value(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_value__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_sort_by_value self sort_key ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_value" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      (arg1)->set_sort_by_value(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Enquire_set_sort_by_value__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_sort_by_value__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_sort_by_value_then_relevance self sort_key reverse ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_sort_by_value_then_relevance(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_value_then_relevance__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_sort_by_value_then_relevance self sort_key ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_value_then_relevance" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      (arg1)->set_sort_by_value_then_relevance(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_value_then_relevance(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Enquire_set_sort_by_value_then_relevance__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_sort_by_value_then_relevance__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_sort_by_relevance_then_value self sort_key reverse ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_sort_by_relevance_then_value(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_relevance_then_value__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_sort_by_relevance_then_value self sort_key ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_set_sort_by_relevance_then_value" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      (arg1)->set_sort_by_relevance_then_value(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_relevance_then_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Enquire_set_sort_by_relevance_then_value__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_sort_by_relevance_then_value__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_key__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_sort_by_key self sorter reverse ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_key" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_sort_by_key(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_key__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_sort_by_key self sorter ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
  {
    try {
      (arg1)->set_sort_by_key(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Sorter, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Enquire_set_sort_by_key__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__KeyMaker, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_sort_by_key__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_sort_by_key_then_relevance self sorter reverse ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_sort_by_key_then_relevance(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_key_then_relevance__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_sort_by_key_then_relevance self sorter ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_key_then_relevance" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
  {
    try {
      (arg1)->set_sort_by_key_then_relevance(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_key_then_relevance(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Sorter, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Enquire_set_sort_by_key_then_relevance__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__KeyMaker, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_sort_by_key_then_relevance__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_set_sort_by_relevance_then_key self sorter reverse ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->set_sort_by_relevance_then_key(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_relevance_then_key__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_set_sort_by_relevance_then_key self sorter ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2,SWIGTYPE_p_Xapian__Sorter, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_set_sort_by_relevance_then_key" "', argument " "2"" of type '" "Xapian::Sorter *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Sorter * >(argp2);
  {
    try {
      (arg1)->set_sort_by_relevance_then_key(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_set_sort_by_relevance_then_key(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Sorter, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Enquire_set_sort_by_relevance_then_key__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__KeyMaker, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_set_sort_by_relevance_then_key__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_mset__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooooooo:xapian::Enquire_get_mset self first maxitems checkatleast omrset mdecider matchspy ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &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(objv[5], &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(objv[6], &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(objv[7], &argp7,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Enquire_get_mset" "', argument " "7"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg7 = reinterpret_cast< Xapian::MatchDecider * >(argp7);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6,(Xapian::MatchDecider const *)arg7);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_mset__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooooo:xapian::Enquire_get_mset self first maxitems checkatleast omrset mdecider ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &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(objv[5], &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(objv[6], &argp6,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Enquire_get_mset" "', argument " "6"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg6 = reinterpret_cast< Xapian::MatchDecider * >(argp6);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_mset__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooooo:xapian::Enquire_get_mset self first maxitems checkatleast omrset ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &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(objv[5], &argp5,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::RSet const *""'"); 
  }
  arg5 = reinterpret_cast< Xapian::RSet * >(argp5);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_mset__SWIG_3(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::Enquire_get_mset self first maxitems checkatleast ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::doccount""'");
  } 
  arg4 = static_cast< Xapian::doccount >(val4);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_mset__SWIG_4(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_get_mset self first maxitems ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Enquire_get_mset" "', argument " "3"" of type '" "Xapian::doccount""'");
  } 
  arg3 = static_cast< Xapian::doccount >(val3);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_mset__SWIG_5(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooooo:xapian::Enquire_get_mset self first maxitems omrset mdecider ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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(objv[4], &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(objv[5], &argp5,SWIGTYPE_p_Xapian__MatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Enquire_get_mset" "', argument " "5"" of type '" "Xapian::MatchDecider const *""'"); 
  }
  arg5 = reinterpret_cast< Xapian::MatchDecider * >(argp5);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4,(Xapian::MatchDecider const *)arg5);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_mset__SWIG_6(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::Enquire_get_mset self first maxitems omrset ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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(objv[4], &argp4,SWIGTYPE_p_Xapian__RSet, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Enquire_get_mset" "', argument " "4"" of type '" "Xapian::RSet const *""'"); 
  }
  arg4 = reinterpret_cast< Xapian::RSet * >(argp4);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::MSet(static_cast< const Xapian::MSet& >(result))), SWIGTYPE_p_Xapian__MSet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_mset(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Enquire_get_mset__SWIG_4(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_Enquire_get_mset__SWIG_6(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_Enquire_get_mset__SWIG_3(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
          _v = SWIG_CheckState(res);
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_Enquire_get_mset__SWIG_5(clientData, interp, objc, argv - 1);
            }
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              return _wrap_Enquire_get_mset__SWIG_2(clientData, interp, objc, argv - 1);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                return _wrap_Enquire_get_mset__SWIG_1(clientData, interp, objc, argv - 1);
              }
            }
          }
        }
      }
    }
  }
  if (argc == 7) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            void *vptr = 0;
            int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
            _v = SWIG_CheckState(res);
            if (_v) {
              void *vptr = 0;
              int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
              _v = SWIG_CheckState(res);
              if (_v) {
                void *vptr = 0;
                int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_Xapian__MatchDecider, 0);
                _v = SWIG_CheckState(res);
                if (_v) {
                  return _wrap_Enquire_get_mset__SWIG_0(clientData, interp, objc, argv - 1);
                }
              }
            }
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_eset__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  Xapian::ESet result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooooo:xapian::Enquire_get_eset self maxitems omrset flags k ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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(objv[3], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
  }
  arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
  ecode4 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[4], &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_TCL_CALL_ARGS_2(objv[5], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Enquire_get_eset" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_eset__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  Xapian::ESet result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::Enquire_get_eset self maxitems omrset flags ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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(objv[3], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
  }
  arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
  ecode4 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[4], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Enquire_get_eset" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_eset__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  Xapian::ESet result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Enquire_get_eset self maxitems omrset ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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(objv[3], &argp3, SWIGTYPE_p_Xapian__RSet,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_eset" "', argument " "3"" of type '" "Xapian::RSet const &""'"); 
  }
  arg3 = reinterpret_cast< Xapian::RSet * >(argp3);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ESet(static_cast< const Xapian::ESet& >(result))), SWIGTYPE_p_Xapian__ESet, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_eset(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Enquire_get_eset__SWIG_2(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_Enquire_get_eset__SWIG_1(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__RSet, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_Enquire_get_eset__SWIG_0(clientData, interp, objc, argv - 1);
            }
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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) 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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_matching_terms_begin__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_get_matching_terms_begin self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_matching_terms_end__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_get_matching_terms_end self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_matching_terms_begin__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_get_matching_terms_begin self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_matching_terms_begin" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin((Xapian::MSetIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_matching_terms_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Enquire_get_matching_terms_begin__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Enquire_get_matching_terms_begin__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_matching_terms_end__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_get_matching_terms_end self i ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_matching_terms_end" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_matching_terms_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__MSetIterator, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Enquire_get_matching_terms_end__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Enquire, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Enquire_get_matching_terms_end__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_matching_terms(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  std::pair< Xapian::TermIterator,Xapian::TermIterator > result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Enquire_get_matching_terms self hit ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_matching_terms" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__MSetIterator,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Enquire_get_matching_terms" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Enquire_get_matching_terms" "', argument " "2"" of type '" "Xapian::MSetIterator const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MSetIterator * >(argp2);
  {
    try {
      result = Xapian_Enquire_get_matching_terms((Xapian::Enquire const *)arg1,(Xapian::MSetIterator const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  {
    Tcl_Obj * list = Tcl_NewListObj(0, NULL);
    
    for (Xapian::TermIterator i = (&result)->first; i != (&result)->second; ++i) {
      Tcl_Obj * str = Tcl_NewStringObj((*i).data(), (*i).length());
      if (Tcl_ListObjAppendElement(interp, list, str) != TCL_OK)
      return TCL_ERROR;
    }
    
    Tcl_SetObjResult(interp, list);
  }
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Enquire_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Enquire_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Enquire, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Enquire_get_description" "', argument " "1"" of type '" "Xapian::Enquire const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Enquire * >(argp1);
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Enquire(void *obj) {
Xapian::Enquire *arg1 = (Xapian::Enquire *) obj;
delete arg1;
}
static swig_method swig_Xapian_Enquire_methods[] = {
    {"set_query", _wrap_Enquire_set_query}, 
    {"get_query", _wrap_Enquire_get_query}, 
    {"add_matchspy", _wrap_Enquire_add_matchspy}, 
    {"clear_matchspies", _wrap_Enquire_clear_matchspies}, 
    {"set_weighting_scheme", _wrap_Enquire_set_weighting_scheme}, 
    {"set_collapse_key", _wrap_Enquire_set_collapse_key}, 
    {"set_docid_order", _wrap_Enquire_set_docid_order}, 
    {"set_cutoff", _wrap_Enquire_set_cutoff}, 
    {"set_sort_by_relevance", _wrap_Enquire_set_sort_by_relevance}, 
    {"set_sort_by_value", _wrap_Enquire_set_sort_by_value}, 
    {"set_sort_by_value_then_relevance", _wrap_Enquire_set_sort_by_value_then_relevance}, 
    {"set_sort_by_relevance_then_value", _wrap_Enquire_set_sort_by_relevance_then_value}, 
    {"set_sort_by_key", _wrap_Enquire_set_sort_by_key}, 
    {"set_sort_by_key_then_relevance", _wrap_Enquire_set_sort_by_key_then_relevance}, 
    {"set_sort_by_relevance_then_key", _wrap_Enquire_set_sort_by_relevance_then_key}, 
    {"get_mset", _wrap_Enquire_get_mset}, 
    {"get_eset", _wrap_Enquire_get_eset}, 
    {"get_matching_terms_begin", _wrap_Enquire_get_matching_terms_begin}, 
    {"get_matching_terms_end", _wrap_Enquire_get_matching_terms_end}, 
    {"get_matching_terms", _wrap_Enquire_get_matching_terms}, 
    {"get_description", _wrap_Enquire_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_Enquire_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Enquire_bases[] = {0};
static const char * swig_Xapian_Enquire_base_names[] = {0};
static swig_class _wrap_class_Xapian_Enquire = { "Enquire", &SWIGTYPE_p_Xapian__Enquire,_wrap_new_Enquire, swig_delete_Enquire, swig_Xapian_Enquire_methods, swig_Xapian_Enquire_attributes, swig_Xapian_Enquire_bases,swig_Xapian_Enquire_base_names, &swig_module };
SWIGINTERN int
_wrap_new_Registry__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::Registry *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Registry other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__Registry,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Registry" "', argument " "1"" of type '" "Xapian::Registry const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Registry" "', argument " "1"" of type '" "Xapian::Registry const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
  {
    try {
      result = (Xapian::Registry *)new Xapian::Registry((Xapian::Registry const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Registry,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Registry__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_Registry ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::Registry *)new Xapian::Registry();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Registry,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Registry(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_Registry__SWIG_1(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Registry, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Registry__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_Registry(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Registry self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Registry, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Registry" "', argument " "1"" of type '" "Xapian::Registry *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Registry_register_weighting_scheme(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Registry_register_weighting_scheme self wt ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Weight,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_register_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_register_weighting_scheme" "', argument " "2"" of type '" "Xapian::Weight const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Weight * >(argp2);
  {
    try {
      (arg1)->register_weighting_scheme((Xapian::Weight const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Registry_get_weighting_scheme(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::Weight *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Registry_get_weighting_scheme self name ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_get_weighting_scheme" "', argument " "1"" of type '" "Xapian::Registry const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_get_weighting_scheme" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_get_weighting_scheme" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::Weight *)((Xapian::Registry const *)arg1)->get_weighting_scheme((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Weight,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Registry_register_posting_source(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::PostingSource *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Registry_register_posting_source self source ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__PostingSource,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_register_posting_source" "', argument " "2"" of type '" "Xapian::PostingSource const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_register_posting_source" "', argument " "2"" of type '" "Xapian::PostingSource const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::PostingSource * >(argp2);
  {
    try {
      (arg1)->register_posting_source((Xapian::PostingSource const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Registry_get_posting_source(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::PostingSource *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Registry_get_posting_source self name ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_get_posting_source" "', argument " "1"" of type '" "Xapian::Registry const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_get_posting_source" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_get_posting_source" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::PostingSource *)((Xapian::Registry const *)arg1)->get_posting_source((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__PostingSource,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Registry_register_match_spy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::MatchSpy *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Registry_register_match_spy self spy ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__MatchSpy,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_register_match_spy" "', argument " "2"" of type '" "Xapian::MatchSpy const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_register_match_spy" "', argument " "2"" of type '" "Xapian::MatchSpy const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::MatchSpy * >(argp2);
  {
    try {
      (arg1)->register_match_spy((Xapian::MatchSpy const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Registry_get_match_spy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::MatchSpy *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Registry_get_match_spy self name ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Registry, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Registry_get_match_spy" "', argument " "1"" of type '" "Xapian::Registry const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Registry * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Registry_get_match_spy" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Registry_get_match_spy" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::MatchSpy *)((Xapian::Registry const *)arg1)->get_match_spy((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MatchSpy,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Registry(void *obj) {
Xapian::Registry *arg1 = (Xapian::Registry *) obj;
delete arg1;
}
static swig_method swig_Xapian_Registry_methods[] = {
    {"register_weighting_scheme", _wrap_Registry_register_weighting_scheme}, 
    {"get_weighting_scheme", _wrap_Registry_get_weighting_scheme}, 
    {"register_posting_source", _wrap_Registry_register_posting_source}, 
    {"get_posting_source", _wrap_Registry_get_posting_source}, 
    {"register_match_spy", _wrap_Registry_register_match_spy}, 
    {"get_match_spy", _wrap_Registry_get_match_spy}, 
    {0,0}
};
static swig_attribute swig_Xapian_Registry_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Registry_bases[] = {0};
static const char * swig_Xapian_Registry_base_names[] = {0};
static swig_class _wrap_class_Xapian_Registry = { "Registry", &SWIGTYPE_p_Xapian__Registry,_wrap_new_Registry, swig_delete_Registry, swig_Xapian_Registry_methods, swig_Xapian_Registry_attributes, swig_Xapian_Registry_bases,swig_Xapian_Registry_base_names, &swig_module };
SWIGINTERN int
_wrap_delete_Weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Weight, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Weight" "', argument " "1"" of type '" "Xapian::Weight *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Weight_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Weight_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_name" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      result = ((Xapian::Weight const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Weight_get_sumpart(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Weight_get_sumpart self wdf doclen ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Weight_get_maxpart(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Weight_get_maxpart self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxpart();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Weight_get_sumextra(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Weight_get_sumextra self doclen ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Weight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumextra(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Weight_get_maxextra(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Weight_get_maxextra self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxextra();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Weight_get_sumpart_needs_doclength_(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Weight_get_sumpart_needs_doclength_ self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_sumpart_needs_doclength_" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_doclength_();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Weight_get_sumpart_needs_wdf_(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Weight_get_sumpart_needs_wdf_ self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Weight_get_sumpart_needs_wdf_" "', argument " "1"" of type '" "Xapian::Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Weight * >(argp1);
  {
    try {
      result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_wdf_();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Weight(void *obj) {
Xapian::Weight *arg1 = (Xapian::Weight *) obj;
delete arg1;
}
static swig_method swig_Xapian_Weight_methods[] = {
    {"name", _wrap_Weight_name}, 
    {"get_sumpart", _wrap_Weight_get_sumpart}, 
    {"get_maxpart", _wrap_Weight_get_maxpart}, 
    {"get_sumextra", _wrap_Weight_get_sumextra}, 
    {"get_maxextra", _wrap_Weight_get_maxextra}, 
    {"get_sumpart_needs_doclength_", _wrap_Weight_get_sumpart_needs_doclength_}, 
    {"get_sumpart_needs_wdf_", _wrap_Weight_get_sumpart_needs_wdf_}, 
    {0,0}
};
static swig_attribute swig_Xapian_Weight_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Weight_bases[] = {0};
static const char * swig_Xapian_Weight_base_names[] = {0};
static swig_class _wrap_class_Xapian_Weight = { "Weight", &SWIGTYPE_p_Xapian__Weight,0, swig_delete_Weight, swig_Xapian_Weight_methods, swig_Xapian_Weight_attributes, swig_Xapian_Weight_bases,swig_Xapian_Weight_base_names, &swig_module };
SWIGINTERN int
_wrap_new_BoolWeight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BoolWeight *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_BoolWeight ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::BoolWeight *)new Xapian::BoolWeight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BoolWeight,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BoolWeight_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::BoolWeight_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_name" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
  {
    try {
      result = ((Xapian::BoolWeight const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BoolWeight_get_sumpart(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::BoolWeight_get_sumpart self wdf doclen ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoolWeight_get_sumpart" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BoolWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_sumpart(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BoolWeight_get_maxpart(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::BoolWeight_get_maxpart self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_maxpart();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BoolWeight_get_sumextra(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::BoolWeight_get_sumextra self doclen ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BoolWeight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_sumextra(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BoolWeight_get_maxextra(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::BoolWeight_get_maxextra self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BoolWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BoolWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::BoolWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_maxextra();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_BoolWeight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_BoolWeight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BoolWeight, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BoolWeight" "', argument " "1"" of type '" "Xapian::BoolWeight *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BoolWeight * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_BoolWeight(void *obj) {
Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) obj;
delete arg1;
}
static swig_method swig_Xapian_BoolWeight_methods[] = {
    {"name", _wrap_BoolWeight_name}, 
    {"get_sumpart", _wrap_BoolWeight_get_sumpart}, 
    {"get_maxpart", _wrap_BoolWeight_get_maxpart}, 
    {"get_sumextra", _wrap_BoolWeight_get_sumextra}, 
    {"get_maxextra", _wrap_BoolWeight_get_maxextra}, 
    {0,0}
};
static swig_attribute swig_Xapian_BoolWeight_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_BoolWeight_bases[] = {0,0};
static const char * swig_Xapian_BoolWeight_base_names[] = {"Xapian::Weight *",0};
static swig_class _wrap_class_Xapian_BoolWeight = { "BoolWeight", &SWIGTYPE_p_Xapian__BoolWeight,_wrap_new_BoolWeight, swig_delete_BoolWeight, swig_Xapian_BoolWeight_methods, swig_Xapian_BoolWeight_attributes, swig_Xapian_BoolWeight_bases,swig_Xapian_BoolWeight_base_names, &swig_module };
SWIGINTERN int
_wrap_new_BM25Weight__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooooo:xapian::new_BM25Weight k1 k2 k3 b min_normlen ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &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_TCL_CALL_ARGS_2(objv[5], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_BM25Weight" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    try {
      result = (Xapian::BM25Weight *)new Xapian::BM25Weight(arg1,arg2,arg3,arg4,arg5);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BM25Weight,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_BM25Weight__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BM25Weight *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_BM25Weight ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::BM25Weight *)new Xapian::BM25Weight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__BM25Weight,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_BM25Weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_BM25Weight__SWIG_1(clientData, interp, objc, argv - 1);
  }
  if (argc == 5) {
    int _v;
    {
      int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_BM25Weight__SWIG_0(clientData, interp, objc, argv - 1);
            }
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BM25Weight_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::BM25Weight_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_name" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
  {
    try {
      result = ((Xapian::BM25Weight const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BM25Weight_get_sumpart(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::BM25Weight_get_sumpart self wdf doclen ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_get_sumpart" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BM25Weight_get_sumpart" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BM25Weight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_sumpart(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BM25Weight_get_maxpart(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::BM25Weight_get_maxpart self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_get_maxpart" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_maxpart();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BM25Weight_get_sumextra(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::BM25Weight_get_sumextra self doclen ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_get_sumextra" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BM25Weight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_sumextra(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_BM25Weight_get_maxextra(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::BM25Weight_get_maxextra self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BM25Weight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BM25Weight_get_maxextra" "', argument " "1"" of type '" "Xapian::BM25Weight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_maxextra();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_BM25Weight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_BM25Weight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__BM25Weight, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BM25Weight" "', argument " "1"" of type '" "Xapian::BM25Weight *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::BM25Weight * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_BM25Weight(void *obj) {
Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) obj;
delete arg1;
}
static swig_method swig_Xapian_BM25Weight_methods[] = {
    {"name", _wrap_BM25Weight_name}, 
    {"get_sumpart", _wrap_BM25Weight_get_sumpart}, 
    {"get_maxpart", _wrap_BM25Weight_get_maxpart}, 
    {"get_sumextra", _wrap_BM25Weight_get_sumextra}, 
    {"get_maxextra", _wrap_BM25Weight_get_maxextra}, 
    {0,0}
};
static swig_attribute swig_Xapian_BM25Weight_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_BM25Weight_bases[] = {0,0};
static const char * swig_Xapian_BM25Weight_base_names[] = {"Xapian::Weight *",0};
static swig_class _wrap_class_Xapian_BM25Weight = { "BM25Weight", &SWIGTYPE_p_Xapian__BM25Weight,_wrap_new_BM25Weight, swig_delete_BM25Weight, swig_Xapian_BM25Weight_methods, swig_Xapian_BM25Weight_attributes, swig_Xapian_BM25Weight_bases,swig_Xapian_BM25Weight_base_names, &swig_module };
SWIGINTERN int
_wrap_new_TradWeight__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  Xapian::TradWeight *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_TradWeight k ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_TradWeight" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = (Xapian::TradWeight *)new Xapian::TradWeight(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TradWeight,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_TradWeight__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TradWeight *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_TradWeight ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::TradWeight *)new Xapian::TradWeight();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TradWeight,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_TradWeight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_TradWeight__SWIG_1(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_TradWeight__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TradWeight_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TradWeight_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_name" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
  {
    try {
      result = ((Xapian::TradWeight const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TradWeight_get_sumpart(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int val3 ;
  int ecode3 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::TradWeight_get_sumpart self wdf doclen ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_get_sumpart" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TradWeight_get_sumpart" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TradWeight_get_sumpart" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_sumpart(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TradWeight_get_maxpart(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TradWeight_get_maxpart self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_get_maxpart" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_maxpart();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TradWeight_get_sumextra(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TradWeight_get_sumextra self doclen ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_get_sumextra" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TradWeight_get_sumextra" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_sumextra(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TradWeight_get_maxextra(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::weight result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TradWeight_get_maxextra self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TradWeight, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TradWeight_get_maxextra" "', argument " "1"" of type '" "Xapian::TradWeight const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
  {
    try {
      result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_maxextra();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_TradWeight(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_TradWeight self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TradWeight, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TradWeight" "', argument " "1"" of type '" "Xapian::TradWeight *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TradWeight * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_TradWeight(void *obj) {
Xapian::TradWeight *arg1 = (Xapian::TradWeight *) obj;
delete arg1;
}
static swig_method swig_Xapian_TradWeight_methods[] = {
    {"name", _wrap_TradWeight_name}, 
    {"get_sumpart", _wrap_TradWeight_get_sumpart}, 
    {"get_maxpart", _wrap_TradWeight_get_maxpart}, 
    {"get_sumextra", _wrap_TradWeight_get_sumextra}, 
    {"get_maxextra", _wrap_TradWeight_get_maxextra}, 
    {0,0}
};
static swig_attribute swig_Xapian_TradWeight_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_TradWeight_bases[] = {0,0};
static const char * swig_Xapian_TradWeight_base_names[] = {"Xapian::Weight *",0};
static swig_class _wrap_class_Xapian_TradWeight = { "TradWeight", &SWIGTYPE_p_Xapian__TradWeight,_wrap_new_TradWeight, swig_delete_TradWeight, swig_Xapian_TradWeight_methods, swig_Xapian_TradWeight_attributes, swig_Xapian_TradWeight_bases,swig_Xapian_TradWeight_base_names, &swig_module };
SWIGINTERN int
_wrap_delete_MatchSpy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_MatchSpy self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MatchSpy, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MatchSpy" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MatchSpy_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::MatchSpy_apply self doc wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_apply" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MatchSpy_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatchSpy_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MatchSpy_apply" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MatchSpy_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MatchSpy_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_name" "', argument " "1"" of type '" "Xapian::MatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  {
    try {
      result = ((Xapian::MatchSpy const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MatchSpy_merge_results(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MatchSpy_merge_results self s ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_merge_results" "', argument " "1"" of type '" "Xapian::MatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->merge_results((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MatchSpy_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::MatchSpy_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MatchSpy_get_description" "', argument " "1"" of type '" "Xapian::MatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MatchSpy * >(argp1);
  {
    try {
      result = ((Xapian::MatchSpy const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_MatchSpy(void *obj) {
Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) obj;
delete arg1;
}
static swig_method swig_Xapian_MatchSpy_methods[] = {
    {"apply", _wrap_MatchSpy_apply}, 
    {"name", _wrap_MatchSpy_name}, 
    {"merge_results", _wrap_MatchSpy_merge_results}, 
    {"get_description", _wrap_MatchSpy_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_MatchSpy_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_MatchSpy_bases[] = {0};
static const char * swig_Xapian_MatchSpy_base_names[] = {0};
static swig_class _wrap_class_Xapian_MatchSpy = { "MatchSpy", &SWIGTYPE_p_Xapian__MatchSpy,0, swig_delete_MatchSpy, swig_Xapian_MatchSpy_methods, swig_Xapian_MatchSpy_attributes, swig_Xapian_MatchSpy_bases,swig_Xapian_MatchSpy_base_names, &swig_module };
SWIGINTERN int
_wrap_new_ValueCountMatchSpy__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_ValueCountMatchSpy ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueCountMatchSpy,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_ValueCountMatchSpy__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_ValueCountMatchSpy slot_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ValueCountMatchSpy" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    try {
      result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueCountMatchSpy,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_ValueCountMatchSpy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_ValueCountMatchSpy__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_ValueCountMatchSpy__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_get_total(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueCountMatchSpy_get_total self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_get_total" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_size_t(static_cast< size_t >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_values_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueCountMatchSpy_values_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_values_begin" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_values_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueCountMatchSpy_values_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_values_end" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_top_values_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueCountMatchSpy_top_values_begin self maxvalues ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueCountMatchSpy_top_values_begin" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_begin(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_top_values_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueCountMatchSpy_top_values_end self size_t ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ValueCountMatchSpy_top_values_end" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  Xapian::weight arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::ValueCountMatchSpy_apply self doc wt ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_apply" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueCountMatchSpy_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueCountMatchSpy_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ValueCountMatchSpy_apply" "', argument " "3"" of type '" "Xapian::weight""'");
  } 
  arg3 = static_cast< Xapian::weight >(val3);
  {
    try {
      (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_name(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueCountMatchSpy_name self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_name" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->name();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_merge_results(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueCountMatchSpy_merge_results self s ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_merge_results" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueCountMatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueCountMatchSpy_merge_results" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->merge_results((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueCountMatchSpy_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::ValueCountMatchSpy_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueCountMatchSpy_get_description" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_ValueCountMatchSpy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ValueCountMatchSpy self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueCountMatchSpy, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueCountMatchSpy" "', argument " "1"" of type '" "Xapian::ValueCountMatchSpy *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueCountMatchSpy * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ValueCountMatchSpy(void *obj) {
Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) obj;
delete arg1;
}
static swig_method swig_Xapian_ValueCountMatchSpy_methods[] = {
    {"get_total", _wrap_ValueCountMatchSpy_get_total}, 
    {"values_begin", _wrap_ValueCountMatchSpy_values_begin}, 
    {"values_end", _wrap_ValueCountMatchSpy_values_end}, 
    {"top_values_begin", _wrap_ValueCountMatchSpy_top_values_begin}, 
    {"top_values_end", _wrap_ValueCountMatchSpy_top_values_end}, 
    {"apply", _wrap_ValueCountMatchSpy_apply}, 
    {"name", _wrap_ValueCountMatchSpy_name}, 
    {"merge_results", _wrap_ValueCountMatchSpy_merge_results}, 
    {"get_description", _wrap_ValueCountMatchSpy_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_ValueCountMatchSpy_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ValueCountMatchSpy_bases[] = {0,0};
static const char * swig_Xapian_ValueCountMatchSpy_base_names[] = {"Xapian::MatchSpy *",0};
static swig_class _wrap_class_Xapian_ValueCountMatchSpy = { "ValueCountMatchSpy", &SWIGTYPE_p_Xapian__ValueCountMatchSpy,_wrap_new_ValueCountMatchSpy, swig_delete_ValueCountMatchSpy, swig_Xapian_ValueCountMatchSpy_methods, swig_Xapian_ValueCountMatchSpy_attributes, swig_Xapian_ValueCountMatchSpy_bases,swig_Xapian_ValueCountMatchSpy_base_names, &swig_module };
SWIGINTERN int
_wrap_Database_add_database(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_add_database self database ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_add_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_add_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Database * >(argp2);
  {
    try {
      (arg1)->add_database((Xapian::Database const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Database__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_Database ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::Database *)new Xapian::Database();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Database__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Database path ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Database" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Database" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database,0));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_Database(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Database self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Database" "', argument " "1"" of type '" "Xapian::Database *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Database__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::Database *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Database other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Database" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Database" "', argument " "1"" of type '" "Xapian::Database const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = (Xapian::Database *)new Xapian::Database((Xapian::Database const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Database,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Database(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_Database__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Database__SWIG_2(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Database__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_reopen(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_reopen self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_reopen" "', argument " "1"" of type '" "Xapian::Database *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      (arg1)->reopen();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_close(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_close self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_close" "', argument " "1"" of type '" "Xapian::Database *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      (arg1)->close();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_description" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_postlist_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::PostingIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_postlist_begin self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_postlist_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_postlist_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_postlist_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->postlist_begin((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_postlist_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::PostingIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_postlist_end self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_postlist_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_postlist_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_postlist_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::PostingIterator(static_cast< const Xapian::PostingIterator& >(result))), SWIGTYPE_p_Xapian__PostingIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_termlist_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_termlist_begin self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_termlist_begin" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = ((Xapian::Database const *)arg1)->termlist_begin(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_termlist_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_termlist_end self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_termlist_end" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = ((Xapian::Database const *)arg1)->termlist_end(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_positionlist_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  Xapian::PositionIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Database_positionlist_begin self did tname ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_positionlist_begin" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Database_positionlist_begin" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_positionlist_begin" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->positionlist_begin(arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_positionlist_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  Xapian::PositionIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Database_positionlist_end self did tname ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_positionlist_end" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Database_positionlist_end" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_positionlist_end" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::PositionIterator(static_cast< const Xapian::PositionIterator& >(result))), SWIGTYPE_p_Xapian__PositionIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_allterms_begin__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_allterms_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_allterms_end__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_allterms_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_allterms_begin__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_allterms_begin self prefix ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_allterms_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_allterms_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_begin((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_allterms_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Database_allterms_begin__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Database_allterms_begin__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_allterms_end__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_allterms_end self prefix ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_allterms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_allterms_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_allterms_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_allterms_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Database_allterms_end__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Database_allterms_end__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_doccount(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_get_doccount self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_doccount" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_doccount();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_lastdocid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_get_lastdocid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_lastdocid" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = (Xapian::docid)((Xapian::Database const *)arg1)->get_lastdocid();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_avlength(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::doclength result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_get_avlength self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_avlength" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_avlength();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_termfreq(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_termfreq self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_termfreq" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_termfreq" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_termfreq" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_termfreq((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_term_exists(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_term_exists self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_term_exists" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_term_exists" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_term_exists" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->term_exists((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_collection_freq(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_collection_freq self tname ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_collection_freq" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_collection_freq" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_collection_freq" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_collection_freq((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_value_freq(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::doccount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_value_freq self valno ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_value_freq" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_value_freq(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_value_lower_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_value_lower_bound self valno ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_value_lower_bound" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_value_lower_bound(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_value_upper_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_value_upper_bound self valno ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_value_upper_bound" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_value_upper_bound(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_doclength_lower_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_get_doclength_lower_bound self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_doclength_lower_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_lower_bound();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_doclength_upper_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_get_doclength_upper_bound self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_doclength_upper_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_upper_bound();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_wdf_upper_bound(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_wdf_upper_bound self term ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_wdf_upper_bound" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_wdf_upper_bound" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_wdf_upper_bound" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_wdf_upper_bound((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_valuestream_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::ValueIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_valuestream_begin self slot ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_valuestream_begin" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      result = ((Xapian::Database const *)arg1)->valuestream_begin(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_valuestream_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::ValueIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_valuestream_end self Xapian::valueno ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_valuestream_end" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      result = ((Xapian::Database const *)arg1)->valuestream_end(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::ValueIterator(static_cast< const Xapian::ValueIterator& >(result))), SWIGTYPE_p_Xapian__ValueIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_doclength(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_doclength self docid ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_doclength" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_keep_alive(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_keep_alive self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_keep_alive" "', argument " "1"" of type '" "Xapian::Database *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      (arg1)->keep_alive();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::Document result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_document self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Database_get_document" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      result = (arg1)->get_document(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Document(static_cast< const Xapian::Document& >(result))), SWIGTYPE_p_Xapian__Document, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_spelling_suggestion__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Database_get_spelling_suggestion self word max_edit_distance ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_spelling_suggestion" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Database_get_spelling_suggestion" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = static_cast< unsigned int >(val3);
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_spelling_suggestion__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_spelling_suggestion self word ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_spelling_suggestion" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_spelling_suggestion" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_spelling_suggestion(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Database_get_spelling_suggestion__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Database_get_spelling_suggestion__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_spellings_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_spellings_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_spellings_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->spellings_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_spellings_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_spellings_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_spellings_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->spellings_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_synonyms_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_synonyms_begin self term ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonyms_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonyms_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonyms_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonyms_begin((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_synonyms_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_synonyms_end self std::string const & ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonyms_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonyms_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonyms_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_synonym_keys_begin__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_synonym_keys_begin self prefix ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonym_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonym_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_begin((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_synonym_keys_begin__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_synonym_keys_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_synonym_keys_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Database_synonym_keys_begin__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Database_synonym_keys_begin__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_synonym_keys_end__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_synonym_keys_end self prefix ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_synonym_keys_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_synonym_keys_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_synonym_keys_end__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_synonym_keys_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_synonym_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_synonym_keys_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Database_synonym_keys_end__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Database_synonym_keys_end__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_metadata(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_get_metadata self key ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_metadata" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_get_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_get_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_metadata((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_metadata_keys_begin__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_metadata_keys_begin self prefix ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_metadata_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_metadata_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_metadata_keys_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_begin((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_metadata_keys_begin__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_metadata_keys_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_metadata_keys_begin" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_metadata_keys_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Database_metadata_keys_begin__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Database_metadata_keys_begin__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_metadata_keys_end__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Database_metadata_keys_end self prefix ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_metadata_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Database_metadata_keys_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Database_metadata_keys_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_metadata_keys_end__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_metadata_keys_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_metadata_keys_end" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_metadata_keys_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Database_metadata_keys_end__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Database, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Database_metadata_keys_end__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_get_uuid(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_get_uuid self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_get_uuid" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_uuid();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Database_has_positions(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Database_has_positions self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Database, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Database_has_positions" "', argument " "1"" of type '" "Xapian::Database const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Database * >(argp1);
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->has_positions();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Database(void *obj) {
Xapian::Database *arg1 = (Xapian::Database *) obj;
delete arg1;
}
static swig_method swig_Xapian_Database_methods[] = {
    {"add_database", _wrap_Database_add_database}, 
    {"reopen", _wrap_Database_reopen}, 
    {"close", _wrap_Database_close}, 
    {"get_description", _wrap_Database_get_description}, 
    {"postlist_begin", _wrap_Database_postlist_begin}, 
    {"postlist_end", _wrap_Database_postlist_end}, 
    {"termlist_begin", _wrap_Database_termlist_begin}, 
    {"termlist_end", _wrap_Database_termlist_end}, 
    {"positionlist_begin", _wrap_Database_positionlist_begin}, 
    {"positionlist_end", _wrap_Database_positionlist_end}, 
    {"allterms_begin", _wrap_Database_allterms_begin}, 
    {"allterms_end", _wrap_Database_allterms_end}, 
    {"get_doccount", _wrap_Database_get_doccount}, 
    {"get_lastdocid", _wrap_Database_get_lastdocid}, 
    {"get_avlength", _wrap_Database_get_avlength}, 
    {"get_termfreq", _wrap_Database_get_termfreq}, 
    {"term_exists", _wrap_Database_term_exists}, 
    {"get_collection_freq", _wrap_Database_get_collection_freq}, 
    {"get_value_freq", _wrap_Database_get_value_freq}, 
    {"get_value_lower_bound", _wrap_Database_get_value_lower_bound}, 
    {"get_value_upper_bound", _wrap_Database_get_value_upper_bound}, 
    {"get_doclength_lower_bound", _wrap_Database_get_doclength_lower_bound}, 
    {"get_doclength_upper_bound", _wrap_Database_get_doclength_upper_bound}, 
    {"get_wdf_upper_bound", _wrap_Database_get_wdf_upper_bound}, 
    {"valuestream_begin", _wrap_Database_valuestream_begin}, 
    {"valuestream_end", _wrap_Database_valuestream_end}, 
    {"get_doclength", _wrap_Database_get_doclength}, 
    {"keep_alive", _wrap_Database_keep_alive}, 
    {"get_document", _wrap_Database_get_document}, 
    {"get_spelling_suggestion", _wrap_Database_get_spelling_suggestion}, 
    {"spellings_begin", _wrap_Database_spellings_begin}, 
    {"spellings_end", _wrap_Database_spellings_end}, 
    {"synonyms_begin", _wrap_Database_synonyms_begin}, 
    {"synonyms_end", _wrap_Database_synonyms_end}, 
    {"synonym_keys_begin", _wrap_Database_synonym_keys_begin}, 
    {"synonym_keys_end", _wrap_Database_synonym_keys_end}, 
    {"get_metadata", _wrap_Database_get_metadata}, 
    {"metadata_keys_begin", _wrap_Database_metadata_keys_begin}, 
    {"metadata_keys_end", _wrap_Database_metadata_keys_end}, 
    {"get_uuid", _wrap_Database_get_uuid}, 
    {"has_positions", _wrap_Database_has_positions}, 
    {0,0}
};
static swig_attribute swig_Xapian_Database_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Database_bases[] = {0};
static const char * swig_Xapian_Database_base_names[] = {0};
static swig_class _wrap_class_Xapian_Database = { "Database", &SWIGTYPE_p_Xapian__Database,_wrap_new_Database, swig_delete_Database, swig_Xapian_Database_methods, swig_Xapian_Database_attributes, swig_Xapian_Database_bases,swig_Xapian_Database_base_names, &swig_module };
SWIGINTERN int
_wrap_delete_WritableDatabase(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_WritableDatabase self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_WritableDatabase__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_WritableDatabase ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_WritableDatabase__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  int val2 ;
  int ecode2 = 0 ;
  Xapian::WritableDatabase *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_WritableDatabase path action ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_WritableDatabase" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase,0));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_WritableDatabase__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::WritableDatabase *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_WritableDatabase other ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__WritableDatabase,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_WritableDatabase" "', argument " "1"" of type '" "Xapian::WritableDatabase const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((Xapian::WritableDatabase const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__WritableDatabase,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_WritableDatabase(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_WritableDatabase__SWIG_0(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_WritableDatabase__SWIG_2(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_WritableDatabase__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_commit(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::WritableDatabase_commit self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_commit" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      (arg1)->commit();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_flush(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::WritableDatabase_flush self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_flush" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      (arg1)->flush();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_begin_transaction__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::WritableDatabase_begin_transaction self flushed ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WritableDatabase_begin_transaction" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->begin_transaction(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_begin_transaction__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::WritableDatabase_begin_transaction self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_begin_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      (arg1)->begin_transaction();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_begin_transaction(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_WritableDatabase_begin_transaction__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_WritableDatabase_begin_transaction__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_commit_transaction(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::WritableDatabase_commit_transaction self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_commit_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      (arg1)->commit_transaction();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_cancel_transaction(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::WritableDatabase_cancel_transaction self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_cancel_transaction" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      (arg1)->cancel_transaction();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_add_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::WritableDatabase_add_document self document ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_add_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  {
    try {
      result = (Xapian::docid)(arg1)->add_document((Xapian::Document const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_delete_document__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::WritableDatabase_delete_document self did ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "WritableDatabase_delete_document" "', argument " "2"" of type '" "Xapian::docid""'");
  } 
  arg2 = static_cast< Xapian::docid >(val2);
  {
    try {
      (arg1)->delete_document(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_replace_document__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  Xapian::Document *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::WritableDatabase_replace_document self did document ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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(objv[3], &argp3, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); 
  }
  arg3 = reinterpret_cast< Xapian::Document * >(argp3);
  {
    try {
      (arg1)->replace_document(arg2,(Xapian::Document const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_delete_document__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::WritableDatabase_delete_document self unique_term ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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 {
      (arg1)->delete_document((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_delete_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_WritableDatabase_delete_document__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_WritableDatabase_delete_document__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_replace_document__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::Document *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  void *argp3 ;
  int res3 = 0 ;
  Xapian::docid result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::WritableDatabase_replace_document self unique_term document ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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(objv[3], &argp3, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_replace_document" "', argument " "3"" of type '" "Xapian::Document const &""'"); 
  }
  arg3 = reinterpret_cast< Xapian::Document * >(argp3);
  {
    try {
      result = (Xapian::docid)(arg1)->replace_document((std::string const &)*arg2,(Xapian::Document const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_replace_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_WritableDatabase_replace_document__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__Document, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_WritableDatabase_replace_document__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_add_spelling__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::WritableDatabase_add_spelling self word freqinc ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_add_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "WritableDatabase_add_spelling" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_add_spelling__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::WritableDatabase_add_spelling self word ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_add_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_add_spelling(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_WritableDatabase_add_spelling__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_WritableDatabase_add_spelling__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_remove_spelling__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::WritableDatabase_remove_spelling self word freqdec ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_remove_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "WritableDatabase_remove_spelling" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_remove_spelling__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::WritableDatabase_remove_spelling self word ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_remove_spelling" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_remove_spelling" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_remove_spelling(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_WritableDatabase_remove_spelling__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__WritableDatabase, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_WritableDatabase_remove_spelling__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_add_synonym(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::WritableDatabase_add_synonym self term synonym ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_add_synonym" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_add_synonym" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_synonym" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_add_synonym" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_add_synonym" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_synonym((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_remove_synonym(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::WritableDatabase_remove_synonym self term synonym ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_remove_synonym" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_remove_synonym" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_remove_synonym" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_remove_synonym" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_remove_synonym" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_synonym((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_clear_synonyms(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::WritableDatabase_clear_synonyms self term ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_clear_synonyms" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_clear_synonyms" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_clear_synonyms" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->clear_synonyms((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_set_metadata(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::WritableDatabase_set_metadata self key value ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_set_metadata" "', argument " "1"" of type '" "Xapian::WritableDatabase *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "WritableDatabase_set_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_set_metadata" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "WritableDatabase_set_metadata" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "WritableDatabase_set_metadata" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->set_metadata((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_WritableDatabase_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::WritableDatabase_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__WritableDatabase, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "WritableDatabase_get_description" "', argument " "1"" of type '" "Xapian::WritableDatabase const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::WritableDatabase * >(argp1);
  {
    try {
      result = ((Xapian::WritableDatabase const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_WritableDatabase(void *obj) {
Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) obj;
delete arg1;
}
static swig_method swig_Xapian_WritableDatabase_methods[] = {
    {"commit", _wrap_WritableDatabase_commit}, 
    {"flush", _wrap_WritableDatabase_flush}, 
    {"begin_transaction", _wrap_WritableDatabase_begin_transaction}, 
    {"commit_transaction", _wrap_WritableDatabase_commit_transaction}, 
    {"cancel_transaction", _wrap_WritableDatabase_cancel_transaction}, 
    {"add_document", _wrap_WritableDatabase_add_document}, 
    {"delete_document", _wrap_WritableDatabase_delete_document}, 
    {"replace_document", _wrap_WritableDatabase_replace_document}, 
    {"add_spelling", _wrap_WritableDatabase_add_spelling}, 
    {"remove_spelling", _wrap_WritableDatabase_remove_spelling}, 
    {"add_synonym", _wrap_WritableDatabase_add_synonym}, 
    {"remove_synonym", _wrap_WritableDatabase_remove_synonym}, 
    {"clear_synonyms", _wrap_WritableDatabase_clear_synonyms}, 
    {"set_metadata", _wrap_WritableDatabase_set_metadata}, 
    {"get_description", _wrap_WritableDatabase_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_WritableDatabase_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_WritableDatabase_bases[] = {0,0};
static const char * swig_Xapian_WritableDatabase_base_names[] = {"Xapian::Database *",0};
static swig_class _wrap_class_Xapian_WritableDatabase = { "WritableDatabase", &SWIGTYPE_p_Xapian__WritableDatabase,_wrap_new_WritableDatabase, swig_delete_WritableDatabase, swig_Xapian_WritableDatabase_methods, swig_Xapian_WritableDatabase_attributes, swig_Xapian_WritableDatabase_bases,swig_Xapian_WritableDatabase_base_names, &swig_module };
SWIGINTERN int
_wrap_open_stub(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::open_stub file ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "open_stub" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "open_stub" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = Xapian::Auto::open_stub((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_brass_open(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::brass_open dir ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "brass_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = Xapian::Brass::open((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_chert_open(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::chert_open dir ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "chert_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_flint_open(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::flint_open dir ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "flint_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = Xapian::Flint::open((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_inmemory_open(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::WritableDatabase result;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::inmemory_open ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = Xapian::InMemory::open();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::remote_open host port timeout connect_timeout ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "remote_open" "', argument " "4"" of type '" "Xapian::timeout""'");
  } 
  arg4 = static_cast< Xapian::timeout >(val4);
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3,arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::remote_open host port timeout ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::Database result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::remote_open host port ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "remote_open" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = static_cast< unsigned int >(val2);
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Database(static_cast< const Xapian::Database& >(result))), SWIGTYPE_p_Xapian__Database, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open_writable__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::remote_open_writable host port timeout connect_timeout ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "remote_open_writable" "', argument " "4"" of type '" "Xapian::timeout""'");
  } 
  arg4 = static_cast< Xapian::timeout >(val4);
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open_writable__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::remote_open_writable host port timeout ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open_writable__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::WritableDatabase result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::remote_open_writable host port ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "remote_open_writable" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = static_cast< unsigned int >(val2);
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::WritableDatabase(static_cast< const Xapian::WritableDatabase& >(result))), SWIGTYPE_p_Xapian__WritableDatabase, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open__SWIG_3(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::remote_open program args timeout ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((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 TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open__SWIG_4(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::Database result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::remote_open program args ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((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 TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_remote_open__SWIG_2(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_remote_open__SWIG_4(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_remote_open__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_remote_open__SWIG_3(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_remote_open__SWIG_0(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open_writable__SWIG_3(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::remote_open_writable program args timeout ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "remote_open_writable" "', argument " "3"" of type '" "Xapian::timeout""'");
  } 
  arg3 = static_cast< Xapian::timeout >(val3);
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((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 TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open_writable__SWIG_4(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::WritableDatabase result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::remote_open_writable program args ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "remote_open_writable" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((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 TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_remote_open_writable(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_remote_open_writable__SWIG_2(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_remote_open_writable__SWIG_4(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_remote_open_writable__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_remote_open_writable__SWIG_3(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_remote_open_writable__SWIG_0(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *arg1 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  Xapian::Query *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Query copyme ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1, SWIGTYPE_p_Xapian__Query,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query const &""'"); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query const &""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((Xapian::Query const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_Query ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::Query *)new Xapian::Query();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_Query(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Query self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Query, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Query" "', argument " "1"" of type '" "Xapian::Query *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_Query tname_ wqf_ pos_ ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::termpos""'");
  } 
  arg3 = static_cast< Xapian::termpos >(val3);
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_3(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  Xapian::termcount arg2 ;
  int res1 = SWIG_OLDOBJ ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  Xapian::Query *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_Query tname_ wqf_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_4(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Query *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Query tname_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_5(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query::op arg1 ;
  Xapian::Query *arg2 = 0 ;
  Xapian::Query *arg3 = 0 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  Xapian::Query *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_Query op_ left right ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Query * >(argp2);
  res3 = SWIG_ConvertPtr(objv[3], &argp3, SWIGTYPE_p_Xapian__Query,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::Query const &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::Query const &""'"); 
  }
  arg3 = reinterpret_cast< Xapian::Query * >(argp3);
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,(Xapian::Query const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_6(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_Query op_ left right ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::Query::op""'");
  } 
  arg1 = static_cast< Xapian::Query::op >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_9(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_Query op_ q parameter ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Query,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::Query""'");
    } else {
      arg2 = *(reinterpret_cast< Xapian::Query * >(argp2));
    }
  }
  ecode3 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Query" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_10(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::new_Query op_ slot begin end ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res4 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[4], &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Query" "', argument " "4"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "4"" of type '" "std::string const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  if (SWIG_IsNewObj(res3)) delete arg3;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_11(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_Query op_ slot value ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Query" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Query" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_12(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Query *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Query external_source ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__PostingSource, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Query" "', argument " "1"" of type '" "Xapian::PostingSource *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::PostingSource * >(argp1);
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN const char *_wrap_Query_MatchAll_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2, int flags) {
  Tcl_Obj *value = 0;
  
  value = SWIG_NewInstanceObj(SWIG_as_voidptr(&Xapian::Query::MatchAll), SWIGTYPE_p_Xapian__Query, 0 );
  if (value) {
    Tcl_SetVar2(interp,name1,name2,Tcl_GetStringFromObj(value,NULL), flags);
    Tcl_DecrRefCount(value);
  }
  return NULL;
}


SWIGINTERN const char *_wrap_Query_MatchNothing_get(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2, int flags) {
  Tcl_Obj *value = 0;
  
  value = SWIG_NewInstanceObj(SWIG_as_voidptr(&Xapian::Query::MatchNothing), SWIGTYPE_p_Xapian__Query, 0 );
  if (value) {
    Tcl_SetVar2(interp,name1,name2,Tcl_GetStringFromObj(value,NULL), flags);
    Tcl_DecrRefCount(value);
  }
  return NULL;
}


SWIGINTERN int
_wrap_Query_get_length(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Query_get_length self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_length" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Query_get_terms_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Query_get_terms_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_terms_begin" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_terms_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Query_get_terms_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Query_get_terms_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_terms_end" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_terms_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Query_empty(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Query_empty self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_empty" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      result = (bool)((Xapian::Query const *)arg1)->empty();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Query_serialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Query_serialise self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_serialise" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      result = ((Xapian::Query const *)arg1)->serialise();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Query_unserialise__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Query result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Query_unserialise s ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Query_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = Xapian::Query::unserialise((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Query_unserialise__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  Xapian::Registry *arg2 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  void *argp2 ;
  int res2 = 0 ;
  Xapian::Query result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Query_unserialise s registry ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Registry,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Query_unserialise" "', argument " "2"" of type '" "Xapian::Registry const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Query_unserialise" "', argument " "2"" of type '" "Xapian::Registry const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Registry * >(argp2);
  {
    try {
      result = Xapian::Query::unserialise((std::string const &)*arg1,(Xapian::Registry const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Query_unserialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_Query_unserialise__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Registry, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Query_unserialise__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Query_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Query_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Query, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Query_get_description" "', argument " "1"" of type '" "Xapian::Query const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Query * >(argp1);
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_13(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_Query op subqs param ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[1], &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);
  {
    int numitems;
    Tcl_Obj ** items;
    if (Tcl_ListObjGetElements(interp, objv[2], &numitems, &items) != TCL_OK) {
      return TCL_ERROR;
    }
    v2.reserve(numitems);
    while (numitems--) {
      Tcl_Obj * item = *items++;
      Xapian::Query * subq = Xapian::get_tcl8_query(interp, item);
      if (subq == NULL) {
        int len;
        const char *p = Tcl_GetStringFromObj(item, &len);
        v2.push_back(Xapian::Query(string(p, len)));
      } else {
        v2.push_back(*subq);
      }
    }
    arg2 = &v2;
  }
  ecode3 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Query" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< Xapian::Query > const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query__SWIG_14(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Query::op arg1 ;
  std::vector< Xapian::Query > *arg2 = 0 ;
  int val1 ;
  int ecode1 = 0 ;
  vector< Xapian::Query > v2 ;
  Xapian::Query *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_Query op subqs ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(objv[1], &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);
  {
    int numitems;
    Tcl_Obj ** items;
    if (Tcl_ListObjGetElements(interp, objv[2], &numitems, &items) != TCL_OK) {
      return TCL_ERROR;
    }
    v2.reserve(numitems);
    while (numitems--) {
      Tcl_Obj * item = *items++;
      Xapian::Query * subq = Xapian::get_tcl8_query(interp, item);
      if (subq == NULL) {
        int len;
        const char *p = Tcl_GetStringFromObj(item, &len);
        v2.push_back(Xapian::Query(string(p, len)));
      } else {
        v2.push_back(*subq);
      }
    }
    arg2 = &v2;
  }
  {
    try {
      result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< Xapian::Query > const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Query,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Query(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 0) {
    return _wrap_new_Query__SWIG_1(clientData, interp, objc, argv - 1);
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__Query, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Query__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__PostingSource, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Query__SWIG_12(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Query__SWIG_4(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int dummy;
        _v = (Tcl_ListObjLength(interp, argv[1], &dummy) == TCL_OK);
        /* FIXME: if we add more array typemaps, we'll need to check the elements
             * of the array here to disambiguate. */
      }
      if (_v) {
        return _wrap_new_Query__SWIG_14(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_Query__SWIG_3(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Query, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_Xapian__Query, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_Query__SWIG_5(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Query, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_Query__SWIG_9(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_Query__SWIG_11(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_new_Query__SWIG_6(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int dummy;
        _v = (Tcl_ListObjLength(interp, argv[1], &dummy) == TCL_OK);
        /* FIXME: if we add more array typemaps, we'll need to check the elements
             * of the array here to disambiguate. */
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_Query__SWIG_13(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_Query__SWIG_2(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[3], (std::string**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_new_Query__SWIG_10(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Query(void *obj) {
Xapian::Query *arg1 = (Xapian::Query *) obj;
delete arg1;
}
static swig_method swig_Xapian_Query_methods[] = {
    {"get_length", _wrap_Query_get_length}, 
    {"get_terms_begin", _wrap_Query_get_terms_begin}, 
    {"get_terms_end", _wrap_Query_get_terms_end}, 
    {"empty", _wrap_Query_empty}, 
    {"serialise", _wrap_Query_serialise}, 
    {"get_description", _wrap_Query_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_Query_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Query_bases[] = {0};
static const char * swig_Xapian_Query_base_names[] = {0};
static swig_class _wrap_class_Xapian_Query = { "Query", &SWIGTYPE_p_Xapian__Query,_wrap_new_Query, swig_delete_Query, swig_Xapian_Query_methods, swig_Xapian_Query_attributes, swig_Xapian_Query_bases,swig_Xapian_Query_base_names, &swig_module };
SWIGINTERN int
_wrap_Stopper_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Stopper_apply self term ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stopper_apply" "', argument " "1"" of type '" "Xapian::Stopper const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stopper_apply" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stopper_apply" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (bool)((Xapian::Stopper const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_Stopper(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Stopper self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Stopper, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stopper" "', argument " "1"" of type '" "Xapian::Stopper *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Stopper_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Stopper_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stopper_get_description" "', argument " "1"" of type '" "Xapian::Stopper const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stopper * >(argp1);
  {
    try {
      result = ((Xapian::Stopper const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Stopper(void *obj) {
Xapian::Stopper *arg1 = (Xapian::Stopper *) obj;
delete arg1;
}
static swig_method swig_Xapian_Stopper_methods[] = {
    {"apply", _wrap_Stopper_apply}, 
    {"get_description", _wrap_Stopper_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_Stopper_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Stopper_bases[] = {0};
static const char * swig_Xapian_Stopper_base_names[] = {0};
static swig_class _wrap_class_Xapian_Stopper = { "Stopper", &SWIGTYPE_p_Xapian__Stopper,0, swig_delete_Stopper, swig_Xapian_Stopper_methods, swig_Xapian_Stopper_attributes, swig_Xapian_Stopper_bases,swig_Xapian_Stopper_base_names, &swig_module };
SWIGINTERN int
_wrap_new_SimpleStopper(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::SimpleStopper *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_SimpleStopper ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::SimpleStopper *)new Xapian::SimpleStopper();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__SimpleStopper,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_SimpleStopper_add(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::SimpleStopper_add self word ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleStopper_add" "', argument " "1"" of type '" "Xapian::SimpleStopper *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimpleStopper_add" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleStopper_add" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->add((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_SimpleStopper_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::SimpleStopper_apply self term ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleStopper_apply" "', argument " "1"" of type '" "Xapian::SimpleStopper const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimpleStopper_apply" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "SimpleStopper_apply" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (bool)((Xapian::SimpleStopper const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_SimpleStopper_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::SimpleStopper_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__SimpleStopper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimpleStopper_get_description" "', argument " "1"" of type '" "Xapian::SimpleStopper const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
  {
    try {
      result = ((Xapian::SimpleStopper const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_SimpleStopper(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_SimpleStopper self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__SimpleStopper, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimpleStopper" "', argument " "1"" of type '" "Xapian::SimpleStopper *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::SimpleStopper * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_SimpleStopper(void *obj) {
Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) obj;
delete arg1;
}
static swig_method swig_Xapian_SimpleStopper_methods[] = {
    {"add", _wrap_SimpleStopper_add}, 
    {"apply", _wrap_SimpleStopper_apply}, 
    {"get_description", _wrap_SimpleStopper_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_SimpleStopper_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_SimpleStopper_bases[] = {0,0};
static const char * swig_Xapian_SimpleStopper_base_names[] = {"Xapian::Stopper *",0};
static swig_class _wrap_class_Xapian_SimpleStopper = { "SimpleStopper", &SWIGTYPE_p_Xapian__SimpleStopper,_wrap_new_SimpleStopper, swig_delete_SimpleStopper, swig_Xapian_SimpleStopper_methods, swig_Xapian_SimpleStopper_attributes, swig_Xapian_SimpleStopper_bases,swig_Xapian_SimpleStopper_base_names, &swig_module };
SWIGINTERN int
_wrap_delete_ValueRangeProcessor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ValueRangeProcessor self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueRangeProcessor" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueRangeProcessor_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  Xapian::valueno result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::ValueRangeProcessor_apply self begin end ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueRangeProcessor_apply" "', argument " "1"" of type '" "Xapian::ValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_std__string,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueRangeProcessor_apply" "', argument " "2"" of type '" "std::string &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueRangeProcessor_apply" "', argument " "2"" of type '" "std::string &""'"); 
  }
  arg2 = reinterpret_cast< std::string * >(argp2);
  res3 = SWIG_ConvertPtr(objv[3], &argp3, SWIGTYPE_p_std__string,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ValueRangeProcessor_apply" "', argument " "3"" of type '" "std::string &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueRangeProcessor_apply" "', argument " "3"" of type '" "std::string &""'"); 
  }
  arg3 = reinterpret_cast< std::string * >(argp3);
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ValueRangeProcessor(void *obj) {
Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) obj;
delete arg1;
}
static swig_method swig_Xapian_ValueRangeProcessor_methods[] = {
    {"apply", _wrap_ValueRangeProcessor_apply}, 
    {0,0}
};
static swig_attribute swig_Xapian_ValueRangeProcessor_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ValueRangeProcessor_bases[] = {0};
static const char * swig_Xapian_ValueRangeProcessor_base_names[] = {0};
static swig_class _wrap_class_Xapian_ValueRangeProcessor = { "ValueRangeProcessor", &SWIGTYPE_p_Xapian__ValueRangeProcessor,0, swig_delete_ValueRangeProcessor, swig_Xapian_ValueRangeProcessor_methods, swig_Xapian_ValueRangeProcessor_attributes, swig_Xapian_ValueRangeProcessor_bases,swig_Xapian_ValueRangeProcessor_base_names, &swig_module };
SWIGINTERN int
_wrap_new_StringValueRangeProcessor__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_StringValueRangeProcessor slot_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_StringValueRangeProcessor__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_StringValueRangeProcessor slot_ str_ prefix_ ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_StringValueRangeProcessor" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_StringValueRangeProcessor__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_StringValueRangeProcessor slot_ str_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_StringValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__StringValueRangeProcessor,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_StringValueRangeProcessor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_StringValueRangeProcessor__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_StringValueRangeProcessor__SWIG_2(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_StringValueRangeProcessor__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_StringValueRangeProcessor_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  Xapian::valueno result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::StringValueRangeProcessor_apply self begin end ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__StringValueRangeProcessor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StringValueRangeProcessor_apply" "', argument " "1"" of type '" "Xapian::StringValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::StringValueRangeProcessor * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_std__string,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StringValueRangeProcessor_apply" "', argument " "2"" of type '" "std::string &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringValueRangeProcessor_apply" "', argument " "2"" of type '" "std::string &""'"); 
  }
  arg2 = reinterpret_cast< std::string * >(argp2);
  res3 = SWIG_ConvertPtr(objv[3], &argp3, SWIGTYPE_p_std__string,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StringValueRangeProcessor_apply" "', argument " "3"" of type '" "std::string &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "StringValueRangeProcessor_apply" "', argument " "3"" of type '" "std::string &""'"); 
  }
  arg3 = reinterpret_cast< std::string * >(argp3);
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_StringValueRangeProcessor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_StringValueRangeProcessor self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__StringValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StringValueRangeProcessor" "', argument " "1"" of type '" "Xapian::StringValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::StringValueRangeProcessor * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_StringValueRangeProcessor(void *obj) {
Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) obj;
delete arg1;
}
static swig_method swig_Xapian_StringValueRangeProcessor_methods[] = {
    {"apply", _wrap_StringValueRangeProcessor_apply}, 
    {0,0}
};
static swig_attribute swig_Xapian_StringValueRangeProcessor_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_StringValueRangeProcessor_bases[] = {0,0};
static const char * swig_Xapian_StringValueRangeProcessor_base_names[] = {"Xapian::ValueRangeProcessor *",0};
static swig_class _wrap_class_Xapian_StringValueRangeProcessor = { "StringValueRangeProcessor", &SWIGTYPE_p_Xapian__StringValueRangeProcessor,_wrap_new_StringValueRangeProcessor, swig_delete_StringValueRangeProcessor, swig_Xapian_StringValueRangeProcessor_methods, swig_Xapian_StringValueRangeProcessor_attributes, swig_Xapian_StringValueRangeProcessor_bases,swig_Xapian_StringValueRangeProcessor_base_names, &swig_module };
SWIGINTERN int
_wrap_new_DateValueRangeProcessor__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_DateValueRangeProcessor slot_ prefer_mdy_ epoch_year_ ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DateValueRangeProcessor__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  bool arg2 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_DateValueRangeProcessor slot_ prefer_mdy_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DateValueRangeProcessor__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_DateValueRangeProcessor slot_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DateValueRangeProcessor__SWIG_3(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooooo:xapian::new_DateValueRangeProcessor slot_ str_ prefix_ prefer_mdy_ epoch_year_ ",(void *)0,(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &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_TCL_CALL_ARGS_2(objv[5], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_DateValueRangeProcessor" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DateValueRangeProcessor__SWIG_4(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::new_DateValueRangeProcessor slot_ str_ prefix_ prefer_mdy_ ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_DateValueRangeProcessor" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DateValueRangeProcessor__SWIG_5(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_DateValueRangeProcessor slot_ str_ prefix_ ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_DateValueRangeProcessor" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DateValueRangeProcessor__SWIG_6(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_DateValueRangeProcessor slot_ str_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_DateValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__DateValueRangeProcessor,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_DateValueRangeProcessor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_DateValueRangeProcessor__SWIG_2(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_DateValueRangeProcessor__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_DateValueRangeProcessor__SWIG_6(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_DateValueRangeProcessor__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_DateValueRangeProcessor__SWIG_5(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_new_DateValueRangeProcessor__SWIG_4(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  if (argc == 5) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_new_DateValueRangeProcessor__SWIG_3(clientData, interp, objc, argv - 1);
            }
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_DateValueRangeProcessor_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  Xapian::valueno result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::DateValueRangeProcessor_apply self begin end ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DateValueRangeProcessor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DateValueRangeProcessor_apply" "', argument " "1"" of type '" "Xapian::DateValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DateValueRangeProcessor * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_std__string,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DateValueRangeProcessor_apply" "', argument " "2"" of type '" "std::string &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateValueRangeProcessor_apply" "', argument " "2"" of type '" "std::string &""'"); 
  }
  arg2 = reinterpret_cast< std::string * >(argp2);
  res3 = SWIG_ConvertPtr(objv[3], &argp3, SWIGTYPE_p_std__string,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DateValueRangeProcessor_apply" "', argument " "3"" of type '" "std::string &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DateValueRangeProcessor_apply" "', argument " "3"" of type '" "std::string &""'"); 
  }
  arg3 = reinterpret_cast< std::string * >(argp3);
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_DateValueRangeProcessor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_DateValueRangeProcessor self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__DateValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DateValueRangeProcessor" "', argument " "1"" of type '" "Xapian::DateValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::DateValueRangeProcessor * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_DateValueRangeProcessor(void *obj) {
Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) obj;
delete arg1;
}
static swig_method swig_Xapian_DateValueRangeProcessor_methods[] = {
    {"apply", _wrap_DateValueRangeProcessor_apply}, 
    {0,0}
};
static swig_attribute swig_Xapian_DateValueRangeProcessor_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_DateValueRangeProcessor_bases[] = {0,0};
static const char * swig_Xapian_DateValueRangeProcessor_base_names[] = {"Xapian::StringValueRangeProcessor *",0};
static swig_class _wrap_class_Xapian_DateValueRangeProcessor = { "DateValueRangeProcessor", &SWIGTYPE_p_Xapian__DateValueRangeProcessor,_wrap_new_DateValueRangeProcessor, swig_delete_DateValueRangeProcessor, swig_Xapian_DateValueRangeProcessor_methods, swig_Xapian_DateValueRangeProcessor_attributes, swig_Xapian_DateValueRangeProcessor_bases,swig_Xapian_DateValueRangeProcessor_base_names, &swig_module };
SWIGINTERN int
_wrap_new_NumberValueRangeProcessor__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_NumberValueRangeProcessor slot_ ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_NumberValueRangeProcessor__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::new_NumberValueRangeProcessor slot_ str_ prefix_ ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_NumberValueRangeProcessor" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_NumberValueRangeProcessor__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_NumberValueRangeProcessor slot_ str_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::valueno""'");
  } 
  arg1 = static_cast< Xapian::valueno >(val1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_NumberValueRangeProcessor" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__NumberValueRangeProcessor,0));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_NumberValueRangeProcessor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      return _wrap_new_NumberValueRangeProcessor__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_new_NumberValueRangeProcessor__SWIG_2(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_NumberValueRangeProcessor__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_NumberValueRangeProcessor_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  Xapian::valueno result;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::NumberValueRangeProcessor_apply self begin end ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__NumberValueRangeProcessor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NumberValueRangeProcessor_apply" "', argument " "1"" of type '" "Xapian::NumberValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::NumberValueRangeProcessor * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_std__string,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "NumberValueRangeProcessor_apply" "', argument " "2"" of type '" "std::string &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NumberValueRangeProcessor_apply" "', argument " "2"" of type '" "std::string &""'"); 
  }
  arg2 = reinterpret_cast< std::string * >(argp2);
  res3 = SWIG_ConvertPtr(objv[3], &argp3, SWIGTYPE_p_std__string,  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NumberValueRangeProcessor_apply" "', argument " "3"" of type '" "std::string &""'"); 
  }
  if (!argp3) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "NumberValueRangeProcessor_apply" "', argument " "3"" of type '" "std::string &""'"); 
  }
  arg3 = reinterpret_cast< std::string * >(argp3);
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_NumberValueRangeProcessor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_NumberValueRangeProcessor self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__NumberValueRangeProcessor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NumberValueRangeProcessor" "', argument " "1"" of type '" "Xapian::NumberValueRangeProcessor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::NumberValueRangeProcessor * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_NumberValueRangeProcessor(void *obj) {
Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) obj;
delete arg1;
}
static swig_method swig_Xapian_NumberValueRangeProcessor_methods[] = {
    {"apply", _wrap_NumberValueRangeProcessor_apply}, 
    {0,0}
};
static swig_attribute swig_Xapian_NumberValueRangeProcessor_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_NumberValueRangeProcessor_bases[] = {0,0};
static const char * swig_Xapian_NumberValueRangeProcessor_base_names[] = {"Xapian::StringValueRangeProcessor *",0};
static swig_class _wrap_class_Xapian_NumberValueRangeProcessor = { "NumberValueRangeProcessor", &SWIGTYPE_p_Xapian__NumberValueRangeProcessor,_wrap_new_NumberValueRangeProcessor, swig_delete_NumberValueRangeProcessor, swig_Xapian_NumberValueRangeProcessor_methods, swig_Xapian_NumberValueRangeProcessor_attributes, swig_Xapian_NumberValueRangeProcessor_bases,swig_Xapian_NumberValueRangeProcessor_base_names, &swig_module };
SWIGINTERN int
_wrap_new_QueryParser(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_QueryParser ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::QueryParser *)new Xapian::QueryParser();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__QueryParser,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_QueryParser(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_QueryParser self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_QueryParser" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_set_stemmer(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_set_stemmer self stemmer ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Stem,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Stem * >(argp2);
  {
    try {
      (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_set_stemming_strategy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::QueryParser::stem_strategy arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_set_stemming_strategy self strategy ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QueryParser_set_stemming_strategy" "', argument " "2"" of type '" "Xapian::QueryParser::stem_strategy""'");
  } 
  arg2 = static_cast< Xapian::QueryParser::stem_strategy >(val2);
  {
    try {
      (arg1)->set_stemming_strategy(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_set_stopper__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_set_stopper self stop ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_set_stopper" "', argument " "2"" of type '" "Xapian::Stopper const *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Stopper * >(argp2);
  {
    try {
      (arg1)->set_stopper((Xapian::Stopper const *)arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_set_stopper__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::QueryParser_set_stopper self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_set_stopper" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      (arg1)->set_stopper();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_set_stopper(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_QueryParser_set_stopper__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Stopper, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_QueryParser_set_stopper__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_set_default_op(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Query::op arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_set_default_op self default_op ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QueryParser_set_default_op" "', argument " "2"" of type '" "Xapian::Query::op""'");
  } 
  arg2 = static_cast< Xapian::Query::op >(val2);
  {
    try {
      (arg1)->set_default_op(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_get_default_op(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Query::op result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::QueryParser_get_default_op self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_get_default_op" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      result = (Xapian::Query::op)((Xapian::QueryParser const *)arg1)->get_default_op();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_set_database(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Database *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_set_database self db ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Database,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_set_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_set_database" "', argument " "2"" of type '" "Xapian::Database const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Database * >(argp2);
  {
    try {
      (arg1)->set_database((Xapian::Database const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_set_max_wildcard_expansion(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_set_max_wildcard_expansion self limit ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "QueryParser_set_max_wildcard_expansion" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      (arg1)->set_max_wildcard_expansion(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_parse_query__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::QueryParser_parse_query self query_string flags default_prefix ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "QueryParser_parse_query" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = static_cast< unsigned int >(val3);
  {
    std::string *ptr = (std::string *)0;
    res4 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[4], &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "QueryParser_parse_query" "', argument " "4"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "4"" of type '" "std::string const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((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 TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_parse_query__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::QueryParser_parse_query self query_string flags ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "QueryParser_parse_query" "', argument " "3"" of type '" "unsigned int""'");
  } 
  arg3 = static_cast< unsigned int >(val3);
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_parse_query__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::Query result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_parse_query self query_string ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_parse_query" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_parse_query" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::Query(static_cast< const Xapian::Query& >(result))), SWIGTYPE_p_Xapian__Query, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_parse_query(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_QueryParser_parse_query__SWIG_2(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_QueryParser_parse_query__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[3], (std::string**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_QueryParser_parse_query__SWIG_0(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_add_prefix(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::QueryParser_add_prefix self field prefix ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_add_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_add_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "QueryParser_add_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->add_prefix((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_add_boolean_prefix__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::QueryParser_add_boolean_prefix self field prefix exclusive ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_add_boolean_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &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_TCL_CALL_ARGS_2(objv[4], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "QueryParser_add_boolean_prefix" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_add_boolean_prefix__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::QueryParser_add_boolean_prefix self field prefix ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_add_boolean_prefix" "', argument " "1"" of type '" "Xapian::QueryParser *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_add_boolean_prefix" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_add_boolean_prefix(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_QueryParser_add_boolean_prefix__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__QueryParser, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[2], (std::string**)(0));
        _v = SWIG_CheckState(res);
        if (_v) {
          {
            int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            return _wrap_QueryParser_add_boolean_prefix__SWIG_0(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_stoplist_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::QueryParser_stoplist_begin self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_stoplist_begin" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->stoplist_begin();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_stoplist_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::QueryParser_stoplist_end self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_stoplist_end" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->stoplist_end();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_unstem_begin(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_unstem_begin self term ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_unstem_begin" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_unstem_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_unstem_begin" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->unstem_begin((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_unstem_end(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  Xapian::TermIterator result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_unstem_end self std::string const & ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_unstem_end" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_unstem_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "QueryParser_unstem_end" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_NewInstanceObj((new Xapian::TermIterator(static_cast< const Xapian::TermIterator& >(result))), SWIGTYPE_p_Xapian__TermIterator, SWIG_POINTER_OWN | 0 ));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_add_valuerangeprocessor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::ValueRangeProcessor *arg2 = (Xapian::ValueRangeProcessor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::QueryParser_add_valuerangeprocessor self vrproc ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2,SWIGTYPE_p_Xapian__ValueRangeProcessor, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "QueryParser_add_valuerangeprocessor" "', argument " "2"" of type '" "Xapian::ValueRangeProcessor *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::ValueRangeProcessor * >(argp2);
  {
    try {
      (arg1)->add_valuerangeprocessor(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_get_corrected_query_string(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::QueryParser_get_corrected_query_string self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_get_corrected_query_string" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->get_corrected_query_string();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_QueryParser_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::QueryParser_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__QueryParser, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "QueryParser_get_description" "', argument " "1"" of type '" "Xapian::QueryParser const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::QueryParser * >(argp1);
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_QueryParser(void *obj) {
Xapian::QueryParser *arg1 = (Xapian::QueryParser *) obj;
delete arg1;
}
static swig_method swig_Xapian_QueryParser_methods[] = {
    {"set_stemmer", _wrap_QueryParser_set_stemmer}, 
    {"set_stemming_strategy", _wrap_QueryParser_set_stemming_strategy}, 
    {"set_stopper", _wrap_QueryParser_set_stopper}, 
    {"set_default_op", _wrap_QueryParser_set_default_op}, 
    {"get_default_op", _wrap_QueryParser_get_default_op}, 
    {"set_database", _wrap_QueryParser_set_database}, 
    {"set_max_wildcard_expansion", _wrap_QueryParser_set_max_wildcard_expansion}, 
    {"parse_query", _wrap_QueryParser_parse_query}, 
    {"add_prefix", _wrap_QueryParser_add_prefix}, 
    {"add_boolean_prefix", _wrap_QueryParser_add_boolean_prefix}, 
    {"stoplist_begin", _wrap_QueryParser_stoplist_begin}, 
    {"stoplist_end", _wrap_QueryParser_stoplist_end}, 
    {"unstem_begin", _wrap_QueryParser_unstem_begin}, 
    {"unstem_end", _wrap_QueryParser_unstem_end}, 
    {"add_valuerangeprocessor", _wrap_QueryParser_add_valuerangeprocessor}, 
    {"get_corrected_query_string", _wrap_QueryParser_get_corrected_query_string}, 
    {"get_description", _wrap_QueryParser_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_QueryParser_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_QueryParser_bases[] = {0};
static const char * swig_Xapian_QueryParser_base_names[] = {0};
static swig_class _wrap_class_Xapian_QueryParser = { "QueryParser", &SWIGTYPE_p_Xapian__QueryParser,_wrap_new_QueryParser, swig_delete_QueryParser, swig_Xapian_QueryParser_methods, swig_Xapian_QueryParser_attributes, swig_Xapian_QueryParser_bases,swig_Xapian_QueryParser_base_names, &swig_module };
SWIGINTERN int
_wrap_sortable_serialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::sortable_serialise value ",(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_double SWIG_TCL_CALL_ARGS_2(objv[1], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "sortable_serialise" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  {
    try {
      result = Xapian::sortable_serialise(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_sortable_unserialise(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  double result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::sortable_unserialise value ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sortable_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "sortable_unserialise" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (double)Xapian::sortable_unserialise((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_double(static_cast< double >(result)));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Stem__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string *arg1 = 0 ;
  int res1 = SWIG_OLDOBJ ;
  Xapian::Stem *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Stem language ",(void *)0) == TCL_ERROR) SWIG_fail;
  {
    std::string *ptr = (std::string *)0;
    res1 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[1], &ptr);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stem" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Stem" "', argument " "1"" of type '" "std::string const &""'"); 
    }
    arg1 = ptr;
  }
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stem,0));
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res1)) delete arg1;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Stem__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Stem *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::new_Stem p ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__StemImplementation, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Stem" "', argument " "1"" of type '" "Xapian::StemImplementation *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::StemImplementation * >(argp1);
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem(arg1);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Stem,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_new_Stem(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__StemImplementation, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Stem__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 1) {
    int _v;
    int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[0], (std::string**)(0));
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_Stem__SWIG_0(clientData, interp, objc, argv - 1);
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_Stem(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Stem self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Stem, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Stem" "', argument " "1"" of type '" "Xapian::Stem *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Stem_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Stem_apply self word ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stem_apply" "', argument " "1"" of type '" "Xapian::Stem const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Stem_apply" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Stem_apply" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      result = ((Xapian::Stem const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Stem_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Stem_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Stem, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Stem_get_description" "', argument " "1"" of type '" "Xapian::Stem const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Stem * >(argp1);
  {
    try {
      result = ((Xapian::Stem const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Stem_get_available_languages(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::Stem_get_available_languages ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = Xapian::Stem::get_available_languages();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Stem(void *obj) {
Xapian::Stem *arg1 = (Xapian::Stem *) obj;
delete arg1;
}
static swig_method swig_Xapian_Stem_methods[] = {
    {"apply", _wrap_Stem_apply}, 
    {"get_description", _wrap_Stem_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_Stem_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Stem_bases[] = {0};
static const char * swig_Xapian_Stem_base_names[] = {0};
static swig_class _wrap_class_Xapian_Stem = { "Stem", &SWIGTYPE_p_Xapian__Stem,_wrap_new_Stem, swig_delete_Stem, swig_Xapian_Stem_methods, swig_Xapian_Stem_attributes, swig_Xapian_Stem_bases,swig_Xapian_Stem_base_names, &swig_module };
SWIGINTERN int
_wrap_new_TermGenerator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_TermGenerator ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::TermGenerator *)new Xapian::TermGenerator();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__TermGenerator,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_TermGenerator(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_TermGenerator self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_TermGenerator" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_stemmer(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_set_stemmer self stemmer ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Stem,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_set_stemmer" "', argument " "2"" of type '" "Xapian::Stem const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Stem * >(argp2);
  {
    try {
      (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_stopper__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_set_stopper self stop ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2,SWIGTYPE_p_Xapian__Stopper, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_stopper" "', argument " "2"" of type '" "Xapian::Stopper const *""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Stopper * >(argp2);
  {
    try {
      (arg1)->set_stopper((Xapian::Stopper const *)arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_stopper__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermGenerator_set_stopper self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_set_stopper" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    try {
      (arg1)->set_stopper();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_stopper(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_TermGenerator_set_stopper__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_Xapian__Stopper, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_TermGenerator_set_stopper__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_set_document self doc ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_set_document" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  {
    try {
      (arg1)->set_document((Xapian::Document const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_get_document(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::Document *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermGenerator_get_document self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_get_document" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    try {
      result = (Xapian::Document *) &((Xapian::TermGenerator const *)arg1)->get_document();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Document,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_database(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::WritableDatabase *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_set_database self db ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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(objv[2], &argp2, SWIGTYPE_p_Xapian__WritableDatabase,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_set_database" "', argument " "2"" of type '" "Xapian::WritableDatabase const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_set_database" "', argument " "2"" of type '" "Xapian::WritableDatabase const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::WritableDatabase * >(argp2);
  {
    try {
      (arg1)->set_database((Xapian::WritableDatabase const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_flags__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::TermGenerator_set_flags self toggle mask ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_set_flags" "', argument " "3"" of type '" "Xapian::TermGenerator::flags""'");
  } 
  arg3 = static_cast< Xapian::TermGenerator::flags >(val3);
  {
    try {
      result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_flags__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_set_flags self toggle ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_set_flags" "', argument " "2"" of type '" "Xapian::TermGenerator::flags""'");
  } 
  arg2 = static_cast< Xapian::TermGenerator::flags >(val2);
  {
    try {
      result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_int(static_cast< int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_flags(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_TermGenerator_set_flags__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_TermGenerator_set_flags__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_stemming_strategy(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::stem_strategy arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_set_stemming_strategy self strategy ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_set_stemming_strategy" "', argument " "2"" of type '" "Xapian::TermGenerator::stem_strategy""'");
  } 
  arg2 = static_cast< Xapian::TermGenerator::stem_strategy >(val2);
  {
    try {
      (arg1)->set_stemming_strategy(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_index_text__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::TermGenerator_index_text self text wdf_inc prefix ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_index_text" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    std::string *ptr = (std::string *)0;
    res4 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[4], &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "TermGenerator_index_text" "', argument " "4"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "4"" of type '" "std::string const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      (arg1)->index_text((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_index_text__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::TermGenerator_index_text self text wdf_inc ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_index_text" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      (arg1)->index_text((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_index_text__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_index_text self text ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->index_text((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_index_text(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_TermGenerator_index_text__SWIG_2(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_TermGenerator_index_text__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[3], (std::string**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_TermGenerator_index_text__SWIG_0(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_index_text_without_positions__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::TermGenerator_index_text_without_positions self text wdf_inc prefix ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_index_text_without_positions" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    std::string *ptr = (std::string *)0;
    res4 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[4], &ptr);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "TermGenerator_index_text_without_positions" "', argument " "4"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "4"" of type '" "std::string const &""'"); 
    }
    arg4 = ptr;
  }
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res4)) delete arg4;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_index_text_without_positions__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::TermGenerator_index_text_without_positions self text wdf_inc ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "TermGenerator_index_text_without_positions" "', argument " "3"" of type '" "Xapian::termcount""'");
  } 
  arg3 = static_cast< Xapian::termcount >(val3);
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_index_text_without_positions__SWIG_2(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_index_text_without_positions self text ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_index_text_without_positions" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "TermGenerator_index_text_without_positions" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_index_text_without_positions(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_TermGenerator_index_text_without_positions__SWIG_2(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_TermGenerator_index_text_without_positions__SWIG_1(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  if (argc == 4) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[1], (std::string**)(0));
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          int res = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(argv[3], (std::string**)(0));
          _v = SWIG_CheckState(res);
          if (_v) {
            return _wrap_TermGenerator_index_text_without_positions__SWIG_0(clientData, interp, objc, argv - 1);
          }
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_increase_termpos__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_increase_termpos self delta ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_increase_termpos" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      (arg1)->increase_termpos(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_increase_termpos__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermGenerator_increase_termpos self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_increase_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    try {
      (arg1)->increase_termpos();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_increase_termpos(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_TermGenerator_increase_termpos__SWIG_1(clientData, interp, objc, argv - 1);
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__TermGenerator, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_TermGenerator_increase_termpos__SWIG_0(clientData, interp, objc, argv - 1);
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_get_termpos(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  Xapian::termcount result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermGenerator_get_termpos self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_get_termpos" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    try {
      result = (Xapian::termcount)((Xapian::TermGenerator const *)arg1)->get_termpos();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_unsigned_SS_int(static_cast< unsigned int >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_set_termpos(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termcount arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::TermGenerator_set_termpos self termpos ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "TermGenerator_set_termpos" "', argument " "2"" of type '" "Xapian::termcount""'");
  } 
  arg2 = static_cast< Xapian::termcount >(val2);
  {
    try {
      (arg1)->set_termpos(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_TermGenerator_get_description(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::TermGenerator_get_description self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__TermGenerator, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "TermGenerator_get_description" "', argument " "1"" of type '" "Xapian::TermGenerator const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::TermGenerator * >(argp1);
  {
    try {
      result = ((Xapian::TermGenerator const *)arg1)->get_description();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_TermGenerator(void *obj) {
Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) obj;
delete arg1;
}
static swig_method swig_Xapian_TermGenerator_methods[] = {
    {"set_stemmer", _wrap_TermGenerator_set_stemmer}, 
    {"set_stopper", _wrap_TermGenerator_set_stopper}, 
    {"set_document", _wrap_TermGenerator_set_document}, 
    {"get_document", _wrap_TermGenerator_get_document}, 
    {"set_database", _wrap_TermGenerator_set_database}, 
    {"set_flags", _wrap_TermGenerator_set_flags}, 
    {"set_stemming_strategy", _wrap_TermGenerator_set_stemming_strategy}, 
    {"index_text", _wrap_TermGenerator_index_text}, 
    {"index_text_without_positions", _wrap_TermGenerator_index_text_without_positions}, 
    {"increase_termpos", _wrap_TermGenerator_increase_termpos}, 
    {"get_termpos", _wrap_TermGenerator_get_termpos}, 
    {"set_termpos", _wrap_TermGenerator_set_termpos}, 
    {"get_description", _wrap_TermGenerator_get_description}, 
    {0,0}
};
static swig_attribute swig_Xapian_TermGenerator_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_TermGenerator_bases[] = {0};
static const char * swig_Xapian_TermGenerator_base_names[] = {0};
static swig_class _wrap_class_Xapian_TermGenerator = { "TermGenerator", &SWIGTYPE_p_Xapian__TermGenerator,_wrap_new_TermGenerator, swig_delete_TermGenerator, swig_Xapian_TermGenerator_methods, swig_Xapian_TermGenerator_attributes, swig_Xapian_TermGenerator_bases,swig_Xapian_TermGenerator_base_names, &swig_module };
SWIGINTERN int
_wrap_KeyMaker_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::KeyMaker_apply self doc ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__KeyMaker, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "KeyMaker_apply" "', argument " "1"" of type '" "Xapian::KeyMaker const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "KeyMaker_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "KeyMaker_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  {
    try {
      result = ((Xapian::KeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_KeyMaker(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_KeyMaker self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__KeyMaker, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_KeyMaker" "', argument " "1"" of type '" "Xapian::KeyMaker *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::KeyMaker * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_KeyMaker(void *obj) {
Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) obj;
delete arg1;
}
static swig_method swig_Xapian_KeyMaker_methods[] = {
    {"apply", _wrap_KeyMaker_apply}, 
    {0,0}
};
static swig_attribute swig_Xapian_KeyMaker_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_KeyMaker_bases[] = {0};
static const char * swig_Xapian_KeyMaker_base_names[] = {0};
static swig_class _wrap_class_Xapian_KeyMaker = { "KeyMaker", &SWIGTYPE_p_Xapian__KeyMaker,0, swig_delete_KeyMaker, swig_Xapian_KeyMaker_methods, swig_Xapian_KeyMaker_attributes, swig_Xapian_KeyMaker_bases,swig_Xapian_KeyMaker_base_names, &swig_module };
SWIGINTERN int
_wrap_new_MultiValueKeyMaker(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MultiValueKeyMaker *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_MultiValueKeyMaker ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::MultiValueKeyMaker *)new Xapian::MultiValueKeyMaker();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MultiValueKeyMaker,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MultiValueKeyMaker_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MultiValueKeyMaker_apply self doc ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueKeyMaker_apply" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiValueKeyMaker_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiValueKeyMaker_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  {
    try {
      result = ((Xapian::MultiValueKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MultiValueKeyMaker_add_value__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::MultiValueKeyMaker_add_value self slot reverse ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiValueKeyMaker_add_value" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->add_value(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MultiValueKeyMaker_add_value__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MultiValueKeyMaker_add_value self slot ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiValueKeyMaker_add_value" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      (arg1)->add_value(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MultiValueKeyMaker_add_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_MultiValueKeyMaker_add_value__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MultiValueKeyMaker, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_MultiValueKeyMaker_add_value__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_MultiValueKeyMaker(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_MultiValueKeyMaker self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MultiValueKeyMaker, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiValueKeyMaker" "', argument " "1"" of type '" "Xapian::MultiValueKeyMaker *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MultiValueKeyMaker * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_MultiValueKeyMaker(void *obj) {
Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) obj;
delete arg1;
}
static swig_method swig_Xapian_MultiValueKeyMaker_methods[] = {
    {"apply", _wrap_MultiValueKeyMaker_apply}, 
    {"add_value", _wrap_MultiValueKeyMaker_add_value}, 
    {0,0}
};
static swig_attribute swig_Xapian_MultiValueKeyMaker_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_MultiValueKeyMaker_bases[] = {0,0};
static const char * swig_Xapian_MultiValueKeyMaker_base_names[] = {"Xapian::KeyMaker *",0};
static swig_class _wrap_class_Xapian_MultiValueKeyMaker = { "MultiValueKeyMaker", &SWIGTYPE_p_Xapian__MultiValueKeyMaker,_wrap_new_MultiValueKeyMaker, swig_delete_MultiValueKeyMaker, swig_Xapian_MultiValueKeyMaker_methods, swig_Xapian_MultiValueKeyMaker_attributes, swig_Xapian_MultiValueKeyMaker_bases,swig_Xapian_MultiValueKeyMaker_base_names, &swig_module };
SWIGINTERN int
_wrap_delete_Sorter(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Sorter *arg1 = (Xapian::Sorter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Sorter self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Sorter, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Sorter" "', argument " "1"" of type '" "Xapian::Sorter *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Sorter * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Sorter(void *obj) {
Xapian::Sorter *arg1 = (Xapian::Sorter *) obj;
delete arg1;
}
static swig_method swig_Xapian_Sorter_methods[] = {
    {0,0}
};
static swig_attribute swig_Xapian_Sorter_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Sorter_bases[] = {0,0};
static const char * swig_Xapian_Sorter_base_names[] = {"Xapian::KeyMaker *",0};
static swig_class _wrap_class_Xapian_Sorter = { "Sorter", &SWIGTYPE_p_Xapian__Sorter,0, swig_delete_Sorter, swig_Xapian_Sorter_methods, swig_Xapian_Sorter_attributes, swig_Xapian_Sorter_bases,swig_Xapian_Sorter_base_names, &swig_module };
SWIGINTERN int
_wrap_new_MultiValueSorter(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MultiValueSorter *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_MultiValueSorter ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::MultiValueSorter *)new Xapian::MultiValueSorter();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__MultiValueSorter,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MultiValueSorter_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MultiValueSorter_apply self doc ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiValueSorter_apply" "', argument " "1"" of type '" "Xapian::MultiValueSorter const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiValueSorter_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MultiValueSorter_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  {
    try {
      result = ((Xapian::MultiValueSorter const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MultiValueSorter_add__SWIG_0(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::MultiValueSorter_add self slot forward ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "MultiValueSorter_add" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    try {
      (arg1)->add(arg2,arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MultiValueSorter_add__SWIG_1(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  Xapian::valueno arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::MultiValueSorter_add self slot ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiValueSorter_add" "', argument " "2"" of type '" "Xapian::valueno""'");
  } 
  arg2 = static_cast< Xapian::valueno >(val2);
  {
    try {
      (arg1)->add(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_MultiValueSorter_add(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Tcl_Obj *CONST *argv = objv+1;
  int argc = objc-1;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MultiValueSorter, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_MultiValueSorter_add__SWIG_1(clientData, interp, objc, argv - 1);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_Xapian__MultiValueSorter, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_bool SWIG_TCL_CALL_ARGS_2(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_MultiValueSorter_add__SWIG_0(clientData, interp, objc, argv - 1);
        }
      }
    }
  }
  
  Tcl_SetResult(interp,(char *) "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", TCL_STATIC);
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_MultiValueSorter(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_MultiValueSorter self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__MultiValueSorter, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiValueSorter" "', argument " "1"" of type '" "Xapian::MultiValueSorter *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::MultiValueSorter * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_MultiValueSorter(void *obj) {
Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) obj;
delete arg1;
}
static swig_method swig_Xapian_MultiValueSorter_methods[] = {
    {"apply", _wrap_MultiValueSorter_apply}, 
    {"add", _wrap_MultiValueSorter_add}, 
    {0,0}
};
static swig_attribute swig_Xapian_MultiValueSorter_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_MultiValueSorter_bases[] = {0,0};
static const char * swig_Xapian_MultiValueSorter_base_names[] = {"Xapian::Sorter *",0};
static swig_class _wrap_class_Xapian_MultiValueSorter = { "MultiValueSorter", &SWIGTYPE_p_Xapian__MultiValueSorter,_wrap_new_MultiValueSorter, swig_delete_MultiValueSorter, swig_Xapian_MultiValueSorter_methods, swig_Xapian_MultiValueSorter_attributes, swig_Xapian_MultiValueSorter_bases,swig_Xapian_MultiValueSorter_base_names, &swig_module };
SWIGINTERN int
_wrap_new_ValueSetMatchDecider(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::valueno arg1 ;
  bool arg2 ;
  unsigned int val1 ;
  int ecode1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  Xapian::ValueSetMatchDecider *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::new_ValueSetMatchDecider slot inclusive_ ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_int SWIG_TCL_CALL_ARGS_2(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ValueSetMatchDecider" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      result = (Xapian::ValueSetMatchDecider *)new Xapian::ValueSetMatchDecider(arg1,arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__ValueSetMatchDecider,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueSetMatchDecider_add_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueSetMatchDecider_add_value self value ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueSetMatchDecider_add_value" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueSetMatchDecider_add_value" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueSetMatchDecider_add_value" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->add_value((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueSetMatchDecider_remove_value(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueSetMatchDecider_remove_value self value ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueSetMatchDecider_remove_value" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueSetMatchDecider_remove_value" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueSetMatchDecider_remove_value" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->remove_value((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_ValueSetMatchDecider_apply(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::ValueSetMatchDecider_apply self doc ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ValueSetMatchDecider_apply" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider const *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
  res2 = SWIG_ConvertPtr(objv[2], &argp2, SWIGTYPE_p_Xapian__Document,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ValueSetMatchDecider_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ValueSetMatchDecider_apply" "', argument " "2"" of type '" "Xapian::Document const &""'"); 
  }
  arg2 = reinterpret_cast< Xapian::Document * >(argp2);
  {
    try {
      result = (bool)((Xapian::ValueSetMatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_bool(static_cast< bool >(result)));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_ValueSetMatchDecider(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_ValueSetMatchDecider self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__ValueSetMatchDecider, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ValueSetMatchDecider" "', argument " "1"" of type '" "Xapian::ValueSetMatchDecider *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::ValueSetMatchDecider * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_ValueSetMatchDecider(void *obj) {
Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) obj;
delete arg1;
}
static swig_method swig_Xapian_ValueSetMatchDecider_methods[] = {
    {"add_value", _wrap_ValueSetMatchDecider_add_value}, 
    {"remove_value", _wrap_ValueSetMatchDecider_remove_value}, 
    {"apply", _wrap_ValueSetMatchDecider_apply}, 
    {0,0}
};
static swig_attribute swig_Xapian_ValueSetMatchDecider_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_ValueSetMatchDecider_bases[] = {0,0};
static const char * swig_Xapian_ValueSetMatchDecider_base_names[] = {"Xapian::MatchDecider *",0};
static swig_class _wrap_class_Xapian_ValueSetMatchDecider = { "ValueSetMatchDecider", &SWIGTYPE_p_Xapian__ValueSetMatchDecider,_wrap_new_ValueSetMatchDecider, swig_delete_ValueSetMatchDecider, swig_Xapian_ValueSetMatchDecider_methods, swig_Xapian_ValueSetMatchDecider_attributes, swig_Xapian_ValueSetMatchDecider_bases,swig_Xapian_ValueSetMatchDecider_base_names, &swig_module };
SWIGINTERN int
_wrap_new_Compactor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *result = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,":xapian::new_Compactor ") == TCL_ERROR) SWIG_fail;
  {
    try {
      result = (Xapian::Compactor *)new Xapian::Compactor();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp, SWIG_NewInstanceObj( SWIG_as_voidptr(result), SWIGTYPE_p_Xapian__Compactor,0));
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_delete_Compactor(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::delete_Compactor self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Compactor, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Compactor" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
  {
    try {
      delete arg1;
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_set_block_size(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  size_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Compactor_set_block_size self block_size ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Compactor_set_block_size" "', argument " "2"" of type '" "size_t""'");
  } 
  arg2 = static_cast< size_t >(val2);
  {
    try {
      (arg1)->set_block_size(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_set_renumber(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Compactor_set_renumber self renumber ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Compactor_set_renumber" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->set_renumber(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_set_multipass(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  bool val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Compactor_set_multipass self multipass ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Compactor_set_multipass" "', argument " "2"" of type '" "bool""'");
  } 
  arg2 = static_cast< bool >(val2);
  {
    try {
      (arg1)->set_multipass(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_set_compaction_level(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  Xapian::Compactor::compaction_level arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Compactor_set_compaction_level self compaction ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &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_TCL_CALL_ARGS_2(objv[2], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Compactor_set_compaction_level" "', argument " "2"" of type '" "Xapian::Compactor::compaction_level""'");
  } 
  arg2 = static_cast< Xapian::Compactor::compaction_level >(val2);
  {
    try {
      (arg1)->set_compaction_level(arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_set_destdir(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Compactor_set_destdir self destdir ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_set_destdir" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Compactor_set_destdir" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_set_destdir" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->set_destdir((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_add_source(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = SWIG_OLDOBJ ;
  
  if (SWIG_GetArgs(interp, objc, objv,"oo:xapian::Compactor_add_source self srcdir ",(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_add_source" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Compactor_add_source" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_add_source" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    try {
      (arg1)->add_source((std::string const &)*arg2);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_compact(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"o:xapian::Compactor_compact self ",(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_compact" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
  {
    try {
      (arg1)->compact();
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  return TCL_OK;
fail:
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_set_status(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  
  if (SWIG_GetArgs(interp, objc, objv,"ooo:xapian::Compactor_set_status self table status ",(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_set_status" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &ptr);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Compactor_set_status" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_set_status" "', argument " "2"" of type '" "std::string const &""'"); 
    }
    arg2 = ptr;
  }
  {
    std::string *ptr = (std::string *)0;
    res3 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[3], &ptr);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Compactor_set_status" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    if (!ptr) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Compactor_set_status" "', argument " "3"" of type '" "std::string const &""'"); 
    }
    arg3 = ptr;
  }
  {
    try {
      (arg1)->set_status((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  if (SWIG_IsNewObj(res3)) delete arg3;
  return TCL_ERROR;
}


SWIGINTERN int
_wrap_Compactor_resolve_duplicate_metadata(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) {
  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 ;
  std::string result;
  
  if (SWIG_GetArgs(interp, objc, objv,"oooo:xapian::Compactor_resolve_duplicate_metadata self key num_tags tags ",(void *)0,(void *)0,(void *)0,(void *)0) == TCL_ERROR) SWIG_fail;
  res1 = SWIG_ConvertPtr(objv[1], &argp1,SWIGTYPE_p_Xapian__Compactor, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "1"" of type '" "Xapian::Compactor *""'"); 
  }
  arg1 = reinterpret_cast< Xapian::Compactor * >(argp1);
  {
    std::string *ptr = (std::string *)0;
    res2 = SWIG_AsPtr_std_string SWIG_TCL_CALL_ARGS_2(objv[2], &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_TCL_CALL_ARGS_2(objv[3], &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(objv[4], &argp4,SWIGTYPE_p_std__string, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Compactor_resolve_duplicate_metadata" "', argument " "4"" of type '" "std::string const []""'"); 
  } 
  arg4 = reinterpret_cast< std::string * >(argp4);
  {
    try {
      result = (arg1)->resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
    } catch (const Xapian::Error &e) {
      return XapianTclHandleError(interp, e);
    } catch (...) {
      return XapianTclHandleError(interp);
    }
  }
  Tcl_SetObjResult(interp,SWIG_From_std_string(static_cast< std::string >(result)));
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_OK;
fail:
  if (SWIG_IsNewObj(res2)) delete arg2;
  return TCL_ERROR;
}


SWIGINTERN void swig_delete_Compactor(void *obj) {
Xapian::Compactor *arg1 = (Xapian::Compactor *) obj;
delete arg1;
}
static swig_method swig_Xapian_Compactor_methods[] = {
    {"set_block_size", _wrap_Compactor_set_block_size}, 
    {"set_renumber", _wrap_Compactor_set_renumber}, 
    {"set_multipass", _wrap_Compactor_set_multipass}, 
    {"set_compaction_level", _wrap_Compactor_set_compaction_level}, 
    {"set_destdir", _wrap_Compactor_set_destdir}, 
    {"add_source", _wrap_Compactor_add_source}, 
    {"compact", _wrap_Compactor_compact}, 
    {"set_status", _wrap_Compactor_set_status}, 
    {"resolve_duplicate_metadata", _wrap_Compactor_resolve_duplicate_metadata}, 
    {0,0}
};
static swig_attribute swig_Xapian_Compactor_attributes[] = {
    {0,0,0}
};
static swig_class *swig_Xapian_Compactor_bases[] = {0};
static const char * swig_Xapian_Compactor_base_names[] = {0};
static swig_class _wrap_class_Xapian_Compactor = { "Compactor", &SWIGTYPE_p_Xapian__Compactor,_wrap_new_Compactor, swig_delete_Compactor, swig_Xapian_Compactor_methods, swig_Xapian_Compactor_attributes, swig_Xapian_Compactor_bases,swig_Xapian_Compactor_base_names, &swig_module };

static swig_command_info swig_commands[] = {
    { SWIG_prefix "version_string", (swig_wrapper_func) _wrap_version_string, NULL},
    { SWIG_prefix "major_version", (swig_wrapper_func) _wrap_major_version, NULL},
    { SWIG_prefix "minor_version", (swig_wrapper_func) _wrap_minor_version, NULL},
    { SWIG_prefix "revision", (swig_wrapper_func) _wrap_revision, NULL},
    { SWIG_prefix "new_PositionIterator", (swig_wrapper_func) _wrap_new_PositionIterator, NULL},
    { SWIG_prefix "delete_PositionIterator", (swig_wrapper_func) _wrap_delete_PositionIterator, NULL},
    { SWIG_prefix "PositionIterator_get_termpos", (swig_wrapper_func) _wrap_PositionIterator_get_termpos, NULL},
    { SWIG_prefix "PositionIterator_next", (swig_wrapper_func) _wrap_PositionIterator_next, NULL},
    { SWIG_prefix "PositionIterator_equals", (swig_wrapper_func) _wrap_PositionIterator_equals, NULL},
    { SWIG_prefix "PositionIterator_skip_to", (swig_wrapper_func) _wrap_PositionIterator_skip_to, NULL},
    { SWIG_prefix "PositionIterator_get_description", (swig_wrapper_func) _wrap_PositionIterator_get_description, NULL},
    { SWIG_prefix "PositionIterator", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_PositionIterator},
    { SWIG_prefix "delete_PostingIterator", (swig_wrapper_func) _wrap_delete_PostingIterator, NULL},
    { SWIG_prefix "new_PostingIterator", (swig_wrapper_func) _wrap_new_PostingIterator, NULL},
    { SWIG_prefix "PostingIterator_skip_to", (swig_wrapper_func) _wrap_PostingIterator_skip_to, NULL},
    { SWIG_prefix "PostingIterator_get_doclength", (swig_wrapper_func) _wrap_PostingIterator_get_doclength, NULL},
    { SWIG_prefix "PostingIterator_get_wdf", (swig_wrapper_func) _wrap_PostingIterator_get_wdf, NULL},
    { SWIG_prefix "PostingIterator_positionlist_begin", (swig_wrapper_func) _wrap_PostingIterator_positionlist_begin, NULL},
    { SWIG_prefix "PostingIterator_positionlist_end", (swig_wrapper_func) _wrap_PostingIterator_positionlist_end, NULL},
    { SWIG_prefix "PostingIterator_get_description", (swig_wrapper_func) _wrap_PostingIterator_get_description, NULL},
    { SWIG_prefix "PostingIterator_get_docid", (swig_wrapper_func) _wrap_PostingIterator_get_docid, NULL},
    { SWIG_prefix "PostingIterator_next", (swig_wrapper_func) _wrap_PostingIterator_next, NULL},
    { SWIG_prefix "PostingIterator_equals", (swig_wrapper_func) _wrap_PostingIterator_equals, NULL},
    { SWIG_prefix "PostingIterator", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_PostingIterator},
    { SWIG_prefix "new_TermIterator", (swig_wrapper_func) _wrap_new_TermIterator, NULL},
    { SWIG_prefix "delete_TermIterator", (swig_wrapper_func) _wrap_delete_TermIterator, NULL},
    { SWIG_prefix "TermIterator_get_term", (swig_wrapper_func) _wrap_TermIterator_get_term, NULL},
    { SWIG_prefix "TermIterator_next", (swig_wrapper_func) _wrap_TermIterator_next, NULL},
    { SWIG_prefix "TermIterator_equals", (swig_wrapper_func) _wrap_TermIterator_equals, NULL},
    { SWIG_prefix "TermIterator_skip_to", (swig_wrapper_func) _wrap_TermIterator_skip_to, NULL},
    { SWIG_prefix "TermIterator_get_wdf", (swig_wrapper_func) _wrap_TermIterator_get_wdf, NULL},
    { SWIG_prefix "TermIterator_get_termfreq", (swig_wrapper_func) _wrap_TermIterator_get_termfreq, NULL},
    { SWIG_prefix "TermIterator_positionlist_count", (swig_wrapper_func) _wrap_TermIterator_positionlist_count, NULL},
    { SWIG_prefix "TermIterator_positionlist_begin", (swig_wrapper_func) _wrap_TermIterator_positionlist_begin, NULL},
    { SWIG_prefix "TermIterator_positionlist_end", (swig_wrapper_func) _wrap_TermIterator_positionlist_end, NULL},
    { SWIG_prefix "TermIterator_get_description", (swig_wrapper_func) _wrap_TermIterator_get_description, NULL},
    { SWIG_prefix "TermIterator", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_TermIterator},
    { SWIG_prefix "new_ValueIterator", (swig_wrapper_func) _wrap_new_ValueIterator, NULL},
    { SWIG_prefix "delete_ValueIterator", (swig_wrapper_func) _wrap_delete_ValueIterator, NULL},
    { SWIG_prefix "ValueIterator_get_value", (swig_wrapper_func) _wrap_ValueIterator_get_value, NULL},
    { SWIG_prefix "ValueIterator_next", (swig_wrapper_func) _wrap_ValueIterator_next, NULL},
    { SWIG_prefix "ValueIterator_equals", (swig_wrapper_func) _wrap_ValueIterator_equals, NULL},
    { SWIG_prefix "ValueIterator_get_docid", (swig_wrapper_func) _wrap_ValueIterator_get_docid, NULL},
    { SWIG_prefix "ValueIterator_get_valueno", (swig_wrapper_func) _wrap_ValueIterator_get_valueno, NULL},
    { SWIG_prefix "ValueIterator_skip_to", (swig_wrapper_func) _wrap_ValueIterator_skip_to, NULL},
    { SWIG_prefix "ValueIterator_check", (swig_wrapper_func) _wrap_ValueIterator_check, NULL},
    { SWIG_prefix "ValueIterator_get_description", (swig_wrapper_func) _wrap_ValueIterator_get_description, NULL},
    { SWIG_prefix "ValueIterator", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ValueIterator},
    { SWIG_prefix "new_Document", (swig_wrapper_func) _wrap_new_Document, NULL},
    { SWIG_prefix "delete_Document", (swig_wrapper_func) _wrap_delete_Document, NULL},
    { SWIG_prefix "Document_get_value", (swig_wrapper_func) _wrap_Document_get_value, NULL},
    { SWIG_prefix "Document_add_value", (swig_wrapper_func) _wrap_Document_add_value, NULL},
    { SWIG_prefix "Document_remove_value", (swig_wrapper_func) _wrap_Document_remove_value, NULL},
    { SWIG_prefix "Document_clear_values", (swig_wrapper_func) _wrap_Document_clear_values, NULL},
    { SWIG_prefix "Document_get_data", (swig_wrapper_func) _wrap_Document_get_data, NULL},
    { SWIG_prefix "Document_set_data", (swig_wrapper_func) _wrap_Document_set_data, NULL},
    { SWIG_prefix "Document_add_posting", (swig_wrapper_func) _wrap_Document_add_posting, NULL},
    { SWIG_prefix "Document_add_term", (swig_wrapper_func) _wrap_Document_add_term, NULL},
    { SWIG_prefix "Document_add_boolean_term", (swig_wrapper_func) _wrap_Document_add_boolean_term, NULL},
    { SWIG_prefix "Document_remove_posting", (swig_wrapper_func) _wrap_Document_remove_posting, NULL},
    { SWIG_prefix "Document_remove_term", (swig_wrapper_func) _wrap_Document_remove_term, NULL},
    { SWIG_prefix "Document_clear_terms", (swig_wrapper_func) _wrap_Document_clear_terms, NULL},
    { SWIG_prefix "Document_termlist_count", (swig_wrapper_func) _wrap_Document_termlist_count, NULL},
    { SWIG_prefix "Document_termlist_begin", (swig_wrapper_func) _wrap_Document_termlist_begin, NULL},
    { SWIG_prefix "Document_termlist_end", (swig_wrapper_func) _wrap_Document_termlist_end, NULL},
    { SWIG_prefix "Document_values_count", (swig_wrapper_func) _wrap_Document_values_count, NULL},
    { SWIG_prefix "Document_values_begin", (swig_wrapper_func) _wrap_Document_values_begin, NULL},
    { SWIG_prefix "Document_values_end", (swig_wrapper_func) _wrap_Document_values_end, NULL},
    { SWIG_prefix "Document_get_docid", (swig_wrapper_func) _wrap_Document_get_docid, NULL},
    { SWIG_prefix "Document_serialise", (swig_wrapper_func) _wrap_Document_serialise, NULL},
    { SWIG_prefix "Document_unserialise", (swig_wrapper_func) _wrap_Document_unserialise, NULL},
    { SWIG_prefix "Document_get_description", (swig_wrapper_func) _wrap_Document_get_description, NULL},
    { SWIG_prefix "Document", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Document},
    { SWIG_prefix "delete_PostingSource", (swig_wrapper_func) _wrap_delete_PostingSource, NULL},
    { SWIG_prefix "PostingSource_get_termfreq_min", (swig_wrapper_func) _wrap_PostingSource_get_termfreq_min, NULL},
    { SWIG_prefix "PostingSource_get_termfreq_est", (swig_wrapper_func) _wrap_PostingSource_get_termfreq_est, NULL},
    { SWIG_prefix "PostingSource_get_termfreq_max", (swig_wrapper_func) _wrap_PostingSource_get_termfreq_max, NULL},
    { SWIG_prefix "PostingSource_get_maxweight", (swig_wrapper_func) _wrap_PostingSource_get_maxweight, NULL},
    { SWIG_prefix "PostingSource_get_weight", (swig_wrapper_func) _wrap_PostingSource_get_weight, NULL},
    { SWIG_prefix "PostingSource_get_docid", (swig_wrapper_func) _wrap_PostingSource_get_docid, NULL},
    { SWIG_prefix "PostingSource_next", (swig_wrapper_func) _wrap_PostingSource_next, NULL},
    { SWIG_prefix "PostingSource_skip_to", (swig_wrapper_func) _wrap_PostingSource_skip_to, NULL},
    { SWIG_prefix "PostingSource_check", (swig_wrapper_func) _wrap_PostingSource_check, NULL},
    { SWIG_prefix "PostingSource_at_end", (swig_wrapper_func) _wrap_PostingSource_at_end, NULL},
    { SWIG_prefix "PostingSource_name", (swig_wrapper_func) _wrap_PostingSource_name, NULL},
    { SWIG_prefix "PostingSource_init", (swig_wrapper_func) _wrap_PostingSource_init, NULL},
    { SWIG_prefix "PostingSource_get_description", (swig_wrapper_func) _wrap_PostingSource_get_description, NULL},
    { SWIG_prefix "PostingSource", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_PostingSource},
    { SWIG_prefix "new_ValuePostingSource", (swig_wrapper_func) _wrap_new_ValuePostingSource, NULL},
    { SWIG_prefix "ValuePostingSource_get_termfreq_min", (swig_wrapper_func) _wrap_ValuePostingSource_get_termfreq_min, NULL},
    { SWIG_prefix "ValuePostingSource_get_termfreq_est", (swig_wrapper_func) _wrap_ValuePostingSource_get_termfreq_est, NULL},
    { SWIG_prefix "ValuePostingSource_get_termfreq_max", (swig_wrapper_func) _wrap_ValuePostingSource_get_termfreq_max, NULL},
    { SWIG_prefix "ValuePostingSource_next", (swig_wrapper_func) _wrap_ValuePostingSource_next, NULL},
    { SWIG_prefix "ValuePostingSource_skip_to", (swig_wrapper_func) _wrap_ValuePostingSource_skip_to, NULL},
    { SWIG_prefix "ValuePostingSource_check", (swig_wrapper_func) _wrap_ValuePostingSource_check, NULL},
    { SWIG_prefix "ValuePostingSource_at_end", (swig_wrapper_func) _wrap_ValuePostingSource_at_end, NULL},
    { SWIG_prefix "ValuePostingSource_get_docid", (swig_wrapper_func) _wrap_ValuePostingSource_get_docid, NULL},
    { SWIG_prefix "ValuePostingSource_init", (swig_wrapper_func) _wrap_ValuePostingSource_init, NULL},
    { SWIG_prefix "delete_ValuePostingSource", (swig_wrapper_func) _wrap_delete_ValuePostingSource, NULL},
    { SWIG_prefix "ValuePostingSource", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ValuePostingSource},
    { SWIG_prefix "new_ValueWeightPostingSource", (swig_wrapper_func) _wrap_new_ValueWeightPostingSource, NULL},
    { SWIG_prefix "ValueWeightPostingSource_get_weight", (swig_wrapper_func) _wrap_ValueWeightPostingSource_get_weight, NULL},
    { SWIG_prefix "ValueWeightPostingSource_name", (swig_wrapper_func) _wrap_ValueWeightPostingSource_name, NULL},
    { SWIG_prefix "ValueWeightPostingSource_serialise", (swig_wrapper_func) _wrap_ValueWeightPostingSource_serialise, NULL},
    { SWIG_prefix "ValueWeightPostingSource_unserialise", (swig_wrapper_func) _wrap_ValueWeightPostingSource_unserialise, NULL},
    { SWIG_prefix "ValueWeightPostingSource_init", (swig_wrapper_func) _wrap_ValueWeightPostingSource_init, NULL},
    { SWIG_prefix "ValueWeightPostingSource_get_description", (swig_wrapper_func) _wrap_ValueWeightPostingSource_get_description, NULL},
    { SWIG_prefix "delete_ValueWeightPostingSource", (swig_wrapper_func) _wrap_delete_ValueWeightPostingSource, NULL},
    { SWIG_prefix "ValueWeightPostingSource", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ValueWeightPostingSource},
    { SWIG_prefix "new_DecreasingValueWeightPostingSource", (swig_wrapper_func) _wrap_new_DecreasingValueWeightPostingSource, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_get_weight", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_get_weight, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_name", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_name, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_serialise", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_serialise, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_unserialise", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_unserialise, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_init", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_init, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_next", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_next, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_skip_to", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_skip_to, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_check", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_check, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource_get_description", (swig_wrapper_func) _wrap_DecreasingValueWeightPostingSource_get_description, NULL},
    { SWIG_prefix "delete_DecreasingValueWeightPostingSource", (swig_wrapper_func) _wrap_delete_DecreasingValueWeightPostingSource, NULL},
    { SWIG_prefix "DecreasingValueWeightPostingSource", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_DecreasingValueWeightPostingSource},
    { SWIG_prefix "new_ValueMapPostingSource", (swig_wrapper_func) _wrap_new_ValueMapPostingSource, NULL},
    { SWIG_prefix "ValueMapPostingSource_add_mapping", (swig_wrapper_func) _wrap_ValueMapPostingSource_add_mapping, NULL},
    { SWIG_prefix "ValueMapPostingSource_clear_mappings", (swig_wrapper_func) _wrap_ValueMapPostingSource_clear_mappings, NULL},
    { SWIG_prefix "ValueMapPostingSource_set_default_weight", (swig_wrapper_func) _wrap_ValueMapPostingSource_set_default_weight, NULL},
    { SWIG_prefix "ValueMapPostingSource_get_weight", (swig_wrapper_func) _wrap_ValueMapPostingSource_get_weight, NULL},
    { SWIG_prefix "ValueMapPostingSource_name", (swig_wrapper_func) _wrap_ValueMapPostingSource_name, NULL},
    { SWIG_prefix "ValueMapPostingSource_init", (swig_wrapper_func) _wrap_ValueMapPostingSource_init, NULL},
    { SWIG_prefix "ValueMapPostingSource_get_description", (swig_wrapper_func) _wrap_ValueMapPostingSource_get_description, NULL},
    { SWIG_prefix "delete_ValueMapPostingSource", (swig_wrapper_func) _wrap_delete_ValueMapPostingSource, NULL},
    { SWIG_prefix "ValueMapPostingSource", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ValueMapPostingSource},
    { SWIG_prefix "new_FixedWeightPostingSource", (swig_wrapper_func) _wrap_new_FixedWeightPostingSource, NULL},
    { SWIG_prefix "FixedWeightPostingSource_get_termfreq_min", (swig_wrapper_func) _wrap_FixedWeightPostingSource_get_termfreq_min, NULL},
    { SWIG_prefix "FixedWeightPostingSource_get_termfreq_est", (swig_wrapper_func) _wrap_FixedWeightPostingSource_get_termfreq_est, NULL},
    { SWIG_prefix "FixedWeightPostingSource_get_termfreq_max", (swig_wrapper_func) _wrap_FixedWeightPostingSource_get_termfreq_max, NULL},
    { SWIG_prefix "FixedWeightPostingSource_get_weight", (swig_wrapper_func) _wrap_FixedWeightPostingSource_get_weight, NULL},
    { SWIG_prefix "FixedWeightPostingSource_next", (swig_wrapper_func) _wrap_FixedWeightPostingSource_next, NULL},
    { SWIG_prefix "FixedWeightPostingSource_skip_to", (swig_wrapper_func) _wrap_FixedWeightPostingSource_skip_to, NULL},
    { SWIG_prefix "FixedWeightPostingSource_check", (swig_wrapper_func) _wrap_FixedWeightPostingSource_check, NULL},
    { SWIG_prefix "FixedWeightPostingSource_at_end", (swig_wrapper_func) _wrap_FixedWeightPostingSource_at_end, NULL},
    { SWIG_prefix "FixedWeightPostingSource_get_docid", (swig_wrapper_func) _wrap_FixedWeightPostingSource_get_docid, NULL},
    { SWIG_prefix "FixedWeightPostingSource_name", (swig_wrapper_func) _wrap_FixedWeightPostingSource_name, NULL},
    { SWIG_prefix "FixedWeightPostingSource_init", (swig_wrapper_func) _wrap_FixedWeightPostingSource_init, NULL},
    { SWIG_prefix "FixedWeightPostingSource_get_description", (swig_wrapper_func) _wrap_FixedWeightPostingSource_get_description, NULL},
    { SWIG_prefix "delete_FixedWeightPostingSource", (swig_wrapper_func) _wrap_delete_FixedWeightPostingSource, NULL},
    { SWIG_prefix "FixedWeightPostingSource", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_FixedWeightPostingSource},
    { SWIG_prefix "new_MSet", (swig_wrapper_func) _wrap_new_MSet, NULL},
    { SWIG_prefix "delete_MSet", (swig_wrapper_func) _wrap_delete_MSet, NULL},
    { SWIG_prefix "MSet_fetch", (swig_wrapper_func) _wrap_MSet_fetch, NULL},
    { SWIG_prefix "MSet_convert_to_percent", (swig_wrapper_func) _wrap_MSet_convert_to_percent, NULL},
    { SWIG_prefix "MSet_get_termfreq", (swig_wrapper_func) _wrap_MSet_get_termfreq, NULL},
    { SWIG_prefix "MSet_get_termweight", (swig_wrapper_func) _wrap_MSet_get_termweight, NULL},
    { SWIG_prefix "MSet_get_firstitem", (swig_wrapper_func) _wrap_MSet_get_firstitem, NULL},
    { SWIG_prefix "MSet_get_matches_lower_bound", (swig_wrapper_func) _wrap_MSet_get_matches_lower_bound, NULL},
    { SWIG_prefix "MSet_get_matches_estimated", (swig_wrapper_func) _wrap_MSet_get_matches_estimated, NULL},
    { SWIG_prefix "MSet_get_matches_upper_bound", (swig_wrapper_func) _wrap_MSet_get_matches_upper_bound, NULL},
    { SWIG_prefix "MSet_get_uncollapsed_matches_lower_bound", (swig_wrapper_func) _wrap_MSet_get_uncollapsed_matches_lower_bound, NULL},
    { SWIG_prefix "MSet_get_uncollapsed_matches_estimated", (swig_wrapper_func) _wrap_MSet_get_uncollapsed_matches_estimated, NULL},
    { SWIG_prefix "MSet_get_uncollapsed_matches_upper_bound", (swig_wrapper_func) _wrap_MSet_get_uncollapsed_matches_upper_bound, NULL},
    { SWIG_prefix "MSet_get_max_possible", (swig_wrapper_func) _wrap_MSet_get_max_possible, NULL},
    { SWIG_prefix "MSet_get_max_attained", (swig_wrapper_func) _wrap_MSet_get_max_attained, NULL},
    { SWIG_prefix "MSet_size", (swig_wrapper_func) _wrap_MSet_size, NULL},
    { SWIG_prefix "MSet_empty", (swig_wrapper_func) _wrap_MSet_empty, NULL},
    { SWIG_prefix "MSet_begin", (swig_wrapper_func) _wrap_MSet_begin, NULL},
    { SWIG_prefix "MSet_end", (swig_wrapper_func) _wrap_MSet_end, NULL},
    { SWIG_prefix "MSet_back", (swig_wrapper_func) _wrap_MSet_back, NULL},
    { SWIG_prefix "MSet_get_hit", (swig_wrapper_func) _wrap_MSet_get_hit, NULL},
    { SWIG_prefix "MSet_get_document_percentage", (swig_wrapper_func) _wrap_MSet_get_document_percentage, NULL},
    { SWIG_prefix "MSet_get_document", (swig_wrapper_func) _wrap_MSet_get_document, NULL},
    { SWIG_prefix "MSet_get_docid", (swig_wrapper_func) _wrap_MSet_get_docid, NULL},
    { SWIG_prefix "MSet_get_description", (swig_wrapper_func) _wrap_MSet_get_description, NULL},
    { SWIG_prefix "MSet", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_MSet},
    { SWIG_prefix "new_MSetIterator", (swig_wrapper_func) _wrap_new_MSetIterator, NULL},
    { SWIG_prefix "delete_MSetIterator", (swig_wrapper_func) _wrap_delete_MSetIterator, NULL},
    { SWIG_prefix "MSetIterator_get_docid", (swig_wrapper_func) _wrap_MSetIterator_get_docid, NULL},
    { SWIG_prefix "MSetIterator_next", (swig_wrapper_func) _wrap_MSetIterator_next, NULL},
    { SWIG_prefix "MSetIterator_prev", (swig_wrapper_func) _wrap_MSetIterator_prev, NULL},
    { SWIG_prefix "MSetIterator_equals", (swig_wrapper_func) _wrap_MSetIterator_equals, NULL},
    { SWIG_prefix "MSetIterator_get_document", (swig_wrapper_func) _wrap_MSetIterator_get_document, NULL},
    { SWIG_prefix "MSetIterator_get_rank", (swig_wrapper_func) _wrap_MSetIterator_get_rank, NULL},
    { SWIG_prefix "MSetIterator_get_weight", (swig_wrapper_func) _wrap_MSetIterator_get_weight, NULL},
    { SWIG_prefix "MSetIterator_get_collapse_key", (swig_wrapper_func) _wrap_MSetIterator_get_collapse_key, NULL},
    { SWIG_prefix "MSetIterator_get_collapse_count", (swig_wrapper_func) _wrap_MSetIterator_get_collapse_count, NULL},
    { SWIG_prefix "MSetIterator_get_percent", (swig_wrapper_func) _wrap_MSetIterator_get_percent, NULL},
    { SWIG_prefix "MSetIterator_get_description", (swig_wrapper_func) _wrap_MSetIterator_get_description, NULL},
    { SWIG_prefix "MSetIterator", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_MSetIterator},
    { SWIG_prefix "new_ESet", (swig_wrapper_func) _wrap_new_ESet, NULL},
    { SWIG_prefix "delete_ESet", (swig_wrapper_func) _wrap_delete_ESet, NULL},
    { SWIG_prefix "ESet_get_ebound", (swig_wrapper_func) _wrap_ESet_get_ebound, NULL},
    { SWIG_prefix "ESet_size", (swig_wrapper_func) _wrap_ESet_size, NULL},
    { SWIG_prefix "ESet_empty", (swig_wrapper_func) _wrap_ESet_empty, NULL},
    { SWIG_prefix "ESet_begin", (swig_wrapper_func) _wrap_ESet_begin, NULL},
    { SWIG_prefix "ESet_end", (swig_wrapper_func) _wrap_ESet_end, NULL},
    { SWIG_prefix "ESet_back", (swig_wrapper_func) _wrap_ESet_back, NULL},
    { SWIG_prefix "ESet_get_description", (swig_wrapper_func) _wrap_ESet_get_description, NULL},
    { SWIG_prefix "ESet", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ESet},
    { SWIG_prefix "new_ESetIterator", (swig_wrapper_func) _wrap_new_ESetIterator, NULL},
    { SWIG_prefix "delete_ESetIterator", (swig_wrapper_func) _wrap_delete_ESetIterator, NULL},
    { SWIG_prefix "ESetIterator_get_term", (swig_wrapper_func) _wrap_ESetIterator_get_term, NULL},
    { SWIG_prefix "ESetIterator_next", (swig_wrapper_func) _wrap_ESetIterator_next, NULL},
    { SWIG_prefix "ESetIterator_prev", (swig_wrapper_func) _wrap_ESetIterator_prev, NULL},
    { SWIG_prefix "ESetIterator_equals", (swig_wrapper_func) _wrap_ESetIterator_equals, NULL},
    { SWIG_prefix "ESetIterator_get_weight", (swig_wrapper_func) _wrap_ESetIterator_get_weight, NULL},
    { SWIG_prefix "ESetIterator_get_description", (swig_wrapper_func) _wrap_ESetIterator_get_description, NULL},
    { SWIG_prefix "ESetIterator", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ESetIterator},
    { SWIG_prefix "new_RSet", (swig_wrapper_func) _wrap_new_RSet, NULL},
    { SWIG_prefix "delete_RSet", (swig_wrapper_func) _wrap_delete_RSet, NULL},
    { SWIG_prefix "RSet_size", (swig_wrapper_func) _wrap_RSet_size, NULL},
    { SWIG_prefix "RSet_empty", (swig_wrapper_func) _wrap_RSet_empty, NULL},
    { SWIG_prefix "RSet_add_document", (swig_wrapper_func) _wrap_RSet_add_document, NULL},
    { SWIG_prefix "RSet_remove_document", (swig_wrapper_func) _wrap_RSet_remove_document, NULL},
    { SWIG_prefix "RSet_contains", (swig_wrapper_func) _wrap_RSet_contains, NULL},
    { SWIG_prefix "RSet_get_description", (swig_wrapper_func) _wrap_RSet_get_description, NULL},
    { SWIG_prefix "RSet", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_RSet},
    { SWIG_prefix "MatchDecider_apply", (swig_wrapper_func) _wrap_MatchDecider_apply, NULL},
    { SWIG_prefix "delete_MatchDecider", (swig_wrapper_func) _wrap_delete_MatchDecider, NULL},
    { SWIG_prefix "MatchDecider", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_MatchDecider},
    { SWIG_prefix "new_Enquire", (swig_wrapper_func) _wrap_new_Enquire, NULL},
    { SWIG_prefix "delete_Enquire", (swig_wrapper_func) _wrap_delete_Enquire, NULL},
    { SWIG_prefix "Enquire_set_query", (swig_wrapper_func) _wrap_Enquire_set_query, NULL},
    { SWIG_prefix "Enquire_get_query", (swig_wrapper_func) _wrap_Enquire_get_query, NULL},
    { SWIG_prefix "Enquire_add_matchspy", (swig_wrapper_func) _wrap_Enquire_add_matchspy, NULL},
    { SWIG_prefix "Enquire_clear_matchspies", (swig_wrapper_func) _wrap_Enquire_clear_matchspies, NULL},
    { SWIG_prefix "Enquire_set_weighting_scheme", (swig_wrapper_func) _wrap_Enquire_set_weighting_scheme, NULL},
    { SWIG_prefix "Enquire_set_collapse_key", (swig_wrapper_func) _wrap_Enquire_set_collapse_key, NULL},
    { SWIG_prefix "Enquire_set_docid_order", (swig_wrapper_func) _wrap_Enquire_set_docid_order, NULL},
    { SWIG_prefix "Enquire_set_cutoff", (swig_wrapper_func) _wrap_Enquire_set_cutoff, NULL},
    { SWIG_prefix "Enquire_set_sort_by_relevance", (swig_wrapper_func) _wrap_Enquire_set_sort_by_relevance, NULL},
    { SWIG_prefix "Enquire_set_sort_by_value", (swig_wrapper_func) _wrap_Enquire_set_sort_by_value, NULL},
    { SWIG_prefix "Enquire_set_sort_by_value_then_relevance", (swig_wrapper_func) _wrap_Enquire_set_sort_by_value_then_relevance, NULL},
    { SWIG_prefix "Enquire_set_sort_by_relevance_then_value", (swig_wrapper_func) _wrap_Enquire_set_sort_by_relevance_then_value, NULL},
    { SWIG_prefix "Enquire_set_sort_by_key", (swig_wrapper_func) _wrap_Enquire_set_sort_by_key, NULL},
    { SWIG_prefix "Enquire_set_sort_by_key_then_relevance", (swig_wrapper_func) _wrap_Enquire_set_sort_by_key_then_relevance, NULL},
    { SWIG_prefix "Enquire_set_sort_by_relevance_then_key", (swig_wrapper_func) _wrap_Enquire_set_sort_by_relevance_then_key, NULL},
    { SWIG_prefix "Enquire_get_mset", (swig_wrapper_func) _wrap_Enquire_get_mset, NULL},
    { SWIG_prefix "Enquire_get_eset", (swig_wrapper_func) _wrap_Enquire_get_eset, NULL},
    { SWIG_prefix "Enquire_get_matching_terms_begin", (swig_wrapper_func) _wrap_Enquire_get_matching_terms_begin, NULL},
    { SWIG_prefix "Enquire_get_matching_terms_end", (swig_wrapper_func) _wrap_Enquire_get_matching_terms_end, NULL},
    { SWIG_prefix "Enquire_get_matching_terms", (swig_wrapper_func) _wrap_Enquire_get_matching_terms, NULL},
    { SWIG_prefix "Enquire_get_description", (swig_wrapper_func) _wrap_Enquire_get_description, NULL},
    { SWIG_prefix "Enquire", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Enquire},
    { SWIG_prefix "new_Registry", (swig_wrapper_func) _wrap_new_Registry, NULL},
    { SWIG_prefix "delete_Registry", (swig_wrapper_func) _wrap_delete_Registry, NULL},
    { SWIG_prefix "Registry_register_weighting_scheme", (swig_wrapper_func) _wrap_Registry_register_weighting_scheme, NULL},
    { SWIG_prefix "Registry_get_weighting_scheme", (swig_wrapper_func) _wrap_Registry_get_weighting_scheme, NULL},
    { SWIG_prefix "Registry_register_posting_source", (swig_wrapper_func) _wrap_Registry_register_posting_source, NULL},
    { SWIG_prefix "Registry_get_posting_source", (swig_wrapper_func) _wrap_Registry_get_posting_source, NULL},
    { SWIG_prefix "Registry_register_match_spy", (swig_wrapper_func) _wrap_Registry_register_match_spy, NULL},
    { SWIG_prefix "Registry_get_match_spy", (swig_wrapper_func) _wrap_Registry_get_match_spy, NULL},
    { SWIG_prefix "Registry", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Registry},
    { SWIG_prefix "delete_Weight", (swig_wrapper_func) _wrap_delete_Weight, NULL},
    { SWIG_prefix "Weight_name", (swig_wrapper_func) _wrap_Weight_name, NULL},
    { SWIG_prefix "Weight_get_sumpart", (swig_wrapper_func) _wrap_Weight_get_sumpart, NULL},
    { SWIG_prefix "Weight_get_maxpart", (swig_wrapper_func) _wrap_Weight_get_maxpart, NULL},
    { SWIG_prefix "Weight_get_sumextra", (swig_wrapper_func) _wrap_Weight_get_sumextra, NULL},
    { SWIG_prefix "Weight_get_maxextra", (swig_wrapper_func) _wrap_Weight_get_maxextra, NULL},
    { SWIG_prefix "Weight_get_sumpart_needs_doclength_", (swig_wrapper_func) _wrap_Weight_get_sumpart_needs_doclength_, NULL},
    { SWIG_prefix "Weight_get_sumpart_needs_wdf_", (swig_wrapper_func) _wrap_Weight_get_sumpart_needs_wdf_, NULL},
    { SWIG_prefix "Weight", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Weight},
    { SWIG_prefix "new_BoolWeight", (swig_wrapper_func) _wrap_new_BoolWeight, NULL},
    { SWIG_prefix "BoolWeight_name", (swig_wrapper_func) _wrap_BoolWeight_name, NULL},
    { SWIG_prefix "BoolWeight_get_sumpart", (swig_wrapper_func) _wrap_BoolWeight_get_sumpart, NULL},
    { SWIG_prefix "BoolWeight_get_maxpart", (swig_wrapper_func) _wrap_BoolWeight_get_maxpart, NULL},
    { SWIG_prefix "BoolWeight_get_sumextra", (swig_wrapper_func) _wrap_BoolWeight_get_sumextra, NULL},
    { SWIG_prefix "BoolWeight_get_maxextra", (swig_wrapper_func) _wrap_BoolWeight_get_maxextra, NULL},
    { SWIG_prefix "delete_BoolWeight", (swig_wrapper_func) _wrap_delete_BoolWeight, NULL},
    { SWIG_prefix "BoolWeight", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_BoolWeight},
    { SWIG_prefix "new_BM25Weight", (swig_wrapper_func) _wrap_new_BM25Weight, NULL},
    { SWIG_prefix "BM25Weight_name", (swig_wrapper_func) _wrap_BM25Weight_name, NULL},
    { SWIG_prefix "BM25Weight_get_sumpart", (swig_wrapper_func) _wrap_BM25Weight_get_sumpart, NULL},
    { SWIG_prefix "BM25Weight_get_maxpart", (swig_wrapper_func) _wrap_BM25Weight_get_maxpart, NULL},
    { SWIG_prefix "BM25Weight_get_sumextra", (swig_wrapper_func) _wrap_BM25Weight_get_sumextra, NULL},
    { SWIG_prefix "BM25Weight_get_maxextra", (swig_wrapper_func) _wrap_BM25Weight_get_maxextra, NULL},
    { SWIG_prefix "delete_BM25Weight", (swig_wrapper_func) _wrap_delete_BM25Weight, NULL},
    { SWIG_prefix "BM25Weight", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_BM25Weight},
    { SWIG_prefix "new_TradWeight", (swig_wrapper_func) _wrap_new_TradWeight, NULL},
    { SWIG_prefix "TradWeight_name", (swig_wrapper_func) _wrap_TradWeight_name, NULL},
    { SWIG_prefix "TradWeight_get_sumpart", (swig_wrapper_func) _wrap_TradWeight_get_sumpart, NULL},
    { SWIG_prefix "TradWeight_get_maxpart", (swig_wrapper_func) _wrap_TradWeight_get_maxpart, NULL},
    { SWIG_prefix "TradWeight_get_sumextra", (swig_wrapper_func) _wrap_TradWeight_get_sumextra, NULL},
    { SWIG_prefix "TradWeight_get_maxextra", (swig_wrapper_func) _wrap_TradWeight_get_maxextra, NULL},
    { SWIG_prefix "delete_TradWeight", (swig_wrapper_func) _wrap_delete_TradWeight, NULL},
    { SWIG_prefix "TradWeight", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_TradWeight},
    { SWIG_prefix "delete_MatchSpy", (swig_wrapper_func) _wrap_delete_MatchSpy, NULL},
    { SWIG_prefix "MatchSpy_apply", (swig_wrapper_func) _wrap_MatchSpy_apply, NULL},
    { SWIG_prefix "MatchSpy_name", (swig_wrapper_func) _wrap_MatchSpy_name, NULL},
    { SWIG_prefix "MatchSpy_merge_results", (swig_wrapper_func) _wrap_MatchSpy_merge_results, NULL},
    { SWIG_prefix "MatchSpy_get_description", (swig_wrapper_func) _wrap_MatchSpy_get_description, NULL},
    { SWIG_prefix "MatchSpy", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_MatchSpy},
    { SWIG_prefix "new_ValueCountMatchSpy", (swig_wrapper_func) _wrap_new_ValueCountMatchSpy, NULL},
    { SWIG_prefix "ValueCountMatchSpy_get_total", (swig_wrapper_func) _wrap_ValueCountMatchSpy_get_total, NULL},
    { SWIG_prefix "ValueCountMatchSpy_values_begin", (swig_wrapper_func) _wrap_ValueCountMatchSpy_values_begin, NULL},
    { SWIG_prefix "ValueCountMatchSpy_values_end", (swig_wrapper_func) _wrap_ValueCountMatchSpy_values_end, NULL},
    { SWIG_prefix "ValueCountMatchSpy_top_values_begin", (swig_wrapper_func) _wrap_ValueCountMatchSpy_top_values_begin, NULL},
    { SWIG_prefix "ValueCountMatchSpy_top_values_end", (swig_wrapper_func) _wrap_ValueCountMatchSpy_top_values_end, NULL},
    { SWIG_prefix "ValueCountMatchSpy_apply", (swig_wrapper_func) _wrap_ValueCountMatchSpy_apply, NULL},
    { SWIG_prefix "ValueCountMatchSpy_name", (swig_wrapper_func) _wrap_ValueCountMatchSpy_name, NULL},
    { SWIG_prefix "ValueCountMatchSpy_merge_results", (swig_wrapper_func) _wrap_ValueCountMatchSpy_merge_results, NULL},
    { SWIG_prefix "ValueCountMatchSpy_get_description", (swig_wrapper_func) _wrap_ValueCountMatchSpy_get_description, NULL},
    { SWIG_prefix "delete_ValueCountMatchSpy", (swig_wrapper_func) _wrap_delete_ValueCountMatchSpy, NULL},
    { SWIG_prefix "ValueCountMatchSpy", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ValueCountMatchSpy},
    { SWIG_prefix "Database_add_database", (swig_wrapper_func) _wrap_Database_add_database, NULL},
    { SWIG_prefix "delete_Database", (swig_wrapper_func) _wrap_delete_Database, NULL},
    { SWIG_prefix "new_Database", (swig_wrapper_func) _wrap_new_Database, NULL},
    { SWIG_prefix "Database_reopen", (swig_wrapper_func) _wrap_Database_reopen, NULL},
    { SWIG_prefix "Database_close", (swig_wrapper_func) _wrap_Database_close, NULL},
    { SWIG_prefix "Database_get_description", (swig_wrapper_func) _wrap_Database_get_description, NULL},
    { SWIG_prefix "Database_postlist_begin", (swig_wrapper_func) _wrap_Database_postlist_begin, NULL},
    { SWIG_prefix "Database_postlist_end", (swig_wrapper_func) _wrap_Database_postlist_end, NULL},
    { SWIG_prefix "Database_termlist_begin", (swig_wrapper_func) _wrap_Database_termlist_begin, NULL},
    { SWIG_prefix "Database_termlist_end", (swig_wrapper_func) _wrap_Database_termlist_end, NULL},
    { SWIG_prefix "Database_positionlist_begin", (swig_wrapper_func) _wrap_Database_positionlist_begin, NULL},
    { SWIG_prefix "Database_positionlist_end", (swig_wrapper_func) _wrap_Database_positionlist_end, NULL},
    { SWIG_prefix "Database_allterms_begin", (swig_wrapper_func) _wrap_Database_allterms_begin, NULL},
    { SWIG_prefix "Database_allterms_end", (swig_wrapper_func) _wrap_Database_allterms_end, NULL},
    { SWIG_prefix "Database_get_doccount", (swig_wrapper_func) _wrap_Database_get_doccount, NULL},
    { SWIG_prefix "Database_get_lastdocid", (swig_wrapper_func) _wrap_Database_get_lastdocid, NULL},
    { SWIG_prefix "Database_get_avlength", (swig_wrapper_func) _wrap_Database_get_avlength, NULL},
    { SWIG_prefix "Database_get_termfreq", (swig_wrapper_func) _wrap_Database_get_termfreq, NULL},
    { SWIG_prefix "Database_term_exists", (swig_wrapper_func) _wrap_Database_term_exists, NULL},
    { SWIG_prefix "Database_get_collection_freq", (swig_wrapper_func) _wrap_Database_get_collection_freq, NULL},
    { SWIG_prefix "Database_get_value_freq", (swig_wrapper_func) _wrap_Database_get_value_freq, NULL},
    { SWIG_prefix "Database_get_value_lower_bound", (swig_wrapper_func) _wrap_Database_get_value_lower_bound, NULL},
    { SWIG_prefix "Database_get_value_upper_bound", (swig_wrapper_func) _wrap_Database_get_value_upper_bound, NULL},
    { SWIG_prefix "Database_get_doclength_lower_bound", (swig_wrapper_func) _wrap_Database_get_doclength_lower_bound, NULL},
    { SWIG_prefix "Database_get_doclength_upper_bound", (swig_wrapper_func) _wrap_Database_get_doclength_upper_bound, NULL},
    { SWIG_prefix "Database_get_wdf_upper_bound", (swig_wrapper_func) _wrap_Database_get_wdf_upper_bound, NULL},
    { SWIG_prefix "Database_valuestream_begin", (swig_wrapper_func) _wrap_Database_valuestream_begin, NULL},
    { SWIG_prefix "Database_valuestream_end", (swig_wrapper_func) _wrap_Database_valuestream_end, NULL},
    { SWIG_prefix "Database_get_doclength", (swig_wrapper_func) _wrap_Database_get_doclength, NULL},
    { SWIG_prefix "Database_keep_alive", (swig_wrapper_func) _wrap_Database_keep_alive, NULL},
    { SWIG_prefix "Database_get_document", (swig_wrapper_func) _wrap_Database_get_document, NULL},
    { SWIG_prefix "Database_get_spelling_suggestion", (swig_wrapper_func) _wrap_Database_get_spelling_suggestion, NULL},
    { SWIG_prefix "Database_spellings_begin", (swig_wrapper_func) _wrap_Database_spellings_begin, NULL},
    { SWIG_prefix "Database_spellings_end", (swig_wrapper_func) _wrap_Database_spellings_end, NULL},
    { SWIG_prefix "Database_synonyms_begin", (swig_wrapper_func) _wrap_Database_synonyms_begin, NULL},
    { SWIG_prefix "Database_synonyms_end", (swig_wrapper_func) _wrap_Database_synonyms_end, NULL},
    { SWIG_prefix "Database_synonym_keys_begin", (swig_wrapper_func) _wrap_Database_synonym_keys_begin, NULL},
    { SWIG_prefix "Database_synonym_keys_end", (swig_wrapper_func) _wrap_Database_synonym_keys_end, NULL},
    { SWIG_prefix "Database_get_metadata", (swig_wrapper_func) _wrap_Database_get_metadata, NULL},
    { SWIG_prefix "Database_metadata_keys_begin", (swig_wrapper_func) _wrap_Database_metadata_keys_begin, NULL},
    { SWIG_prefix "Database_metadata_keys_end", (swig_wrapper_func) _wrap_Database_metadata_keys_end, NULL},
    { SWIG_prefix "Database_get_uuid", (swig_wrapper_func) _wrap_Database_get_uuid, NULL},
    { SWIG_prefix "Database_has_positions", (swig_wrapper_func) _wrap_Database_has_positions, NULL},
    { SWIG_prefix "Database", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Database},
    { SWIG_prefix "delete_WritableDatabase", (swig_wrapper_func) _wrap_delete_WritableDatabase, NULL},
    { SWIG_prefix "new_WritableDatabase", (swig_wrapper_func) _wrap_new_WritableDatabase, NULL},
    { SWIG_prefix "WritableDatabase_commit", (swig_wrapper_func) _wrap_WritableDatabase_commit, NULL},
    { SWIG_prefix "WritableDatabase_flush", (swig_wrapper_func) _wrap_WritableDatabase_flush, NULL},
    { SWIG_prefix "WritableDatabase_begin_transaction", (swig_wrapper_func) _wrap_WritableDatabase_begin_transaction, NULL},
    { SWIG_prefix "WritableDatabase_commit_transaction", (swig_wrapper_func) _wrap_WritableDatabase_commit_transaction, NULL},
    { SWIG_prefix "WritableDatabase_cancel_transaction", (swig_wrapper_func) _wrap_WritableDatabase_cancel_transaction, NULL},
    { SWIG_prefix "WritableDatabase_add_document", (swig_wrapper_func) _wrap_WritableDatabase_add_document, NULL},
    { SWIG_prefix "WritableDatabase_delete_document", (swig_wrapper_func) _wrap_WritableDatabase_delete_document, NULL},
    { SWIG_prefix "WritableDatabase_replace_document", (swig_wrapper_func) _wrap_WritableDatabase_replace_document, NULL},
    { SWIG_prefix "WritableDatabase_add_spelling", (swig_wrapper_func) _wrap_WritableDatabase_add_spelling, NULL},
    { SWIG_prefix "WritableDatabase_remove_spelling", (swig_wrapper_func) _wrap_WritableDatabase_remove_spelling, NULL},
    { SWIG_prefix "WritableDatabase_add_synonym", (swig_wrapper_func) _wrap_WritableDatabase_add_synonym, NULL},
    { SWIG_prefix "WritableDatabase_remove_synonym", (swig_wrapper_func) _wrap_WritableDatabase_remove_synonym, NULL},
    { SWIG_prefix "WritableDatabase_clear_synonyms", (swig_wrapper_func) _wrap_WritableDatabase_clear_synonyms, NULL},
    { SWIG_prefix "WritableDatabase_set_metadata", (swig_wrapper_func) _wrap_WritableDatabase_set_metadata, NULL},
    { SWIG_prefix "WritableDatabase_get_description", (swig_wrapper_func) _wrap_WritableDatabase_get_description, NULL},
    { SWIG_prefix "WritableDatabase", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_WritableDatabase},
    { SWIG_prefix "open_stub", (swig_wrapper_func) _wrap_open_stub, NULL},
    { SWIG_prefix "brass_open", (swig_wrapper_func) _wrap_brass_open, NULL},
    { SWIG_prefix "chert_open", (swig_wrapper_func) _wrap_chert_open, NULL},
    { SWIG_prefix "flint_open", (swig_wrapper_func) _wrap_flint_open, NULL},
    { SWIG_prefix "inmemory_open", (swig_wrapper_func) _wrap_inmemory_open, NULL},
    { SWIG_prefix "remote_open", (swig_wrapper_func) _wrap_remote_open, NULL},
    { SWIG_prefix "remote_open_writable", (swig_wrapper_func) _wrap_remote_open_writable, NULL},
    { SWIG_prefix "delete_Query", (swig_wrapper_func) _wrap_delete_Query, NULL},
    { SWIG_prefix "Query_get_length", (swig_wrapper_func) _wrap_Query_get_length, NULL},
    { SWIG_prefix "Query_get_terms_begin", (swig_wrapper_func) _wrap_Query_get_terms_begin, NULL},
    { SWIG_prefix "Query_get_terms_end", (swig_wrapper_func) _wrap_Query_get_terms_end, NULL},
    { SWIG_prefix "Query_empty", (swig_wrapper_func) _wrap_Query_empty, NULL},
    { SWIG_prefix "Query_serialise", (swig_wrapper_func) _wrap_Query_serialise, NULL},
    { SWIG_prefix "Query_unserialise", (swig_wrapper_func) _wrap_Query_unserialise, NULL},
    { SWIG_prefix "Query_get_description", (swig_wrapper_func) _wrap_Query_get_description, NULL},
    { SWIG_prefix "new_Query", (swig_wrapper_func) _wrap_new_Query, NULL},
    { SWIG_prefix "Query", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Query},
    { SWIG_prefix "Stopper_apply", (swig_wrapper_func) _wrap_Stopper_apply, NULL},
    { SWIG_prefix "delete_Stopper", (swig_wrapper_func) _wrap_delete_Stopper, NULL},
    { SWIG_prefix "Stopper_get_description", (swig_wrapper_func) _wrap_Stopper_get_description, NULL},
    { SWIG_prefix "Stopper", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Stopper},
    { SWIG_prefix "new_SimpleStopper", (swig_wrapper_func) _wrap_new_SimpleStopper, NULL},
    { SWIG_prefix "SimpleStopper_add", (swig_wrapper_func) _wrap_SimpleStopper_add, NULL},
    { SWIG_prefix "SimpleStopper_apply", (swig_wrapper_func) _wrap_SimpleStopper_apply, NULL},
    { SWIG_prefix "SimpleStopper_get_description", (swig_wrapper_func) _wrap_SimpleStopper_get_description, NULL},
    { SWIG_prefix "delete_SimpleStopper", (swig_wrapper_func) _wrap_delete_SimpleStopper, NULL},
    { SWIG_prefix "SimpleStopper", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_SimpleStopper},
    { SWIG_prefix "delete_ValueRangeProcessor", (swig_wrapper_func) _wrap_delete_ValueRangeProcessor, NULL},
    { SWIG_prefix "ValueRangeProcessor_apply", (swig_wrapper_func) _wrap_ValueRangeProcessor_apply, NULL},
    { SWIG_prefix "ValueRangeProcessor", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ValueRangeProcessor},
    { SWIG_prefix "new_StringValueRangeProcessor", (swig_wrapper_func) _wrap_new_StringValueRangeProcessor, NULL},
    { SWIG_prefix "StringValueRangeProcessor_apply", (swig_wrapper_func) _wrap_StringValueRangeProcessor_apply, NULL},
    { SWIG_prefix "delete_StringValueRangeProcessor", (swig_wrapper_func) _wrap_delete_StringValueRangeProcessor, NULL},
    { SWIG_prefix "StringValueRangeProcessor", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_StringValueRangeProcessor},
    { SWIG_prefix "new_DateValueRangeProcessor", (swig_wrapper_func) _wrap_new_DateValueRangeProcessor, NULL},
    { SWIG_prefix "DateValueRangeProcessor_apply", (swig_wrapper_func) _wrap_DateValueRangeProcessor_apply, NULL},
    { SWIG_prefix "delete_DateValueRangeProcessor", (swig_wrapper_func) _wrap_delete_DateValueRangeProcessor, NULL},
    { SWIG_prefix "DateValueRangeProcessor", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_DateValueRangeProcessor},
    { SWIG_prefix "new_NumberValueRangeProcessor", (swig_wrapper_func) _wrap_new_NumberValueRangeProcessor, NULL},
    { SWIG_prefix "NumberValueRangeProcessor_apply", (swig_wrapper_func) _wrap_NumberValueRangeProcessor_apply, NULL},
    { SWIG_prefix "delete_NumberValueRangeProcessor", (swig_wrapper_func) _wrap_delete_NumberValueRangeProcessor, NULL},
    { SWIG_prefix "NumberValueRangeProcessor", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_NumberValueRangeProcessor},
    { SWIG_prefix "new_QueryParser", (swig_wrapper_func) _wrap_new_QueryParser, NULL},
    { SWIG_prefix "delete_QueryParser", (swig_wrapper_func) _wrap_delete_QueryParser, NULL},
    { SWIG_prefix "QueryParser_set_stemmer", (swig_wrapper_func) _wrap_QueryParser_set_stemmer, NULL},
    { SWIG_prefix "QueryParser_set_stemming_strategy", (swig_wrapper_func) _wrap_QueryParser_set_stemming_strategy, NULL},
    { SWIG_prefix "QueryParser_set_stopper", (swig_wrapper_func) _wrap_QueryParser_set_stopper, NULL},
    { SWIG_prefix "QueryParser_set_default_op", (swig_wrapper_func) _wrap_QueryParser_set_default_op, NULL},
    { SWIG_prefix "QueryParser_get_default_op", (swig_wrapper_func) _wrap_QueryParser_get_default_op, NULL},
    { SWIG_prefix "QueryParser_set_database", (swig_wrapper_func) _wrap_QueryParser_set_database, NULL},
    { SWIG_prefix "QueryParser_set_max_wildcard_expansion", (swig_wrapper_func) _wrap_QueryParser_set_max_wildcard_expansion, NULL},
    { SWIG_prefix "QueryParser_parse_query", (swig_wrapper_func) _wrap_QueryParser_parse_query, NULL},
    { SWIG_prefix "QueryParser_add_prefix", (swig_wrapper_func) _wrap_QueryParser_add_prefix, NULL},
    { SWIG_prefix "QueryParser_add_boolean_prefix", (swig_wrapper_func) _wrap_QueryParser_add_boolean_prefix, NULL},
    { SWIG_prefix "QueryParser_stoplist_begin", (swig_wrapper_func) _wrap_QueryParser_stoplist_begin, NULL},
    { SWIG_prefix "QueryParser_stoplist_end", (swig_wrapper_func) _wrap_QueryParser_stoplist_end, NULL},
    { SWIG_prefix "QueryParser_unstem_begin", (swig_wrapper_func) _wrap_QueryParser_unstem_begin, NULL},
    { SWIG_prefix "QueryParser_unstem_end", (swig_wrapper_func) _wrap_QueryParser_unstem_end, NULL},
    { SWIG_prefix "QueryParser_add_valuerangeprocessor", (swig_wrapper_func) _wrap_QueryParser_add_valuerangeprocessor, NULL},
    { SWIG_prefix "QueryParser_get_corrected_query_string", (swig_wrapper_func) _wrap_QueryParser_get_corrected_query_string, NULL},
    { SWIG_prefix "QueryParser_get_description", (swig_wrapper_func) _wrap_QueryParser_get_description, NULL},
    { SWIG_prefix "QueryParser", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_QueryParser},
    { SWIG_prefix "sortable_serialise", (swig_wrapper_func) _wrap_sortable_serialise, NULL},
    { SWIG_prefix "sortable_unserialise", (swig_wrapper_func) _wrap_sortable_unserialise, NULL},
    { SWIG_prefix "new_Stem", (swig_wrapper_func) _wrap_new_Stem, NULL},
    { SWIG_prefix "delete_Stem", (swig_wrapper_func) _wrap_delete_Stem, NULL},
    { SWIG_prefix "Stem_apply", (swig_wrapper_func) _wrap_Stem_apply, NULL},
    { SWIG_prefix "Stem_get_description", (swig_wrapper_func) _wrap_Stem_get_description, NULL},
    { SWIG_prefix "Stem_get_available_languages", (swig_wrapper_func) _wrap_Stem_get_available_languages, NULL},
    { SWIG_prefix "Stem", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Stem},
    { SWIG_prefix "new_TermGenerator", (swig_wrapper_func) _wrap_new_TermGenerator, NULL},
    { SWIG_prefix "delete_TermGenerator", (swig_wrapper_func) _wrap_delete_TermGenerator, NULL},
    { SWIG_prefix "TermGenerator_set_stemmer", (swig_wrapper_func) _wrap_TermGenerator_set_stemmer, NULL},
    { SWIG_prefix "TermGenerator_set_stopper", (swig_wrapper_func) _wrap_TermGenerator_set_stopper, NULL},
    { SWIG_prefix "TermGenerator_set_document", (swig_wrapper_func) _wrap_TermGenerator_set_document, NULL},
    { SWIG_prefix "TermGenerator_get_document", (swig_wrapper_func) _wrap_TermGenerator_get_document, NULL},
    { SWIG_prefix "TermGenerator_set_database", (swig_wrapper_func) _wrap_TermGenerator_set_database, NULL},
    { SWIG_prefix "TermGenerator_set_flags", (swig_wrapper_func) _wrap_TermGenerator_set_flags, NULL},
    { SWIG_prefix "TermGenerator_set_stemming_strategy", (swig_wrapper_func) _wrap_TermGenerator_set_stemming_strategy, NULL},
    { SWIG_prefix "TermGenerator_index_text", (swig_wrapper_func) _wrap_TermGenerator_index_text, NULL},
    { SWIG_prefix "TermGenerator_index_text_without_positions", (swig_wrapper_func) _wrap_TermGenerator_index_text_without_positions, NULL},
    { SWIG_prefix "TermGenerator_increase_termpos", (swig_wrapper_func) _wrap_TermGenerator_increase_termpos, NULL},
    { SWIG_prefix "TermGenerator_get_termpos", (swig_wrapper_func) _wrap_TermGenerator_get_termpos, NULL},
    { SWIG_prefix "TermGenerator_set_termpos", (swig_wrapper_func) _wrap_TermGenerator_set_termpos, NULL},
    { SWIG_prefix "TermGenerator_get_description", (swig_wrapper_func) _wrap_TermGenerator_get_description, NULL},
    { SWIG_prefix "TermGenerator", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_TermGenerator},
    { SWIG_prefix "KeyMaker_apply", (swig_wrapper_func) _wrap_KeyMaker_apply, NULL},
    { SWIG_prefix "delete_KeyMaker", (swig_wrapper_func) _wrap_delete_KeyMaker, NULL},
    { SWIG_prefix "KeyMaker", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_KeyMaker},
    { SWIG_prefix "new_MultiValueKeyMaker", (swig_wrapper_func) _wrap_new_MultiValueKeyMaker, NULL},
    { SWIG_prefix "MultiValueKeyMaker_apply", (swig_wrapper_func) _wrap_MultiValueKeyMaker_apply, NULL},
    { SWIG_prefix "MultiValueKeyMaker_add_value", (swig_wrapper_func) _wrap_MultiValueKeyMaker_add_value, NULL},
    { SWIG_prefix "delete_MultiValueKeyMaker", (swig_wrapper_func) _wrap_delete_MultiValueKeyMaker, NULL},
    { SWIG_prefix "MultiValueKeyMaker", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_MultiValueKeyMaker},
    { SWIG_prefix "delete_Sorter", (swig_wrapper_func) _wrap_delete_Sorter, NULL},
    { SWIG_prefix "Sorter", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Sorter},
    { SWIG_prefix "new_MultiValueSorter", (swig_wrapper_func) _wrap_new_MultiValueSorter, NULL},
    { SWIG_prefix "MultiValueSorter_apply", (swig_wrapper_func) _wrap_MultiValueSorter_apply, NULL},
    { SWIG_prefix "MultiValueSorter_add", (swig_wrapper_func) _wrap_MultiValueSorter_add, NULL},
    { SWIG_prefix "delete_MultiValueSorter", (swig_wrapper_func) _wrap_delete_MultiValueSorter, NULL},
    { SWIG_prefix "MultiValueSorter", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_MultiValueSorter},
    { SWIG_prefix "new_ValueSetMatchDecider", (swig_wrapper_func) _wrap_new_ValueSetMatchDecider, NULL},
    { SWIG_prefix "ValueSetMatchDecider_add_value", (swig_wrapper_func) _wrap_ValueSetMatchDecider_add_value, NULL},
    { SWIG_prefix "ValueSetMatchDecider_remove_value", (swig_wrapper_func) _wrap_ValueSetMatchDecider_remove_value, NULL},
    { SWIG_prefix "ValueSetMatchDecider_apply", (swig_wrapper_func) _wrap_ValueSetMatchDecider_apply, NULL},
    { SWIG_prefix "delete_ValueSetMatchDecider", (swig_wrapper_func) _wrap_delete_ValueSetMatchDecider, NULL},
    { SWIG_prefix "ValueSetMatchDecider", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_ValueSetMatchDecider},
    { SWIG_prefix "new_Compactor", (swig_wrapper_func) _wrap_new_Compactor, NULL},
    { SWIG_prefix "delete_Compactor", (swig_wrapper_func) _wrap_delete_Compactor, NULL},
    { SWIG_prefix "Compactor_set_block_size", (swig_wrapper_func) _wrap_Compactor_set_block_size, NULL},
    { SWIG_prefix "Compactor_set_renumber", (swig_wrapper_func) _wrap_Compactor_set_renumber, NULL},
    { SWIG_prefix "Compactor_set_multipass", (swig_wrapper_func) _wrap_Compactor_set_multipass, NULL},
    { SWIG_prefix "Compactor_set_compaction_level", (swig_wrapper_func) _wrap_Compactor_set_compaction_level, NULL},
    { SWIG_prefix "Compactor_set_destdir", (swig_wrapper_func) _wrap_Compactor_set_destdir, NULL},
    { SWIG_prefix "Compactor_add_source", (swig_wrapper_func) _wrap_Compactor_add_source, NULL},
    { SWIG_prefix "Compactor_compact", (swig_wrapper_func) _wrap_Compactor_compact, NULL},
    { SWIG_prefix "Compactor_set_status", (swig_wrapper_func) _wrap_Compactor_set_status, NULL},
    { SWIG_prefix "Compactor_resolve_duplicate_metadata", (swig_wrapper_func) _wrap_Compactor_resolve_duplicate_metadata, NULL},
    { SWIG_prefix "Compactor", (swig_wrapper_func) SWIG_ObjectConstructor, (ClientData)&_wrap_class_Xapian_Compactor},
    {0, 0, 0}
};

static swig_var_info swig_variables[] = {
    { SWIG_prefix "BAD_VALUENO", 0, (swig_variable_func) _wrap_BAD_VALUENO_get,(swig_variable_func) swig_readonly},
    { SWIG_prefix "Query_MatchAll", 0, (swig_variable_func) _wrap_Query_MatchAll_get,(swig_variable_func) swig_readonly},
    { SWIG_prefix "Query_MatchNothing", 0, (swig_variable_func) _wrap_Query_MatchNothing_get,(swig_variable_func) swig_readonly},
    {0,0,0,0}
};

static swig_const_info swig_constants[] = {
    {0,0,0,0,0,0}
};

/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_Xapian__WritableDatabaseTo_p_Xapian__Database(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Database *)  ((Xapian::WritableDatabase *) x));
}
static void *_p_Xapian__ValueSetMatchDeciderTo_p_Xapian__MatchDecider(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchDecider *)  ((Xapian::ValueSetMatchDecider *) 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__ValuePostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::ValuePostingSource *) x));
}
static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueWeightPostingSource *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *)(Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *) (Xapian::ValuePostingSource *) ((Xapian::ValueMapPostingSource *) x));
}
static void *_p_Xapian__FixedWeightPostingSourceTo_p_Xapian__PostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::PostingSource *)  ((Xapian::FixedWeightPostingSource *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValueWeightPostingSource *)  ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueWeightPostingSource *) x));
}
static void *_p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *) (Xapian::ValueWeightPostingSource *) ((Xapian::DecreasingValueWeightPostingSource *) x));
}
static void *_p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::ValuePostingSource *)  ((Xapian::ValueMapPostingSource *) x));
}
static void *_p_Xapian__BoolWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BoolWeight *) x));
}
static void *_p_Xapian__TradWeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::TradWeight *) x));
}
static void *_p_Xapian__BM25WeightTo_p_Xapian__Weight(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Weight *)  ((Xapian::BM25Weight *) x));
}
static void *_p_Xapian__ValueCountMatchSpyTo_p_Xapian__MatchSpy(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::MatchSpy *)  ((Xapian::ValueCountMatchSpy *) x));
}
static void *_p_Xapian__SimpleStopperTo_p_Xapian__Stopper(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((Xapian::Stopper *)  ((Xapian::SimpleStopper *) x));
}
static void *_p_Xapian__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__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 swig_type_info _swigt__p_Xapian__BM25Weight = {"_p_Xapian__BM25Weight", "Xapian::BM25Weight *", 0, 0, (void*)&_wrap_class_Xapian_BM25Weight, 0};
static swig_type_info _swigt__p_Xapian__BoolWeight = {"_p_Xapian__BoolWeight", "Xapian::BoolWeight *", 0, 0, (void*)&_wrap_class_Xapian_BoolWeight, 0};
static swig_type_info _swigt__p_Xapian__Compactor = {"_p_Xapian__Compactor", "Xapian::Compactor *", 0, 0, (void*)&_wrap_class_Xapian_Compactor, 0};
static swig_type_info _swigt__p_Xapian__Database = {"_p_Xapian__Database", "Xapian::Database *", 0, 0, (void*)&_wrap_class_Xapian_Database, 0};
static swig_type_info _swigt__p_Xapian__DateValueRangeProcessor = {"_p_Xapian__DateValueRangeProcessor", "Xapian::DateValueRangeProcessor *", 0, 0, (void*)&_wrap_class_Xapian_DateValueRangeProcessor, 0};
static swig_type_info _swigt__p_Xapian__DecreasingValueWeightPostingSource = {"_p_Xapian__DecreasingValueWeightPostingSource", "Xapian::DecreasingValueWeightPostingSource *", 0, 0, (void*)&_wrap_class_Xapian_DecreasingValueWeightPostingSource, 0};
static swig_type_info _swigt__p_Xapian__Document = {"_p_Xapian__Document", "Xapian::Document *", 0, 0, (void*)&_wrap_class_Xapian_Document, 0};
static swig_type_info _swigt__p_Xapian__ESet = {"_p_Xapian__ESet", "Xapian::ESet *", 0, 0, (void*)&_wrap_class_Xapian_ESet, 0};
static swig_type_info _swigt__p_Xapian__ESetIterator = {"_p_Xapian__ESetIterator", "Xapian::ESetIterator *", 0, 0, (void*)&_wrap_class_Xapian_ESetIterator, 0};
static swig_type_info _swigt__p_Xapian__Enquire = {"_p_Xapian__Enquire", "Xapian::Enquire *", 0, 0, (void*)&_wrap_class_Xapian_Enquire, 0};
static swig_type_info _swigt__p_Xapian__FixedWeightPostingSource = {"_p_Xapian__FixedWeightPostingSource", "Xapian::FixedWeightPostingSource *", 0, 0, (void*)&_wrap_class_Xapian_FixedWeightPostingSource, 0};
static swig_type_info _swigt__p_Xapian__KeyMaker = {"_p_Xapian__KeyMaker", "Xapian::KeyMaker *", 0, 0, (void*)&_wrap_class_Xapian_KeyMaker, 0};
static swig_type_info _swigt__p_Xapian__MSet = {"_p_Xapian__MSet", "Xapian::MSet *", 0, 0, (void*)&_wrap_class_Xapian_MSet, 0};
static swig_type_info _swigt__p_Xapian__MSetIterator = {"_p_Xapian__MSetIterator", "Xapian::MSetIterator *", 0, 0, (void*)&_wrap_class_Xapian_MSetIterator, 0};
static swig_type_info _swigt__p_Xapian__MatchDecider = {"_p_Xapian__MatchDecider", "Xapian::MatchDecider *", 0, 0, (void*)&_wrap_class_Xapian_MatchDecider, 0};
static swig_type_info _swigt__p_Xapian__MatchSpy = {"_p_Xapian__MatchSpy", "Xapian::MatchSpy *", 0, 0, (void*)&_wrap_class_Xapian_MatchSpy, 0};
static swig_type_info _swigt__p_Xapian__MultiValueKeyMaker = {"_p_Xapian__MultiValueKeyMaker", "Xapian::MultiValueKeyMaker *", 0, 0, (void*)&_wrap_class_Xapian_MultiValueKeyMaker, 0};
static swig_type_info _swigt__p_Xapian__MultiValueSorter = {"_p_Xapian__MultiValueSorter", "Xapian::MultiValueSorter *", 0, 0, (void*)&_wrap_class_Xapian_MultiValueSorter, 0};
static swig_type_info _swigt__p_Xapian__NumberValueRangeProcessor = {"_p_Xapian__NumberValueRangeProcessor", "Xapian::NumberValueRangeProcessor *", 0, 0, (void*)&_wrap_class_Xapian_NumberValueRangeProcessor, 0};
static swig_type_info _swigt__p_Xapian__PositionIterator = {"_p_Xapian__PositionIterator", "Xapian::PositionIterator *", 0, 0, (void*)&_wrap_class_Xapian_PositionIterator, 0};
static swig_type_info _swigt__p_Xapian__PostingIterator = {"_p_Xapian__PostingIterator", "Xapian::PostingIterator *", 0, 0, (void*)&_wrap_class_Xapian_PostingIterator, 0};
static swig_type_info _swigt__p_Xapian__PostingSource = {"_p_Xapian__PostingSource", "Xapian::PostingSource *", 0, 0, (void*)&_wrap_class_Xapian_PostingSource, 0};
static swig_type_info _swigt__p_Xapian__Query = {"_p_Xapian__Query", "Xapian::Query *", 0, 0, (void*)&_wrap_class_Xapian_Query, 0};
static swig_type_info _swigt__p_Xapian__QueryParser = {"_p_Xapian__QueryParser", "Xapian::QueryParser *", 0, 0, (void*)&_wrap_class_Xapian_QueryParser, 0};
static swig_type_info _swigt__p_Xapian__RSet = {"_p_Xapian__RSet", "Xapian::RSet *", 0, 0, (void*)&_wrap_class_Xapian_RSet, 0};
static swig_type_info _swigt__p_Xapian__Registry = {"_p_Xapian__Registry", "Xapian::Registry *", 0, 0, (void*)&_wrap_class_Xapian_Registry, 0};
static swig_type_info _swigt__p_Xapian__SimpleStopper = {"_p_Xapian__SimpleStopper", "Xapian::SimpleStopper *", 0, 0, (void*)&_wrap_class_Xapian_SimpleStopper, 0};
static swig_type_info _swigt__p_Xapian__Sorter = {"_p_Xapian__Sorter", "Xapian::Sorter *", 0, 0, (void*)&_wrap_class_Xapian_Sorter, 0};
static swig_type_info _swigt__p_Xapian__Stem = {"_p_Xapian__Stem", "Xapian::Stem *", 0, 0, (void*)&_wrap_class_Xapian_Stem, 0};
static swig_type_info _swigt__p_Xapian__StemImplementation = {"_p_Xapian__StemImplementation", "Xapian::StemImplementation *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_Xapian__Stopper = {"_p_Xapian__Stopper", "Xapian::Stopper *", 0, 0, (void*)&_wrap_class_Xapian_Stopper, 0};
static swig_type_info _swigt__p_Xapian__StringValueRangeProcessor = {"_p_Xapian__StringValueRangeProcessor", "Xapian::StringValueRangeProcessor *", 0, 0, (void*)&_wrap_class_Xapian_StringValueRangeProcessor, 0};
static swig_type_info _swigt__p_Xapian__TermGenerator = {"_p_Xapian__TermGenerator", "Xapian::TermGenerator *", 0, 0, (void*)&_wrap_class_Xapian_TermGenerator, 0};
static swig_type_info _swigt__p_Xapian__TermIterator = {"_p_Xapian__TermIterator", "Xapian::TermIterator *", 0, 0, (void*)&_wrap_class_Xapian_TermIterator, 0};
static swig_type_info _swigt__p_Xapian__TradWeight = {"_p_Xapian__TradWeight", "Xapian::TradWeight *", 0, 0, (void*)&_wrap_class_Xapian_TradWeight, 0};
static swig_type_info _swigt__p_Xapian__ValueCountMatchSpy = {"_p_Xapian__ValueCountMatchSpy", "Xapian::ValueCountMatchSpy *", 0, 0, (void*)&_wrap_class_Xapian_ValueCountMatchSpy, 0};
static swig_type_info _swigt__p_Xapian__ValueIterator = {"_p_Xapian__ValueIterator", "Xapian::ValueIterator *", 0, 0, (void*)&_wrap_class_Xapian_ValueIterator, 0};
static swig_type_info _swigt__p_Xapian__ValueMapPostingSource = {"_p_Xapian__ValueMapPostingSource", "Xapian::ValueMapPostingSource *", 0, 0, (void*)&_wrap_class_Xapian_ValueMapPostingSource, 0};
static swig_type_info _swigt__p_Xapian__ValuePostingSource = {"_p_Xapian__ValuePostingSource", "Xapian::ValuePostingSource *", 0, 0, (void*)&_wrap_class_Xapian_ValuePostingSource, 0};
static swig_type_info _swigt__p_Xapian__ValueRangeProcessor = {"_p_Xapian__ValueRangeProcessor", "Xapian::ValueRangeProcessor *", 0, 0, (void*)&_wrap_class_Xapian_ValueRangeProcessor, 0};
static swig_type_info _swigt__p_Xapian__ValueSetMatchDecider = {"_p_Xapian__ValueSetMatchDecider", "Xapian::ValueSetMatchDecider *", 0, 0, (void*)&_wrap_class_Xapian_ValueSetMatchDecider, 0};
static swig_type_info _swigt__p_Xapian__ValueWeightPostingSource = {"_p_Xapian__ValueWeightPostingSource", "Xapian::ValueWeightPostingSource *", 0, 0, (void*)&_wrap_class_Xapian_ValueWeightPostingSource, 0};
static swig_type_info _swigt__p_Xapian__Weight = {"_p_Xapian__Weight", "Xapian::Weight *", 0, 0, (void*)&_wrap_class_Xapian_Weight, 0};
static swig_type_info _swigt__p_Xapian__WritableDatabase = {"_p_Xapian__WritableDatabase", "Xapian::WritableDatabase *", 0, 0, (void*)&_wrap_class_Xapian_WritableDatabase, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_compaction_level = {"_p_compaction_level", "compaction_level *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_docid_order = {"_p_docid_order", "docid_order *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "Xapian::doclength *|double *|Xapian::weight *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_feature_flag = {"_p_feature_flag", "feature_flag *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|Xapian::doccount_diff *|Xapian::termcount_diff *|Xapian::termpos_diff *|Xapian::valueno_diff *|Xapian::percent *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_op = {"_p_op", "op *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_std__string = {"_p_std__string", "std::string *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_stem_strategy = {"_p_stem_strategy", "stem_strategy *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "Xapian::timeout *|unsigned int *|Xapian::doccount *|Xapian::termcount *|Xapian::valueno *|Xapian::docid *|Xapian::termpos *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__std__ptrdiff_t = {"_std__ptrdiff_t", "std::ptrdiff_t", 0, 0, (void*)0, 0};
static swig_type_info _swigt__std__size_t = {"_std__size_t", "std::size_t", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_Xapian__BM25Weight,
  &_swigt__p_Xapian__BoolWeight,
  &_swigt__p_Xapian__Compactor,
  &_swigt__p_Xapian__Database,
  &_swigt__p_Xapian__DateValueRangeProcessor,
  &_swigt__p_Xapian__DecreasingValueWeightPostingSource,
  &_swigt__p_Xapian__Document,
  &_swigt__p_Xapian__ESet,
  &_swigt__p_Xapian__ESetIterator,
  &_swigt__p_Xapian__Enquire,
  &_swigt__p_Xapian__FixedWeightPostingSource,
  &_swigt__p_Xapian__KeyMaker,
  &_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__NumberValueRangeProcessor,
  &_swigt__p_Xapian__PositionIterator,
  &_swigt__p_Xapian__PostingIterator,
  &_swigt__p_Xapian__PostingSource,
  &_swigt__p_Xapian__Query,
  &_swigt__p_Xapian__QueryParser,
  &_swigt__p_Xapian__RSet,
  &_swigt__p_Xapian__Registry,
  &_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__ValueCountMatchSpy,
  &_swigt__p_Xapian__ValueIterator,
  &_swigt__p_Xapian__ValueMapPostingSource,
  &_swigt__p_Xapian__ValuePostingSource,
  &_swigt__p_Xapian__ValueRangeProcessor,
  &_swigt__p_Xapian__ValueSetMatchDecider,
  &_swigt__p_Xapian__ValueWeightPostingSource,
  &_swigt__p_Xapian__Weight,
  &_swigt__p_Xapian__WritableDatabase,
  &_swigt__p_char,
  &_swigt__p_compaction_level,
  &_swigt__p_docid_order,
  &_swigt__p_double,
  &_swigt__p_feature_flag,
  &_swigt__p_int,
  &_swigt__p_op,
  &_swigt__p_std__string,
  &_swigt__p_stem_strategy,
  &_swigt__p_unsigned_int,
  &_swigt__std__ptrdiff_t,
  &_swigt__std__size_t,
};

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__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__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__FixedWeightPostingSource[] = {  {&_swigt__p_Xapian__FixedWeightPostingSource, 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__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__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__RSet[] = {  {&_swigt__p_Xapian__RSet, 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__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__ValueCountMatchSpy[] = {  {&_swigt__p_Xapian__ValueCountMatchSpy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueIterator[] = {  {&_swigt__p_Xapian__ValueIterator, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueMapPostingSource[] = {  {&_swigt__p_Xapian__ValueMapPostingSource, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValuePostingSource[] = {  {&_swigt__p_Xapian__ValuePostingSource, 0, 0, 0},  {&_swigt__p_Xapian__ValueWeightPostingSource, _p_Xapian__ValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},  {&_swigt__p_Xapian__ValueMapPostingSource, _p_Xapian__ValueMapPostingSourceTo_p_Xapian__ValuePostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueRangeProcessor[] = {  {&_swigt__p_Xapian__ValueRangeProcessor, 0, 0, 0},  {&_swigt__p_Xapian__StringValueRangeProcessor, _p_Xapian__StringValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__DateValueRangeProcessor, _p_Xapian__DateValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},  {&_swigt__p_Xapian__NumberValueRangeProcessor, _p_Xapian__NumberValueRangeProcessorTo_p_Xapian__ValueRangeProcessor, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueSetMatchDecider[] = {  {&_swigt__p_Xapian__ValueSetMatchDecider, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__ValueWeightPostingSource[] = {  {&_swigt__p_Xapian__ValueWeightPostingSource, 0, 0, 0},  {&_swigt__p_Xapian__DecreasingValueWeightPostingSource, _p_Xapian__DecreasingValueWeightPostingSourceTo_p_Xapian__ValueWeightPostingSource, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__Weight[] = {  {&_swigt__p_Xapian__BoolWeight, _p_Xapian__BoolWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__TradWeight, _p_Xapian__TradWeightTo_p_Xapian__Weight, 0, 0},  {&_swigt__p_Xapian__Weight, 0, 0, 0},  {&_swigt__p_Xapian__BM25Weight, _p_Xapian__BM25WeightTo_p_Xapian__Weight, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_Xapian__WritableDatabase[] = {  {&_swigt__p_Xapian__WritableDatabase, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_compaction_level[] = {  {&_swigt__p_compaction_level, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_docid_order[] = {  {&_swigt__p_docid_order, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_feature_flag[] = {  {&_swigt__p_feature_flag, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_op[] = {  {&_swigt__p_op, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_std__string[] = {  {&_swigt__p_std__string, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_stem_strategy[] = {  {&_swigt__p_stem_strategy, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__std__ptrdiff_t[] = {  {&_swigt__std__ptrdiff_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__std__size_t[] = {  {&_swigt__std__size_t, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_Xapian__BM25Weight,
  _swigc__p_Xapian__BoolWeight,
  _swigc__p_Xapian__Compactor,
  _swigc__p_Xapian__Database,
  _swigc__p_Xapian__DateValueRangeProcessor,
  _swigc__p_Xapian__DecreasingValueWeightPostingSource,
  _swigc__p_Xapian__Document,
  _swigc__p_Xapian__ESet,
  _swigc__p_Xapian__ESetIterator,
  _swigc__p_Xapian__Enquire,
  _swigc__p_Xapian__FixedWeightPostingSource,
  _swigc__p_Xapian__KeyMaker,
  _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__NumberValueRangeProcessor,
  _swigc__p_Xapian__PositionIterator,
  _swigc__p_Xapian__PostingIterator,
  _swigc__p_Xapian__PostingSource,
  _swigc__p_Xapian__Query,
  _swigc__p_Xapian__QueryParser,
  _swigc__p_Xapian__RSet,
  _swigc__p_Xapian__Registry,
  _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__ValueCountMatchSpy,
  _swigc__p_Xapian__ValueIterator,
  _swigc__p_Xapian__ValueMapPostingSource,
  _swigc__p_Xapian__ValuePostingSource,
  _swigc__p_Xapian__ValueRangeProcessor,
  _swigc__p_Xapian__ValueSetMatchDecider,
  _swigc__p_Xapian__ValueWeightPostingSource,
  _swigc__p_Xapian__Weight,
  _swigc__p_Xapian__WritableDatabase,
  _swigc__p_char,
  _swigc__p_compaction_level,
  _swigc__p_docid_order,
  _swigc__p_double,
  _swigc__p_feature_flag,
  _swigc__p_int,
  _swigc__p_op,
  _swigc__p_std__string,
  _swigc__p_stem_strategy,
  _swigc__p_unsigned_int,
  _swigc__std__ptrdiff_t,
  _swigc__std__size_t,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

#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
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  
  SWIGINTERN void
  SWIG_Tcl_InstallConstants(Tcl_Interp *interp, swig_const_info constants[]) {
    size_t i;
    Tcl_Obj *obj;
    
    if (!swigconstTableinit) {
      Tcl_InitHashTable(&swigconstTable, TCL_STRING_KEYS);
      swigconstTableinit = 1;
    }
    for (i = 0; constants[i].type; i++) {
      switch(constants[i].type) {
      case SWIG_TCL_POINTER:
        obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_TCL_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        SWIG_Tcl_SetConstantObj(interp, constants[i].name, obj);
      }
    }
  }
  
  /* Create fast method lookup tables */
  
  SWIGINTERN void
  SWIG_Tcl_InstallMethodLookupTables(void) {
    size_t i;
    
    for (i = 0; i < swig_module.size; ++i) {
      swig_type_info *type = swig_module.type_initial[i];
      if (type->clientdata) {
        swig_class* klass = (swig_class*) type->clientdata;
        swig_method* meth;
        Tcl_InitHashTable(&(klass->hashtable), TCL_STRING_KEYS);
        for (meth = klass->methods; meth && meth->name; ++meth) {
          int newEntry;
          Tcl_HashEntry* hashentry = Tcl_CreateHashEntry(&(klass->hashtable), meth->name, &newEntry);
          Tcl_SetHashValue(hashentry, (ClientData)meth->method);
        }
      }
    }
  }
  
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

SWIGEXPORT int SWIG_init(Tcl_Interp *interp) {
  size_t i;
  if (interp == 0) return TCL_ERROR;
#ifdef USE_TCL_STUBS
  /* (char*) cast is required to avoid compiler warning/error for Tcl < 8.4. */
  if (Tcl_InitStubs(interp, (char*)SWIG_TCL_STUBS_VERSION, 0) == NULL) {
    return TCL_ERROR;
  }
#endif  
#ifdef USE_TK_STUBS
  /* (char*) cast is required to avoid compiler warning/error. */
  if (Tk_InitStubs(interp, (char*)SWIG_TCL_STUBS_VERSION, 0) == NULL) {
    return TCL_ERROR;
  }
#endif
  
  Tcl_PkgProvide(interp, (char*)SWIG_name, (char*)SWIG_version);
  
#ifdef SWIG_namespace
  Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
#endif
  
  SWIG_InitializeModule((void *) interp);
  SWIG_PropagateClientData();
  
  for (i = 0; swig_commands[i].name; i++) {
    Tcl_CreateObjCommand(interp, (char *) swig_commands[i].name, (swig_wrapper_func) swig_commands[i].wrapper,
      swig_commands[i].clientdata, NULL);
  }
  for (i = 0; swig_variables[i].name; i++) {
    Tcl_SetVar(interp, (char *) swig_variables[i].name, (char *) "", TCL_GLOBAL_ONLY);
    Tcl_TraceVar(interp, (char *) swig_variables[i].name, TCL_TRACE_READS | TCL_GLOBAL_ONLY, 
      (Tcl_VarTraceProc *) swig_variables[i].get, (ClientData) swig_variables[i].addr);
    Tcl_TraceVar(interp, (char *) swig_variables[i].name, TCL_TRACE_WRITES | TCL_GLOBAL_ONLY, 
      (Tcl_VarTraceProc *) swig_variables[i].set, (ClientData) swig_variables[i].addr);
  }
  
  SWIG_Tcl_InstallConstants(interp, swig_constants);
  SWIG_Tcl_InstallMethodLookupTables();
  
  
  SWIG_Tcl_SetConstantObj(interp, "xapian::Enquire_ASCENDING", SWIG_From_int(static_cast< int >(Xapian::Enquire::ASCENDING)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Enquire_DESCENDING", SWIG_From_int(static_cast< int >(Xapian::Enquire::DESCENDING)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Enquire_DONT_CARE", SWIG_From_int(static_cast< int >(Xapian::Enquire::DONT_CARE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Enquire_INCLUDE_QUERY_TERMS", SWIG_From_int(static_cast< int >(Xapian::Enquire::INCLUDE_QUERY_TERMS)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Enquire_USE_EXACT_TERMFREQ", SWIG_From_int(static_cast< int >(Xapian::Enquire::USE_EXACT_TERMFREQ)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::DB_CREATE_OR_OPEN", SWIG_From_int(static_cast< int >(Xapian::DB_CREATE_OR_OPEN)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::DB_CREATE", SWIG_From_int(static_cast< int >(Xapian::DB_CREATE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::DB_CREATE_OR_OVERWRITE", SWIG_From_int(static_cast< int >(Xapian::DB_CREATE_OR_OVERWRITE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::DB_OPEN", SWIG_From_int(static_cast< int >(Xapian::DB_OPEN)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_AND", SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_OR", SWIG_From_int(static_cast< int >(Xapian::Query::OP_OR)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_AND_NOT", SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND_NOT)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_XOR", SWIG_From_int(static_cast< int >(Xapian::Query::OP_XOR)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_AND_MAYBE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_AND_MAYBE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_FILTER", SWIG_From_int(static_cast< int >(Xapian::Query::OP_FILTER)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_NEAR", SWIG_From_int(static_cast< int >(Xapian::Query::OP_NEAR)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_PHRASE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_PHRASE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_VALUE_RANGE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_RANGE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_SCALE_WEIGHT", SWIG_From_int(static_cast< int >(Xapian::Query::OP_SCALE_WEIGHT)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_ELITE_SET", SWIG_From_int(static_cast< int >(Xapian::Query::OP_ELITE_SET)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_VALUE_GE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_GE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_VALUE_LE", SWIG_From_int(static_cast< int >(Xapian::Query::OP_VALUE_LE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Query_OP_SYNONYM", SWIG_From_int(static_cast< int >(Xapian::Query::OP_SYNONYM)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_BOOLEAN", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_PHRASE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PHRASE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_LOVEHATE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_LOVEHATE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_BOOLEAN_ANY_CASE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_BOOLEAN_ANY_CASE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_WILDCARD", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_WILDCARD)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_PURE_NOT", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PURE_NOT)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_PARTIAL", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_PARTIAL)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_SPELLING_CORRECTION", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SPELLING_CORRECTION)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_SYNONYM", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_SYNONYM)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_AUTO_SYNONYMS", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_SYNONYMS)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_AUTO_MULTIWORD_SYNONYMS", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_AUTO_MULTIWORD_SYNONYMS)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_FLAG_DEFAULT", SWIG_From_int(static_cast< int >(Xapian::QueryParser::FLAG_DEFAULT)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_STEM_NONE", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_NONE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_STEM_SOME", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_SOME)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_STEM_ALL", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_ALL)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::QueryParser_STEM_ALL_Z", SWIG_From_int(static_cast< int >(Xapian::QueryParser::STEM_ALL_Z)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::TermGenerator_FLAG_SPELLING", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::FLAG_SPELLING)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::TermGenerator_STEM_NONE", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_NONE)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::TermGenerator_STEM_SOME", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_SOME)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::TermGenerator_STEM_ALL", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_ALL)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::TermGenerator_STEM_ALL_Z", SWIG_From_int(static_cast< int >(Xapian::TermGenerator::STEM_ALL_Z)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Compactor_STANDARD", SWIG_From_int(static_cast< int >(Xapian::Compactor::STANDARD)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Compactor_FULL", SWIG_From_int(static_cast< int >(Xapian::Compactor::FULL)));
  SWIG_Tcl_SetConstantObj(interp, "xapian::Compactor_FULLER", SWIG_From_int(static_cast< int >(Xapian::Compactor::FULLER)));
  return TCL_OK;
}
SWIGEXPORT int Xapian_SafeInit(Tcl_Interp *interp) {
  return SWIG_init(interp);
}

